Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reth v1.1.4 #78

Merged
merged 49 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
7efba8e
bump reth in toml
0xOsiris Dec 12, 2024
c348ea0
wip
0xOsiris Dec 12, 2024
fb52689
fix: ValidatedPbhTransactions
0xOsiris Dec 12, 2024
0b2ad03
patch test API changes
0xOsiris Dec 12, 2024
2e4bbeb
fix: tests
0xOsiris Dec 12, 2024
41293aa
Dzejkop/reth-1.1.4 (#79)
Dzejkop Dec 13, 2024
ddee3a8
Bring back e2e tests - faiiling
Dzejkop Dec 13, 2024
87b16b7
No more popup & serial_test
Dzejkop Dec 13, 2024
1136be1
update pooled tx primitive
0xOsiris Dec 13, 2024
150be28
wip update payload builder initialization
0xKitsune Dec 13, 2024
c2b0228
impl PayloadBuilder for WorldChainPayloadBuilder
0xKitsune Dec 13, 2024
612ccba
feat: override
0xOsiris Dec 13, 2024
212bfcd
add payload builder ctx
0xKitsune Dec 13, 2024
fe17d65
chore: fmt
0xOsiris Dec 13, 2024
f981763
payload attributes wip
0xKitsune Dec 13, 2024
c16640d
Update builder ctx types
0xKitsune Dec 13, 2024
0785f81
feat: conditionally forward transactions
0xOsiris Dec 13, 2024
a81ff6f
Merge pull request #80 from worldcoin/osiris/rpc
0xOsiris Dec 13, 2024
a0a827c
pbh wip
0xKitsune Dec 13, 2024
ef9ce8e
wip
0xKitsune Dec 13, 2024
8e372a7
wip
0xKitsune Dec 13, 2024
6080b66
wip
0xKitsune Dec 13, 2024
5177e1f
wip
0xKitsune Dec 13, 2024
9ad0569
fix: BestTransactions iterator
0xOsiris Dec 13, 2024
d76dc79
feat(payload-builder): error handling
0xOsiris Dec 13, 2024
fb25f99
fix: payload builder
0xOsiris Dec 13, 2024
937ec92
clippy
0xKitsune Dec 14, 2024
994bf51
remove invalid txs
0xKitsune Dec 15, 2024
a77adca
Enable test_utils within pool crate
Dzejkop Dec 16, 2024
a2af9cf
Replace methods instead of merging
Dzejkop Dec 16, 2024
d53165e
simplify
Dzejkop Dec 16, 2024
f4af176
fmt
Dzejkop Dec 16, 2024
83dfca8
Add binginds
Dzejkop Dec 16, 2024
db9adee
wip
0xOsiris Dec 16, 2024
5d9ef17
feat: parse PbhPayload from UO signature
0xOsiris Dec 16, 2024
f3fceeb
wip
0xOsiris Dec 16, 2024
77dddb3
test: add 4337 bundle validation tests
0xOsiris Dec 16, 2024
9a12f85
remove parse_signature
0xOsiris Dec 16, 2024
d5a37f6
remove rwlock
0xKitsune Dec 17, 2024
087aa8f
Merge pull request #82 from worldcoin/kit/bundle-validation
0xOsiris Dec 17, 2024
305cc2d
rm mdbx db
0xOsiris Dec 17, 2024
2ea1fd3
update comments
0xOsiris Dec 17, 2024
5bd9bff
Merge branch 'osiris/bundle-validation' of https://github.com/worldco…
0xOsiris Dec 17, 2024
1fb3b99
Merge pull request #81 from worldcoin/osiris/bundle-validation
0xOsiris Dec 17, 2024
f56a6c2
reduce nesting
Dzejkop Dec 17, 2024
b55606e
WIP: Testing
Dzejkop Dec 17, 2024
d50e8bb
Fix: deleted curly brace
Dzejkop Dec 17, 2024
eb37438
Validate user ops and payload counts
Dzejkop Dec 17, 2024
b4ff6db
update signal hash computation
0xOsiris Dec 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading