Skip to content

Commit

Permalink
Merge pull request #78 from worldcoin/reth-v1.1.4
Browse files Browse the repository at this point in the history
Reth v1.1.4
  • Loading branch information
0xKitsune authored Dec 17, 2024
2 parents 7051f4d + b4ff6db commit 3abf63e
Show file tree
Hide file tree
Showing 55 changed files with 5,029 additions and 4,178 deletions.
3,685 changes: 1,988 additions & 1,697 deletions world-chain-builder/Cargo.lock

Large diffs are not rendered by default.

165 changes: 94 additions & 71 deletions world-chain-builder/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,86 +1,127 @@
[package]
name = "world-chain-builder"
[workspace.package]
version = "0.1.0"
edition = "2021"

default-run = "world-chain-builder"
rust-version = "1.82"
license = "MIT"
homepage = "https://world.org/world-chain"
repository = "https://github.com/worldcoin/world-chain/"

[workspace]
members = ["crates/*"]
resolver = "2"
members = [
"crates/assertor",
"crates/toolkit",
"crates/world/node",
"crates/world/bin",
"crates/world/payload",
"crates/world/rpc",
"crates/world/pbh",
"crates/world/primitives",
"crates/world/pool",
]

[workspace.lints]

[workspace.dependencies]
# internal
world-chain-builder-node = { path = "crates/world/node" }
world-chain-builder-pbh = { path = "crates/world/pbh" }
world-chain-builder-payload = { path = "crates/world/payload" }
world-chain-builder-primitives = { path = "crates/world/primitives" }
world-chain-builder-rpc = { path = "crates/world/rpc" }
world-chain-builder-pool = { path = "crates/world/pool" }

[dependencies]
# reth
reth = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-db = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-db-api = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
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 = [
"test-utils",
] }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-prune-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-eth-wire-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-stages-types = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
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-optimism
reth-primitives = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda", features = [
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.1.4", features = [
"optimism",
] }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
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" }


# 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"

