Skip to content
This repository was archived by the owner on Jan 16, 2026. It is now read-only.

fix: output root version to 32 bytes#248

Merged
clabby merged 3 commits intoop-rs:mainfrom
zobront:fix-output-root-calc
Jun 14, 2024
Merged

fix: output root version to 32 bytes#248
clabby merged 3 commits intoop-rs:mainfrom
zobront:fix-output-root-calc

Conversation

@zobront
Copy link
Copy Markdown
Contributor

@zobront zobront commented Jun 13, 2024

Description

The compute_output_root() function set the OUTPUT_ROOT_VERSION to just 1 byte, when it should be 32 bytes per the spec.

This PR corrects the calculation by left padding the OUTPUT_ROOT_VERSION with 31 bytes of 0s.

Tests

None of the existing block tests align with known output roots on chain, so will require aggregating new test data. I can use debug RPC calls to get the header and transactions, but not sure about setting up the testdata to act as the fetcher. Do you have a workflow for putting that together?

Additional context

N/A

Metadata

N/A

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Jun 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 5 lines in your changes missing coverage. Please review.

Project coverage is 74.3%. Comparing base (5d327d2) to head (b8ab21e).

Files Patch % Lines
bin/programs/client/src/l2/executor/mod.rs 0.0% 5 Missing ⚠️
Additional details and impacted files

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zobront
Copy link
Copy Markdown
Contributor Author

zobront commented Jun 13, 2024

@clabby Put reminder to add a test later, ready to merge.

@clabby clabby added this pull request to the merge queue Jun 14, 2024
@clabby clabby added K-fix Kind: fix A-binaries Area: binaries labels Jun 14, 2024
Merged via the queue into op-rs:main with commit 7b3409d Jun 14, 2024
@github-actions github-actions bot mentioned this pull request Jun 14, 2024
@zobront zobront deleted the fix-output-root-calc branch June 14, 2024 18:46
This was referenced Jun 16, 2024
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Dec 10, 2025
* output root version to 32 bytes

* add test todo

* cleanup
theochap pushed a commit to ethereum-optimism/optimism that referenced this pull request Jan 14, 2026
* output root version to 32 bytes

* add test todo

* cleanup
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A-binaries Area: binaries K-fix Kind: fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants