Skip to content

Commit 77da60f

Browse files
authored
feat: enable debug capabilities for ScrollNode (#263)
Signed-off-by: Gregory Edison <[email protected]>
1 parent e77d88c commit 77da60f

File tree

4 files changed

+16
-12
lines changed

4 files changed

+16
-12
lines changed

Cargo.lock

Lines changed: 1 addition & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/scroll/bin/scroll-reth/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fn main() {
1919
if let Err(err) = Cli::<ScrollChainSpecParser, ScrollRollupArgs>::parse()
2020
.run::<_, _, ScrollNode>(|builder, _| async move {
2121
info!(target: "reth::cli", "Launching node");
22-
let handle = builder.launch_node(ScrollNode).await?;
22+
let handle = builder.node(ScrollNode).launch_with_debug_capabilities().await?;
2323
handle.node_exit_future.await
2424
})
2525
{

crates/scroll/node/Cargo.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ workspace = true
1313

1414
[dependencies]
1515
# reth
16-
reth-basic-payload-builder.workspace = true
1716
reth-chainspec.workspace = true
1817
reth-db = { workspace = true, features = ["scroll-alloy-traits"] }
1918
reth-engine-local = { workspace = true, features = ["scroll-alloy-traits"] }
@@ -41,10 +40,10 @@ revm = { workspace = true, features = ["c-kzg"] }
4140

4241
# alloy
4342
alloy-consensus.workspace = true
44-
alloy-eips.workspace = true
4543
alloy-genesis = { workspace = true, optional = true }
4644
alloy-primitives.workspace = true
4745
alloy-rpc-types-engine.workspace = true
46+
alloy-rpc-types-eth.workspace = true
4847

4948
# scroll-reth
5049
reth-scroll-chainspec.workspace = true
@@ -66,7 +65,6 @@ scroll-alloy-rpc-types-engine.workspace = true
6665
eyre.workspace = true
6766
serde_json = { workspace = true, optional = true }
6867
tracing.workspace = true
69-
thiserror.workspace = true
7068
tokio.workspace = true
7169

7270
[dev-dependencies]
@@ -80,9 +78,7 @@ reth-tasks.workspace = true
8078

8179
alloy-primitives.workspace = true
8280
scroll-alloy-consensus.workspace = true
83-
alloy-network.workspace = true
8481
alloy-consensus.workspace = true
85-
futures.workspace = true
8682

8783
[features]
8884
default = ["reth-codec", "scroll-alloy-traits"]

crates/scroll/node/src/node.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ use crate::{
44
ScrollAddOns, ScrollConsensusBuilder, ScrollExecutorBuilder, ScrollNetworkBuilder,
55
ScrollPayloadBuilderBuilder, ScrollPoolBuilder, ScrollStorage,
66
};
7+
use reth_node_api::FullNodeComponents;
78
use reth_node_builder::{
89
components::{BasicPayloadServiceBuilder, ComponentsBuilder},
910
node::{FullNodeTypes, NodeTypes},
10-
Node, NodeAdapter, NodeComponentsBuilder,
11+
DebugNode, Node, NodeAdapter, NodeComponentsBuilder,
1112
};
1213
use reth_scroll_chainspec::ScrollChainSpec;
1314
use reth_scroll_engine_primitives::ScrollEngineTypes;
@@ -74,6 +75,17 @@ where
7475
}
7576
}
7677

78+
impl<N> DebugNode<N> for ScrollNode
79+
where
80+
N: FullNodeComponents<Types = Self>,
81+
{
82+
type RpcBlock = alloy_rpc_types_eth::Block<scroll_alloy_consensus::ScrollTxEnvelope>;
83+
84+
fn rpc_to_primitive_block(rpc_block: Self::RpcBlock) -> reth_node_api::BlockTy<Self> {
85+
rpc_block.into_consensus()
86+
}
87+
}
88+
7789
impl NodeTypes for ScrollNode {
7890
type Primitives = ScrollPrimitives;
7991
type ChainSpec = ScrollChainSpec;

0 commit comments

Comments
 (0)