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: failing proof verification for blob transaction #424

Merged
merged 8 commits into from
Nov 27, 2024

Conversation

thedevbirb
Copy link
Contributor

@thedevbirb thedevbirb commented Nov 26, 2024

Closes #419.

The issue was in the encoding logic of type 3 transactions to compute the proof data, regardless on whether they had a sidecar or not.

In short, we were incorrectly discarding the signature fields before doing the EIP-2718 encoding to retrieve the raw bytes needed to compute the hash tree root of the transaction.
Computing an hash tree root with the wrong digest results in incorrectly computed leaves, as such proof verification was failing.

The PR adds also a test that runs in CI that verifies the process is carried out correctly, by loading test data correctly produced by the bolt-builder.

@thedevbirb thedevbirb added T: bug Type: Bug C: bolt-boost Component: bolt-boost labels Nov 26, 2024
it is implicitly part of the whole e2e test to verify merkle multiproofs
Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

Left a few nits, overall this is great and code quality is improved by a lot.

bolt-boost/src/proofs.rs Show resolved Hide resolved
bolt-boost/src/types.rs Show resolved Hide resolved
bolt-boost/src/types.rs Outdated Show resolved Hide resolved
bolt-boost/src/types.rs Outdated Show resolved Hide resolved
bolt-boost/src/types.rs Outdated Show resolved Hide resolved
bolt-boost/src/types.rs Outdated Show resolved Hide resolved
bolt-boost/src/types.rs Show resolved Hide resolved
Copy link
Collaborator

@merklefruit merklefruit left a comment

Choose a reason for hiding this comment

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

lgtm

@thedevbirb thedevbirb merged commit 40f54bf into unstable Nov 27, 2024
4 checks passed
@thedevbirb thedevbirb deleted the lore/fix/proof-verification branch November 27, 2024 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: bolt-boost Component: bolt-boost T: bug Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

failing blob proof verification on devnet with bolt-boost
3 participants