# alloy
op-alloy-consensus = "0.5"
op-alloy-rpc-types = "0.5"
op-alloy-network = "0.5"
alloy-consensus = { version = "0.5.4", default-features = false }
alloy-network = { version = "0.5.4", default-features = false }
alloy-primitives = { version = "0.8.9", default-features = false }
alloy-rpc-types-eth = { version = "0.5.4", default-features = false }
alloy-rpc-types = { version = "0.5.4", features = [
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 = [
"eth",
], default-features = false }
alloy-rlp = "0.3.4"
alloy-eips = { version = "0.5.4", default-features = false }
alloy-genesis = { version = "0.5.4", default-features = false }
alloy-rpc-types-engine = { version = "0.7.3" }
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"

# revm
revm = { version = "17.0.0", features = ["std"], default-features = false }
revm-inspectors = "0.10.0"
revm-primitives = { version = "13.0.0", features = [
"std",
], default-features = false }
revm-interpreter = "10"
revm-precompile = "11"

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

# 3rd party
jsonrpsee = { version = "0.24", features = ["server", "macros"] }
jsonrpsee = { version = "0.24", features = ["server", "client", "macros"] }
tokio = { version = "1", features = ["full"] }
futures = "0.3"
chrono = "0.4"
thiserror = "1"
strum = "0.26"
strum_macros = "0.26"
strum = { version = "0.26", features = ["derive"] }
bytemuck = "1"
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", rev = "d0d1f899add7116ccc1228f5e5e5ee2e2e233768", features = [
"depth_30",
Expand All @@ -92,33 +133,15 @@ tracing = "0.1"
parking_lot = "0.12"
derive_more = "1"
dotenvy = "0.15.7"
tikv-jemallocator = { version = "0.6.0", optional = true }
tikv-jemallocator = { version = "0.6.0" }
bytes = "1.7.2"
hex = "0.4.3"
tempfile = "3"

[dev-dependencies]
criterion = { version = "0.5", features = ["async_tokio"] }
serial_test = "3"
test-case = "3"
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
alloy-primitives = "0.8"
serde_json = "1"
rand = "0.8"
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-consensus = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth", rev = "ddc9bda" }
alloy-signer = { version = "0.5.4", default-features = false }
alloy-signer-local = { version = "0.5.4", default-features = false }

[features]
jemalloc = ["tikv-jemallocator"]

[[bin]]
name = "world-chain-builder"
path = "bin/world-chain-builder.rs"

[[bench]]
name = "validate_transaction"
harness = false
reqwest = { version = "0.12", default-features = false }
bon = "3.3.0"
rayon = "1.10.0"
3 changes: 2 additions & 1 deletion world-chain-builder/crates/assertor/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,10 @@ where
{
let start = Instant::now();
loop {
if let Ok(_) = provider
if provider
.get_block_by_number(BlockNumberOrTag::Latest, false)
.await
.is_ok()
{
break;
}
Expand Down
36 changes: 17 additions & 19 deletions world-chain-builder/crates/toolkit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,24 @@ version = "0.1.0"
edition = "2021"

[dependencies]
semaphore = { git = "https://github.com/worldcoin/semaphore-rs", rev = "d0d1f899add7116ccc1228f5e5e5ee2e2e233768", features = [
"depth_30",
] }
world-chain-builder = { path = "../.." }
semaphore = { workspace = true, features = ["depth_30"] }
world-chain-builder-pbh = { workspace = true }

# Alloy
alloy-consensus = "0.3"
alloy-network = "0.3"
alloy-primitives = "0.8"
alloy-rlp = "0.3"
alloy-consensus = { workspace = true }
alloy-network = { workspace = true }
alloy-primitives = { workspace = true }
alloy-rlp = { workspace = true }

# 3rd party
bytes = "1.7.2"
clap = { version = "4", features = ["derive", "env"] }
eyre = { version = "0.6", package = "color-eyre" }
hex = "0.4.3"
reqwest = "0.12"
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1", features = ["full"] }
dotenvy = "0.15.7"
chrono = "0.4"
rand = "0.8.5"
bytes = { workspace = true }
clap = { workspace = true, features = ["derive", "env"] }
eyre = { workspace = true }
hex = { workspace = true }
reqwest = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_json = { workspace = true }
tokio = { workspace = true, features = ["full"] }
dotenvy = { workspace = true }
chrono = { workspace = true }
rand = { workspace = true }
2 changes: 1 addition & 1 deletion world-chain-builder/crates/toolkit/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use chrono::NaiveDate;
use clap::Parser;
use identity_source::IdentitySource;
use inclusion_proof_source::InclusionProofSource;
use world_chain_builder::pbh::external_nullifier::Prefix;
use world_chain_builder_pbh::external_nullifier::Prefix;

pub mod identity_source;
pub mod inclusion_proof_source;
Expand Down
8 changes: 4 additions & 4 deletions world-chain-builder/crates/toolkit/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ use semaphore::identity::Identity;
use semaphore::poseidon_tree::Proof;
use semaphore::{hash_to_field, Field};
use serde::{Deserialize, Serialize};
use world_chain_builder::pbh::date_marker::DateMarker;
use world_chain_builder::pbh::external_nullifier::ExternalNullifier;
use world_chain_builder::pbh::payload::PbhPayload;
use world_chain_builder_pbh::date_marker::DateMarker;
use world_chain_builder_pbh::external_nullifier::ExternalNullifier;
use world_chain_builder_pbh::payload::PbhPayload;

mod cli;

Expand Down Expand Up @@ -69,7 +69,7 @@ async fn main() -> eyre::Result<()> {
external_nullifier: external_nullifier.to_string(),
nullifier_hash,
root: inclusion_proof.root,
proof: world_chain_builder::pbh::payload::Proof(semaphore_proof),
proof: world_chain_builder_pbh::payload::Proof(semaphore_proof),
};

let encoded = alloy_rlp::encode(proof);
Expand Down
93 changes: 93 additions & 0 deletions world-chain-builder/crates/world/bin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
[package]
name = "world-chain-builder"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

[lints]
workspace = true

[dependencies]
# world-chain
world-chain-builder-node.workspace = true
world-chain-builder-rpc.workspace = true

# reth
reth-db.workspace = true

reth-primitives.workspace = true
reth-payload-builder.workspace = true
reth-payload-util.workspace = true
reth-payload-validator.workspace = true
reth-basic-payload-builder.workspace = true
reth-consensus.workspace = true
reth-cli-util.workspace = true
reth-node-builder.workspace = true
reth-tracing.workspace = true
reth-provider.workspace = true
reth-transaction-pool.workspace = true

reth-evm.workspace = true
reth-revm = { workspace = true, features = ["std"] }

reth-trie-db.workspace = true
reth-rpc-server-types.workspace = true
reth-tasks = { workspace = true, optional = true }

# op-reth
reth-optimism-cli.workspace = true
reth-optimism-payload-builder.workspace = true
reth-optimism-evm.workspace = true
reth-optimism-rpc.workspace = true
reth-optimism-chainspec.workspace = true
reth-optimism-consensus.workspace = true
reth-optimism-forks.workspace = true
reth-optimism-primitives = { workspace = true, features = ["serde"] }

# revm with required optimism features
revm = { workspace = true, features = ["secp256k1", "blst", "c-kzg"] }

# ethereum
alloy-eips.workspace = true
alloy-primitives.workspace = true
op-alloy-rpc-types-engine.workspace = true
alloy-rpc-types-engine.workspace = true
alloy-consensus.workspace = true

# misc
dotenvy.workspace = true
clap.workspace = true
serde.workspace = true
eyre.workspace = true
parking_lot.workspace = true

# rpc
serde_json.workspace = true

# test-utils dependencies
reth-e2e-test-utils = { workspace = true, optional = true }
alloy-genesis = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
tikv-jemallocator = { workspace = true, optional = true }

[dev-dependencies]
reth-optimism-node = { workspace = true, features = ["test-utils"] }
reth-db.workspace = true
reth-node-core.workspace = true
reth-node-builder = { workspace = true, features = ["test-utils"] }
reth-provider = { workspace = true, features = ["test-utils"] }
reth-revm = { workspace = true, features = ["test-utils"] }
reth-tasks.workspace = true

alloy-primitives.workspace = true
op-alloy-consensus.workspace = true
alloy-signer-local.workspace = true
alloy-network.workspace = true
alloy-consensus.workspace = true
futures.workspace = true

[features]
jemalloc = ["tikv-jemallocator"]
Loading

0 comments on commit 3abf63e

Please sign in to comment.