Skip to content

Commit

Permalink
Merge pull request #135 from worldcoin/kit/reth-1.1.5
Browse files Browse the repository at this point in the history
Update `world-chain-builder` to use `reth-1.1.5`
  • Loading branch information
0xOsiris authored Jan 15, 2025
2 parents dcc5434 + 0899ac7 commit 69ecd00
Show file tree
Hide file tree
Showing 25 changed files with 2,425 additions and 1,469 deletions.
2,160 changes: 1,101 additions & 1,059 deletions world-chain-builder/Cargo.lock

Large diffs are not rendered by default.

110 changes: 55 additions & 55 deletions world-chain-builder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,88 +37,88 @@ world-chain-builder-rpc = { path = "crates/world/rpc" }
world-chain-builder-pool = { path = "crates/world/pool" }

# reth
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"test-utils",
] }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-stages-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-payload-validator = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-rpc-server-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-stages-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-payload-validator = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }

# reth-optimism
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5", features = [
"optimism",
] }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth_payload_util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth_payload_util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.5" }


# alloy op
op-alloy-consensus = "0.7.3"
op-alloy-rpc-types = "0.7.3"
op-alloy-rpc-types-engine = "0.7.3"
op-alloy-network = "0.7.3"
op-alloy-consensus = "0.9.0"
op-alloy-rpc-types = "0.9.0"
op-alloy-rpc-types-engine = "0.9.0"
op-alloy-network = "0.9.0"

