mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
perf: use ExecutionResult::into_logs (#2184)
This commit is contained in:
567
Cargo.lock
generated
567
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -17,7 +17,7 @@ reth-consensus-common = { path = "../../consensus/common" }
|
|||||||
reth-revm-primitives = { path = "../../revm/revm-primitives" }
|
reth-revm-primitives = { path = "../../revm/revm-primitives" }
|
||||||
|
|
||||||
## ethereum
|
## ethereum
|
||||||
revm-primitives = "1"
|
revm-primitives = "1.1"
|
||||||
|
|
||||||
## async
|
## async
|
||||||
tokio = { version = "1", features = ["sync"] }
|
tokio = { version = "1", features = ["sync"] }
|
||||||
|
|||||||
@ -11,7 +11,7 @@ description = "revm inspector implementations used by reth"
|
|||||||
reth-primitives = { path = "../../primitives" }
|
reth-primitives = { path = "../../primitives" }
|
||||||
reth-rpc-types = { path = "../../rpc/rpc-types" }
|
reth-rpc-types = { path = "../../rpc/rpc-types" }
|
||||||
|
|
||||||
revm = { version = "3.1.0" }
|
revm = { version = "3" }
|
||||||
# remove from reth and reexport from revm
|
# remove from reth and reexport from revm
|
||||||
hashbrown = "0.13"
|
hashbrown = "0.13"
|
||||||
|
|
||||||
|
|||||||
@ -10,4 +10,4 @@ description = "core reth specific revm utilities"
|
|||||||
# reth
|
# reth
|
||||||
reth-primitives = { path = "../../primitives" }
|
reth-primitives = { path = "../../primitives" }
|
||||||
|
|
||||||
revm = { version = "3.1.0" }
|
revm = { version = "3" }
|
||||||
|
|||||||
@ -9,7 +9,7 @@ use reth_consensus_common::calc;
|
|||||||
use reth_executor::post_state::PostState;
|
use reth_executor::post_state::PostState;
|
||||||
use reth_interfaces::executor::Error;
|
use reth_interfaces::executor::Error;
|
||||||
use reth_primitives::{
|
use reth_primitives::{
|
||||||
Account, Address, Block, Bloom, Bytecode, ChainSpec, Hardfork, Header, Log, Receipt,
|
Account, Address, Block, Bloom, Bytecode, ChainSpec, Hardfork, Header, Receipt,
|
||||||
ReceiptWithBloom, TransactionSigned, Withdrawal, H256, U256,
|
ReceiptWithBloom, TransactionSigned, Withdrawal, H256, U256,
|
||||||
};
|
};
|
||||||
use reth_provider::{BlockExecutor, StateProvider};
|
use reth_provider::{BlockExecutor, StateProvider};
|
||||||
@ -241,9 +241,6 @@ where
|
|||||||
// append gas used
|
// append gas used
|
||||||
cumulative_gas_used += result.gas_used();
|
cumulative_gas_used += result.gas_used();
|
||||||
|
|
||||||
// cast revm logs to reth logs
|
|
||||||
let logs: Vec<Log> = result.logs().into_iter().map(into_reth_log).collect();
|
|
||||||
|
|
||||||
// Push transaction changeset and calculate header bloom filter for receipt.
|
// Push transaction changeset and calculate header bloom filter for receipt.
|
||||||
post_state.add_receipt(Receipt {
|
post_state.add_receipt(Receipt {
|
||||||
tx_type: transaction.tx_type(),
|
tx_type: transaction.tx_type(),
|
||||||
@ -251,7 +248,8 @@ where
|
|||||||
// receipts`.
|
// receipts`.
|
||||||
success: result.is_success(),
|
success: result.is_success(),
|
||||||
cumulative_gas_used,
|
cumulative_gas_used,
|
||||||
logs,
|
// convert to reth log
|
||||||
|
logs: result.into_logs().into_iter().map(into_reth_log).collect(),
|
||||||
});
|
});
|
||||||
post_state.finish_transition();
|
post_state.finish_transition();
|
||||||
}
|
}
|
||||||
|
|||||||
@ -13,7 +13,7 @@ bytes = { version = "1", default-features = false }
|
|||||||
ethnum = { version = "1", default-features = false, optional = true }
|
ethnum = { version = "1", default-features = false, optional = true }
|
||||||
smol_str = { version = "0.1", default-features = false, optional = true }
|
smol_str = { version = "0.1", default-features = false, optional = true }
|
||||||
ethereum-types = { version = "0.14", features = ["codec"], optional = true }
|
ethereum-types = { version = "0.14", features = ["codec"], optional = true }
|
||||||
revm-primitives = { version = "1.1.0", features = ["serde"] }
|
revm-primitives = { version = "1.1", features = ["serde"] }
|
||||||
reth-rlp-derive = { version = "0.1", path = "./rlp-derive", optional = true }
|
reth-rlp-derive = { version = "0.1", path = "./rlp-derive", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
|||||||
@ -25,7 +25,7 @@ reth-revm = { path = "../../revm" }
|
|||||||
reth-tasks = { path = "../../tasks" }
|
reth-tasks = { path = "../../tasks" }
|
||||||
|
|
||||||
# eth
|
# eth
|
||||||
revm = { version = "3.1.0", features = ["optional_block_gas_limit", "optional_eip3607", "optional_no_base_fee"] }
|
revm = { version = "3", features = ["optional_block_gas_limit", "optional_eip3607", "optional_no_base_fee"] }
|
||||||
ethers-core = { git = "https://github.com/gakonst/ethers-rs", features = ["eip712"] }
|
ethers-core = { git = "https://github.com/gakonst/ethers-rs", features = ["eip712"] }
|
||||||
revm-primitives = { version = "1.1", features = ["serde"] }
|
revm-primitives = { version = "1.1", features = ["serde"] }
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ arbitrary = [
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
bytes = "1.4"
|
bytes = "1.4"
|
||||||
codecs-derive = { version = "0.1.0", path = "./derive", default-features = false }
|
codecs-derive = { version = "0.1.0", path = "./derive", default-features = false }
|
||||||
revm-primitives = { version = "1.1.0", features = ["serde"] }
|
revm-primitives = { version = "1.1", features = ["serde"] }
|
||||||
|
|
||||||
# arbitrary utils
|
# arbitrary utils
|
||||||
arbitrary = { version = "1.1.7", features = ["derive"], optional = true }
|
arbitrary = { version = "1.1.7", features = ["derive"], optional = true }
|
||||||
@ -31,7 +31,7 @@ proptest = { version = "1.0", optional = true }
|
|||||||
proptest-derive = { version = "0.3", optional = true }
|
proptest-derive = { version = "0.3", optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
revm-primitives = {version = "1.1.0", features = [
|
revm-primitives = { version = "1.1", features = [
|
||||||
"serde",
|
"serde",
|
||||||
"arbitrary"
|
"arbitrary"
|
||||||
] }
|
] }
|
||||||
|
|||||||
Reference in New Issue
Block a user