Skip to content

Commit f6ac5b4

Browse files
authored
feat: debug_executionWitness support (#147)
* feat: refactor RpcDb to prepare another impl with ExecutionWitness * feat: add a feature to fetch the state using execution witness * fix: remaining todos * feat: enable `execution-witness` feature on eth proofs * revert: enable `execution-witness` feature on eth proofs This reverts commit fdfb12c.
1 parent 2a70f33 commit f6ac5b4

19 files changed

Lines changed: 829 additions & 341 deletions

File tree

Cargo.lock

Lines changed: 76 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ revm-primitives = { version = "20.0.0", features = [
9090
], default-features = false }
9191
revm-interpreter = { version = "22.0.1", default-features = false }
9292
revm-precompile = { version = "23.0.0", default-features = false }
93+
revm-database = { version = "6.0.0", default-features = false }
9394
revm-database-interface = { version = "6.0.0", default-features = false }
9495
op-revm = { version = "7.0.1", default-features = false }
9596

@@ -106,6 +107,7 @@ alloy-provider = { version = "1.0.13", default-features = false, features = [
106107
alloy-rpc-types = { version = "1.0.13", default-features = false, features = [
107108
"eth",
108109
] }
110+
alloy-rpc-types-debug = { version = "1.0.13", default-features = false }
109111

110112
alloy-json-rpc = { version = "1.0.13", default-features = false }
111113
alloy-genesis = { version = "1.0.13", default-features = false }

bin/client-op/Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bin/client/Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/executor/client/src/into_primitives.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use reth_primitives_traits::{NodePrimitives, RecoveredBlock, SealedHeader};
1414
pub trait IntoPrimitives<N: Network>: NodePrimitives {
1515
fn into_primitive_block(block: N::BlockResponse) -> Self::Block;
1616

17-
fn into_consensus_header(block: N::BlockResponse) -> Header;
17+
fn into_consensus_header(header: N::HeaderResponse) -> Header;
1818
}
1919

2020
pub trait FromInput: NodePrimitives {
@@ -52,8 +52,8 @@ impl IntoPrimitives<Ethereum> for EthPrimitives {
5252
block.into_consensus()
5353
}
5454

55-
fn into_consensus_header(block: alloy_rpc_types::Block) -> Header {
56-
block.header.into()
55+
fn into_consensus_header(header: alloy_rpc_types::Header) -> Header {
56+
header.into()
5757
}
5858
}
5959

@@ -123,10 +123,8 @@ impl IntoPrimitives<op_alloy_network::Optimism> for reth_optimism_primitives::Op
123123
block.into_consensus()
124124
}
125125

126-
fn into_consensus_header(
127-
block: alloy_rpc_types::Block<op_alloy_rpc_types::Transaction>,
128-
) -> Header {
129-
block.header.into()
126+
fn into_consensus_header(header: alloy_rpc_types::Header) -> Header {
127+
header.into()
130128
}
131129
}
132130

crates/executor/host/Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ either = "1.13.0"
2424
# workspace
2525
rsp-rpc-db.workspace = true
2626
rsp-client-executor = { workspace = true, features = ["optimism"] }
27-
rsp-mpt = { workspace = true, features = ["preimage_context"] }
27+
rsp-mpt = { workspace = true }
2828
rsp-primitives = { workspace = true, features = ["optimism"] }
2929

3030
# sp1
@@ -40,7 +40,6 @@ reth-optimism-primitives.workspace = true
4040
reth-ethereum-primitives.workspace = true
4141
reth-primitives-traits = { workspace = true, features = ["secp256k1"] }
4242
reth-trie.workspace = true
43-
reth-execution-types.workspace = true
4443
reth-errors.workspace = true
4544
reth-chainspec.workspace = true
4645

@@ -71,4 +70,8 @@ bincode = "1.3.3"
7170
dotenv = "0.15.0"
7271

7372
[features]
74-
alerting = ["dep:reqwest"]
73+
alerting = ["dep:reqwest"]
74+
execution-witness = [
75+
"rsp-mpt/execution-witness",
76+
"rsp-rpc-db/execution-witness",
77+
]

0 commit comments

Comments
 (0)