Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix revert in accordance with comments #114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

fix revert in accordance with comments #114

wants to merge 2 commits into from

Conversation

Tabaie
Copy link
Contributor

@Tabaie Tabaie commented Sep 27, 2024

As per auditor feedback https://consensys.slack.com/archives/C07771UFHUG/p1725977141736399, even if unreachable, the code section should match its comments and reset.

@Tabaie Tabaie added bug Something isn't working Prover Tag to use for all work impacting the prover labels Sep 27, 2024
Copy link

Delta Summary - Kotlin Code Coverage

Generated on: 09/27/2024 - 17:36
Description Previous Current Delta
Coverage date: 09/27/2024 - 17:36 09/27/2024 - 17:36
Tag: 530_11075084174 530_11075084174
Line coverage: 27.3% 27.3% 0.0%
Covered lines: 25673 25673 0
Coverable lines: 93723 93723 0
Total lines: 132974 132974 0
Branch coverage: 10.4% 10.4% 0.0%
Covered branches: 5529 5529 0
Total branches: 52680 52680 0
Method coverage: Feature is only available for sponsors

@codecov-commenter
Copy link

codecov-commenter commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.54%. Comparing base (f53e2d1) to head (5b36c0f).

Additional details and impacted files
@@            Coverage Diff            @@
##               main     #114   +/-   ##
=========================================
  Coverage     70.54%   70.54%           
  Complexity     1042     1042           
=========================================
  Files           282      282           
  Lines         11310    11310           
  Branches       1028     1080   +52     
=========================================
  Hits           7979     7979           
  Misses         2861     2861           
  Partials        470      470           
Flag Coverage Δ
hardhat 98.69% <ø> (ø)
kotlin 68.05% <ø> (ø)

@@ -165,6 +165,10 @@ func (bm *BlobMaker) Write(rlpBlock []byte, forceReset bool) (ok bool, err error
// 1. underlying writer error (shouldn't happen we use a simple in memory buffer)
// 2. we exceed the maximum input size of 2Mb (shouldn't happen either)
// In both cases, we can't do anything, so we reset the state.
if innerErr := bm.compressor.Revert(); innerErr != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know if there are implications with the coordinator if we change that?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what are the differences between compressor.Revert() and header.removeLastBlock()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already the expected behavior of the compressor. But in any case I think it's not expected to ever happen right @gbotrel?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bm.compressor only handles the "payload" part of the blob, but every block has some representation in the block header as well (how many blocks for each conflated batch) so if we want to remove a block we have to revert on both header and payload.

@Tabaie Tabaie requested a deployment to docker-build-and-e2e October 17, 2024 01:08 — with GitHub Actions Waiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Prover Tag to use for all work impacting the prover
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants