perf: add L1 block body verification with tx inclusion proofs#36
Merged
perf: add L1 block body verification with tx inclusion proofs#36
Conversation
|
Commit: 569d58a
|
…separate error file
delbonis
requested changes
Mar 25, 2026
delbonis
left a comment
There was a problem hiding this comment.
Really happy to see some of this aggressive optimization work like in the utils module, but then we go and make a bunch of easily avoidable allocs (and some which are still avoidable but which require a little more work)!
|
Oh also consider using |
… enum variants in the tests instead of testing string
MdTeach
approved these changes
Mar 26, 2026
Member
Yes but be aware that is a double hash and you need to reverse the hex (thank you Satoshi for programming bitcoin in a Windows 32-bit machine). |
storopoli
approved these changes
Mar 26, 2026
delbonis
requested changes
Mar 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Originally, we were using the following to check the validity of the bitcoin block body.
While this works, this is really expensive for a full block because of the two main reasons:
So in this PR:
compute_txid,compute_wtxid,calculate_root) using RustCrypto's SHA-2 instead of the bitcoin crate internals, enabling SP1/Risc0 ZK prover acceleration via patched crates.strata-btc-verificationas a workspace crate (was an external git dependency)Type of Change
Notes to Reviewers
Checklist
Related Issues