Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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,676 changes: 2,078 additions & 1,598 deletions Cargo.lock

Large diffs are not rendered by default.

185 changes: 113 additions & 72 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,94 +49,89 @@ codegen-units = 1
incremental = false

[workspace.dependencies]
reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-db-common = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-trie = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-trie-parallel = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-provider = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8", features = [
reth = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-chain-state = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-cli-util = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-db = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-db-common = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-errors = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-payload-builder = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-node-api = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-node-ethereum = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-trie = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-trie-parallel = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-basic-payload-builder = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-node-core = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-primitives = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-ethereum-primitives = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-primitives-traits = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-provider = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix", features = [
"test-utils",
] }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-execution-errors = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-exex = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-metrics = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-revm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-payload-util = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-rpc-layer = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-chainspec = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-evm = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-evm-ethereum = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-execution-errors = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-exex = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-metrics = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-trie-db = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-payload-primitives = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-transaction-pool = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-execution-types = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-revm = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-payload-builder-primitives = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-payload-util = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-rpc-layer = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-testing-utils = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }

# reth optimism
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-consensus = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-evm = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-txpool = { git = "https://github.com/paradigmxyz/reth", tag = "v1.4.8" }
reth-optimism-primitives = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-consensus = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-cli = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-forks = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-evm = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-node = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-payload-builder = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-chainspec = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }
reth-optimism-txpool = { git = "https://github.com/bharath-123/reth", branch = "bharath/fusaka-revm-fix" }


