Closed hashcashier closed 1 year ago
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
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: