-
Notifications
You must be signed in to change notification settings - Fork 281
fix(l1 follower, rollup verifier): blockhash mismatch #1192
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
base: jt/export-headers-toolkit
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Semgrep found 1 Risk: Affected versions of github.com/btcsuite/btcd are vulnerable to Always-Incorrect Control Flow Implementation. The btcd Bitcoin client did not correctly re-implement Bitcoin Core's "FindAndDelete()" functionality. This logic is consensus-critical: the difference in behavior with the other Bitcoin clients can lead to btcd clients accepting an invalid Bitcoin block (or rejecting a valid one). Fix: Upgrade this library to at least version 0.24.2-beta.rc1 at go-ethereum/rollup/missing_header_fields/export-headers-toolkit/go.mod:14. Reference(s): GHSA-27vh-h6mc-q6g8, CVE-2024-38365 |
…port reset of syncing pipeline
cfg.DAMissingHeaderFieldsBaseURL = DAMissingHeaderFieldsBaseURLFlag.Value | ||
if ctx.GlobalIsSet(DAMissingHeaderFieldsBaseURLFlag.Name) { | ||
cfg.DAMissingHeaderFieldsBaseURL = ctx.GlobalString(DAMissingHeaderFieldsBaseURLFlag.Name) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cfg.DAMissingHeaderFieldsBaseURL = DAMissingHeaderFieldsBaseURLFlag.Value | |
if ctx.GlobalIsSet(DAMissingHeaderFieldsBaseURLFlag.Name) { | |
cfg.DAMissingHeaderFieldsBaseURL = ctx.GlobalString(DAMissingHeaderFieldsBaseURLFlag.Name) | |
} | |
cfg.DAMissingHeaderFieldsBaseURL = ctx.GlobalString(DAMissingHeaderFieldsBaseURLFlag.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might work the same way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to work.
WARN [06-05|08:47:48.245] syncing pipeline step failed due to unrecoverable error, stopping pipeline worker err="failed to get blocks from entry: failed to get missing header fields for block 1: failed to initialize missing header reader: failed to download file: failed to download file: Get \"534352.bin\": unsupported protocol scheme \"\""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I think it's because the flag is not added to the node's flag set here: https://github.com/scroll-tech/go-ethereum/blob/scroll-v5.8.52/cmd/geth/main.go#L275-L279
Have you tried assigning it to another URL and seeing if it works?
} | ||
|
||
// rename the temporary file to the final file path | ||
if err = os.Rename(tmpFilePath, m.filePath); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would there be a state where the file in m.filePath
is created, but the err
is still not nil in this line? If so, the file in m.filePath
might be corrupted.
Or when ok
is false, remove files in tmpFilePath
and m.filePath
in the meantime.
1. Purpose or design rationale of this PR
This PR fixes the problem of mismatching block hashes due to the missing header fields
difficulty
andextraData
in DA. It should be reviewed in conjunction with #903, which provides a way to prepare this missing data and describes the format in more detail.Specifically, this PR implements a missing header fields manager that:
Tested on Sepolia:
After a restart the header file is not downloaded again. The L1 syncing process can just continue. As can be seen the generated block hash matches.
Tested on mainnet:
After a restart the header file is not downloaded again. The L1 syncing process can just continue. As can be seen the generated block hash matches.
2. PR title
Your PR title must follow conventional commits (as we are doing squash merge for each PR), so it must start with one of the following types:
3. Deployment tag versioning
Has the version in
params/version.go
been updated?4. Breaking change label
Does this PR have the
breaking-change
label?