# compatible with reth v1.4.8 dependencies
revm = { version = "24.0.1", features = [
revm = { version = "27.0.1", features = [
"std",
"secp256k1",
"optional_balance_check",
], default-features = false }
revm-inspectors = { version = "0.23.0", default-features = false }
op-revm = { version = "5.0.0", default-features = false }
revm-inspectors = { version = "0.25.0", default-features = false }
revm-state = { version = "7.0.0", default-features = false }

ethereum_ssz_derive = "0.9.0"
ethereum_ssz = "0.9.0"

alloy-primitives = { version = "1.1.0", default-features = false }
alloy-primitives = { version = "1.2.0", default-features = false }
alloy-rlp = "0.3.10"
alloy-chains = "0.2.0"
alloy-evm = { version = "0.10", default-features = false }
alloy-provider = { version = "1.0.9", features = ["ipc", "pubsub"] }
alloy-pubsub = { version = "1.0.9" }
alloy-eips = { version = "1.0.9" }
alloy-rpc-types = { version = "1.0.9" }
alloy-json-rpc = { version = "1.0.9" }
alloy-transport-http = { version = "1.0.9" }
alloy-network = { version = "1.0.9" }
alloy-network-primitives = { version = "1.0.9" }
alloy-transport = { version = "1.0.9" }
alloy-node-bindings = { version = "1.0.9" }
alloy-consensus = { version = "1.0.9", features = ["kzg"] }
alloy-serde = { version = "1.0.9" }
alloy-rpc-types-beacon = { version = "1.0.9", features = ["ssz"] }
alloy-rpc-types-engine = { version = "1.0.9", features = ["ssz"] }
alloy-rpc-types-eth = { version = "1.0.9" }
alloy-signer-local = { version = "1.0.9" }
alloy-rpc-client = { version = "1.0.9" }
alloy-genesis = { version = "1.0.9" }
alloy-trie = { version = "0.8.1" }

# optimism
alloy-op-evm = { version = "0.5.0", default-features = false }
op-alloy-rpc-types = { version = "0.14.1", default-features = false }
op-alloy-rpc-types-engine = { version = "0.14.1", default-features = false }
op-alloy-rpc-jsonrpsee = { version = "0.14.1", default-features = false }
op-alloy-network = { version = "0.14.1", default-features = false }
op-alloy-consensus = { version = "0.14.1", default-features = false }
alloy-evm = { version = "0.13", default-features = false }
alloy-provider = { version = "1.0.16", features = ["ipc", "pubsub"] }
alloy-pubsub = { version = "1.0.16" }
alloy-eips = { version = "1.0.16" }
alloy-rpc-types = { version = "1.0.16" }
alloy-json-rpc = { version = "1.0.16" }
alloy-transport-http = { version = "1.0.16" }
alloy-network = { version = "1.0.16" }
alloy-network-primitives = { version = "1.0.16" }
alloy-transport = { version = "1.0.16" }
alloy-node-bindings = { version = "1.0.16" }
alloy-consensus = { version = "1.0.16" , features = ["kzg"] }
alloy-serde = { version = "1.0.16" }
alloy-rpc-types-beacon = { version = "1.0.16" , features = ["ssz"] }
alloy-rpc-types-engine = { version = "1.0.16" , features = ["ssz"] }
alloy-rpc-types-eth = { version = "1.0.16" }
alloy-signer-local = { version = "1.0.16" }
alloy-rpc-client = { version = "1.0.16" }
alloy-genesis = { version = "1.0.16" }
alloy-trie = { version = "0.8.1", default-features = false }
nybbles = { version = "0.3.3" }

async-trait = { version = "0.1.83" }
clap = { version = "4.4.3", features = ["derive", "env"] }
Expand Down Expand Up @@ -174,3 +169,49 @@ eth-sparse-mpt = { path = "crates/eth-sparse-mpt" }
rbuilder = { path = "crates/rbuilder" }
sysperf = { path = "crates/sysperf" }
metrics_macros = { path = "crates/rbuilder/src/telemetry/metrics_macros"}


[patch.crates-io]
alloy-consensus = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-contract = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-eips = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-genesis = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-json-rpc = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-network = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-network-primitives = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-provider = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-pubsub = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-client = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-admin = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-anvil = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-beacon = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-debug = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-engine = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-eth = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-mev = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-trace = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-rpc-types-txpool = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-serde = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-signer = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-signer-local = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-transport = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-transport-http = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-transport-ipc = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }
alloy-transport-ws = { git = "https://github.com/bharath-123/alloy", branch = "fusaka/devnet2" }

alloy-evm = { git = "https://github.com/alloy-rs/evm", branch = "fusaka/devnet2"}

revm = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-bytecode = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-database = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-state = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-handler = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-primitives = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-interpreter = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-inspector = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-context = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-context-interface = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-database-interface = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
revm-precompile = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
op-revm = { git = "https://github.com/bluealloy/revm", branch = "rakita/contract_size_limit" }
2 changes: 2 additions & 0 deletions crates/eth-sparse-mpt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ smallvec = "1.13.2"

tracing.workspace = true

nybbles.workspace = true

# reth
reth-errors.workspace = true
reth-execution-errors.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/eth-sparse-mpt/benches/trie_do_bench.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use eth_sparse_mpt::{
v1::sparse_mpt::{DiffTrie, FixedTrie},
v2::trie::{proof_store::ProofStore, Trie},
};
use reth_trie::Nibbles;
use nybbles::Nibbles;

fn prepare_key_value_data(n: usize) -> (Vec<Bytes>, Vec<Bytes>) {
let mut keys = Vec::with_capacity(n);
Expand Down
6 changes: 2 additions & 4 deletions crates/eth-sparse-mpt/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ use std::hash::{Hash, Hasher};

use alloy_primitives::{keccak256, Bytes};
use alloy_rlp::{length_of_length, BufMut, Encodable, Header, EMPTY_STRING_CODE};
use alloy_trie::{
nodes::{ExtensionNodeRef, LeafNodeRef},
Nibbles,
};
use alloy_trie::nodes::{ExtensionNodeRef, LeafNodeRef};
use nybbles::Nibbles;
use reth_trie::RlpNode;
use rustc_hash::{FxBuildHasher, FxHasher};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use crate::{
};
use alloy_primitives::Bytes;
use alloy_primitives::B256;
use alloy_trie::Nibbles;
use nybbles::Nibbles;

/// SparseTrieSharedCache is a storage for fetched parts of the ethereum tries
/// It should be created once for each parent block and can be shared with a different threads.
Expand Down
18 changes: 15 additions & 3 deletions crates/eth-sparse-mpt/src/v1/reth_sparse_trie/trie_fetcher/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_primitives::map::HashSet as AlloyHashSet;
use tracing::trace;

use alloy_primitives::{Bytes, B256};
use alloy_trie::Nibbles;
use nybbles::Nibbles;
use rayon::prelude::*;
use reth_errors::ProviderError;
use reth_execution_errors::trie::StateProofError;
Expand Down Expand Up @@ -194,7 +194,7 @@ fn convert_reth_multiproof(
) -> MultiProof {
let mut account_subtree = Vec::with_capacity(reth_proof.account_subtree.len());
for (k, v) in reth_proof.account_subtree.into_inner() {
account_subtree.push((k, v));
account_subtree.push((convert_reth_nybbles_to_nibbles(k), v));
}
account_subtree.sort_by_key(|a| a.0.clone());
let mut storages = hash_map_with_capacity(reth_proof.storages.len());
Expand All @@ -208,7 +208,7 @@ fn convert_reth_multiproof(
let mut subtree = Vec::with_capacity(reth_storage_proof.subtree.len());

for (k, v) in reth_storage_proof.subtree.into_inner() {
subtree.push((k, v));
subtree.push((convert_reth_nybbles_to_nibbles(k), v));
}
subtree.sort_by_key(|a| a.0.clone());
let v = StorageMultiProof { subtree };
Expand All @@ -219,3 +219,15 @@ fn convert_reth_multiproof(
storages,
}
}

pub fn convert_reth_nybbles_to_nibbles(n: reth_trie::Nibbles) -> Nibbles {
let mut nibbles = Nibbles::new();
nibbles.extend_from_slice_unchecked(n.to_vec().as_slice());
nibbles
}

pub fn convert_nibbles_to_reth_nybbles(n: Nibbles) -> reth_trie::Nibbles {
let mut nibbles = reth_trie::Nibbles::new();
nibbles.extend_from_slice(n.pack().as_slice());
nibbles
}
2 changes: 1 addition & 1 deletion crates/eth-sparse-mpt/src/v1/sparse_mpt/diff_trie/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::utils::{extract_prefix_and_suffix, rlp_pointer, strip_first_nibble_mut, HashMap};
use alloy_primitives::{keccak256, Bytes, B256};
use nybbles::Nibbles;
use parking_lot::Mutex;
use reth_trie::Nibbles;
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, Seq};

Expand Down
2 changes: 1 addition & 1 deletion crates/eth-sparse-mpt/src/v1/sparse_mpt/diff_trie/nodes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use crate::utils::{
encode_len_extension, encode_len_leaf, encode_null_node, rlp_pointer,
};
use alloy_primitives::Bytes;
use reth_trie::Nibbles;
use nybbles::Nibbles;
use serde::{Deserialize, Serialize};
use smallvec::SmallVec;
use std::sync::Arc;
Expand Down
2 changes: 1 addition & 1 deletion crates/eth-sparse-mpt/src/v1/sparse_mpt/fixed_trie.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use alloy_trie::nodes::{
BranchNode as AlloyBranchNode, ExtensionNode as AlloyExtensionNode, LeafNode as AlloyLeafNode,
TrieNode as AlloyTrieNode,
};
use reth_trie::Nibbles;
use nybbles::Nibbles;
use serde::{Deserialize, Serialize};
use serde_with::{serde_as, Seq};
use smallvec::SmallVec;
Expand Down
Loading