# alloy
alloy-consensus = { version = "0.7.3", default-features = false }
alloy-network = { version = "0.7.3", default-features = false }
alloy-primitives = { version = "0.8.11", default-features = false }
alloy-rpc-types-eth = { version = "0.7.3", default-features = false }
alloy-rpc-types = { version = "0.7.3", features = [
alloy-consensus = { version = "0.9.2", default-features = false }
alloy-network = { version = "0.9.2", default-features = false }
alloy-primitives = { version = "0.8.18", default-features = false }
alloy-rpc-types-eth = { version = "0.9.2", default-features = false }
alloy-rpc-types = { version = "0.9.2", features = [
"eth",
], default-features = false }
alloy-rpc-types-engine = { version = "0.7.3" }
alloy-rpc-types-engine = { version = "0.9.2" }
alloy-rlp = "0.3.10"
alloy-eips = { version = "0.7.3", default-features = false }
alloy-genesis = { version = "0.7.3", default-features = false }
alloy-rpc-types-debug = "0.8.0"
alloy-signer = { version = "0.7.3", default-features = false }
alloy-signer-local = { version = "0.7.3", default-features = false }
alloy-sol-types = "0.8.15"
alloy-eips = { version = "0.9.2", default-features = false }
alloy-genesis = { version = "0.9.2", default-features = false }
alloy-rpc-types-debug = "0.9.2"
alloy-signer = { version = "0.9.2", default-features = false }
alloy-signer-local = { version = "0.9.2", default-features = false }
alloy-sol-types = "0.8.18"


# revm
revm = { version = "18.0.0", features = ["std"], default-features = false }
revm-primitives = { version = "14.0.0", default-features = false }
revm = { version = "19.2.0", features = ["std"], default-features = false }
revm-primitives = { version = "15.1.0", default-features = false }

# rpc
jsonrpsee = { version = "0.24", features = ["server", "client", "macros"] }
Expand Down
21 changes: 19 additions & 2 deletions world-chain-builder/crates/world/bin/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
use clap::Parser;
use reth_node_builder::{engine_tree_config::TreeConfig, EngineNodeLauncher, Node};
use reth_optimism_cli::chainspec::OpChainSpecParser;
use reth_optimism_cli::Cli;
use reth_provider::providers::BlockchainProvider2;
use world_chain_builder_node::args::ExtArgs;
use world_chain_builder_node::node::WorldChainBuilder;
use world_chain_builder_rpc::{sequencer::SequencerClient, EthApiExtServer, WorldChainEthApiExt};
Expand All @@ -26,8 +28,16 @@ fn main() {
}
if let Err(err) =
Cli::<OpChainSpecParser, ExtArgs>::parse().run(|builder, builder_args| async move {
let engine_tree_config = TreeConfig::default()
.with_persistence_threshold(builder_args.rollup_args.persistence_threshold)
.with_memory_block_buffer_target(
builder_args.rollup_args.memory_block_buffer_target,
);
let world_chain_node = WorldChainBuilder::new(builder_args.clone())?;
let handle = builder
.node(WorldChainBuilder::new(builder_args.clone())?)
.with_types_and_provider::<WorldChainBuilder, BlockchainProvider2<_>>()
.with_components(WorldChainBuilder::components(builder_args.clone()))
.with_add_ons(world_chain_node.add_ons())
.extend_rpc_modules(move |ctx| {
let provider = ctx.provider().clone();
let pool = ctx.pool().clone();
Expand All @@ -39,7 +49,14 @@ fn main() {
ctx.modules.replace_configured(eth_api_ext.into_rpc())?;
Ok(())
})
.launch()
.launch_with_fn(|builder| {
let launcher = EngineNodeLauncher::new(
builder.task_executor().clone(),
builder.config().datadir(),
engine_tree_config,
);
builder.launch_with(launcher)
})
.await?;

handle.node_exit_future.await
Expand Down
33 changes: 22 additions & 11 deletions world-chain-builder/crates/world/node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,31 +16,31 @@ world-chain-builder-pool.workspace = true
world-chain-builder-pbh = { workspace = true, optional = true }

reth.workspace = true
reth-chain-state.workspace = true
reth-db.workspace = true
reth-chain-state = { workspace = true, optional = true }
reth-db = { workspace = true, optional = true }
reth-optimism-chainspec.workspace = true
reth-optimism-node.workspace = true
reth-optimism-primitives.workspace = true
reth-basic-payload-builder.workspace = true
reth-optimism-payload-builder.workspace = true
reth-primitives.workspace = true
reth-primitives-traits.workspace = true
reth-primitives = { workspace = true, optional = true }
reth-primitives-traits = { workspace = true, optional = true }
reth-provider.workspace = true
reth-prune-types.workspace = true
reth-trie.workspace = true
reth-prune-types = { workspace = true, optional = true }
reth-trie = { workspace = true, optional = true }
reth-trie-db.workspace = true
reth-e2e-test-utils = { workspace = true, optional = true }

alloy-eips.workspace = true
alloy-eips = { workspace = true, optional = true }
alloy-primitives.workspace = true
alloy-rpc-types.workspace = true
alloy-sol-types.workspace = true
alloy-rpc-types = { workspace = true, optional = true }
alloy-sol-types = { workspace = true, optional = true }

revm-primitives = { workspace = true, optional = true }

tokio.workspace = true
tokio = { workspace = true, optional = true }
eyre.workspace = true
futures.workspace = true
futures = { workspace = true, optional = true }
clap.workspace = true
chrono = { workspace = true, optional = true }

Expand Down Expand Up @@ -72,7 +72,18 @@ test = [
"world-chain-builder-pool/test",
"world-chain-builder-pbh",
"dep:reth-e2e-test-utils",
"dep:reth-chain-state",
"dep:reth-primitives",
"dep:reth-primitives-traits",
"dep:reth-prune-types",
"dep:reth-trie",
"dep:reth-db",
"dep:revm-primitives",
"dep:alloy-rpc-types",
"dep:alloy-sol-types",
"dep:alloy-eips",
"dep:futures",
"dep:chrono",
"dep:tokio",
]

2 changes: 2 additions & 0 deletions world-chain-builder/crates/world/node/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#![cfg_attr(not(any(test, feature = "test")), warn(unused_crate_dependencies))]

pub mod args;
pub mod node;

Expand Down
9 changes: 3 additions & 6 deletions world-chain-builder/crates/world/node/src/node.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use eyre::eyre::Result;
use reth::api::{ConfigureEvm, TxTy};
use reth::api::{ConfigureEvm, HeaderTy, TxTy};
use reth::builder::components::{ComponentsBuilder, PayloadServiceBuilder};
use reth::builder::{
BuilderContext, FullNodeTypes, Node, NodeAdapter, NodeComponentsBuilder, NodeTypes,
Expand All @@ -17,7 +17,6 @@ use reth_optimism_node::{OpEngineTypes, OpEvmConfig};
use reth_optimism_payload_builder::builder::OpPayloadTransactions;
use reth_optimism_payload_builder::config::OpDAConfig;
use reth_optimism_primitives::OpPrimitives;
use reth_primitives::{Header, TransactionSigned};
use reth_provider::CanonStateSubscriptions;
use reth_trie_db::MerklePatriciaTrie;
use world_chain_builder_pool::builder::WorldChainPoolBuilder;
Expand Down Expand Up @@ -226,7 +225,7 @@ where
Pool: TransactionPool<Transaction: WorldChainPoolTransaction<Consensus = TxTy<Node::Types>>>
+ Unpin
+ 'static,
Evm: ConfigureEvm<Header = Header, Transaction = TransactionSigned>,
Evm: ConfigureEvm<Header = HeaderTy<Node::Types>, Transaction = TxTy<Node::Types>>,
{
let payload_builder = world_chain_builder_payload::builder::WorldChainPayloadBuilder::new(
evm_config,
Expand All @@ -240,9 +239,7 @@ where
let payload_job_config = BasicPayloadJobGeneratorConfig::default()
.interval(conf.interval())
.deadline(conf.deadline())
.max_payload_tasks(conf.max_payload_tasks())
// no extradata for OP
.extradata(Default::default());
.max_payload_tasks(conf.max_payload_tasks());

let payload_generator = BasicPayloadJobGenerator::with_builder(
ctx.provider().clone(),
Expand Down
Loading

0 comments on commit 69ecd00

Please sign in to comment.