-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: Optimism L2 Block Validation #31
Merged
Merged
Conversation
This file contains 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
hashcashier
changed the title
Optimism L2 Block Validation
feat: Optimism L2 Block Validation
Sep 11, 2023
Tested (and works) on Bonsai. Block: https://optimistic.etherscan.io/block/107728767 Log output: $ RUST_LOG=info ./target/release/zeth --cache --network=optimism --block-no=107728767 --submit-to-bonsai
[2023-09-18T20:52:38Z INFO zeth_lib::host] Initial block: 107728766 (0x3c41ea6e43267510dcbc482866bca3530250466c1478b3f39e69301d8d0e2444)
[2023-09-18T20:52:38Z INFO zeth_lib::host] Final block number: 107728767 (0x74ba2ecbd7e8d85998c32c446f1dc3616d994b40e23c3bc51344b650f959d31e)
[2023-09-18T20:52:38Z INFO zeth_lib::host] Transaction count: 15
...
[2023-09-18T20:52:47Z INFO zeth] Starting session
Bonsai session UUID: cd39188d-446a-4dfd-bd17-fcc0b78dec14
[2023-09-18T21:15:45Z INFO zeth] Block hash (from Bonsai): 0x74ba2ecbd7e8d85998c32c446f1dc3616d994b40e23c3bc51344b650f959d31e |
intoverflow
approved these changes
Sep 18, 2023
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.
Awesome!
5 tasks
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.
This PR adds support for validating OP L2 Blocks by passing in the
--network=optimism
parameter.The main changes for this feature are:
op-block
guest binary for optimism L2 block validation.ConfiguredBlockBuilder
parameterized by aNetworkStrategyBundle
that wraps around theBlockBuilder
.EthereumBlockBuilder
is an alias forConfiguredBlockBuilder<EthereumStrategyBundle>
.OptimismBlockBuilder
is an alias forConfiguredBlockBuilder<OptimismStrategyBundle>
.TxEssence
and implementation ofEthereumTxEssence
andOptimismTxEssence
.--profile
argument at runtime rather than a feature flag on compilation.--network
parameter withethereum
andoptimism
as valid arguments.DatabaseCommit
trait from revm.OptimismTxExecStrategy
.The readme is updated to include a quick optimism test example: