mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix(evm): validate requests in block post-execution (#8529)
This commit is contained in:
1
Cargo.lock
generated
1
Cargo.lock
generated
@ -6837,7 +6837,6 @@ dependencies = [
|
||||
name = "reth-evm-ethereum"
|
||||
version = "0.2.0-beta.7"
|
||||
dependencies = [
|
||||
"alloy-consensus 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7320d4c)",
|
||||
"alloy-eips 0.1.0 (git+https://github.com/alloy-rs/alloy?rev=7320d4c)",
|
||||
"alloy-sol-types",
|
||||
"reth-ethereum-consensus",
|
||||
|
||||
@ -21,7 +21,6 @@ reth-ethereum-consensus.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
|
||||
# Alloy
|
||||
alloy-consensus.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
alloy-sol-types.workspace = true
|
||||
|
||||
|
||||
@ -1,9 +1,8 @@
|
||||
//! EIP-6110 deposit requests parsing
|
||||
use alloy_consensus::Request;
|
||||
use alloy_eips::eip6110::{DepositRequest, MAINNET_DEPOSIT_CONTRACT_ADDRESS};
|
||||
use alloy_sol_types::{sol, SolEvent};
|
||||
use reth_evm::execute::BlockValidationError;
|
||||
use reth_primitives::{ChainSpec, Receipt};
|
||||
use reth_primitives::{ChainSpec, Receipt, Request};
|
||||
use revm_primitives::Log;
|
||||
|
||||
sol! {
|
||||
|
||||
@ -412,7 +412,7 @@ where
|
||||
let EthExecuteOutput { receipts, requests, gas_used: _ } =
|
||||
self.executor.execute_without_verification(block, total_difficulty)?;
|
||||
|
||||
validate_block_post_execution(block, self.executor.chain_spec(), &receipts, &[])?;
|
||||
validate_block_post_execution(block, self.executor.chain_spec(), &receipts, &requests)?;
|
||||
|
||||
// prepare the state according to the prune mode
|
||||
let retention = self.batch_record.bundle_retention(block.number);
|
||||
@ -460,8 +460,9 @@ mod tests {
|
||||
eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE},
|
||||
};
|
||||
use reth_primitives::{
|
||||
constants::ETH_TO_WEI, keccak256, public_key_to_address, trie::EMPTY_ROOT_HASH, Account,
|
||||
Block, ChainSpecBuilder, ForkCondition, Transaction, TxKind, TxLegacy, B256,
|
||||
constants::{EMPTY_ROOT_HASH, ETH_TO_WEI},
|
||||
keccak256, public_key_to_address, Account, Block, ChainSpecBuilder, ForkCondition,
|
||||
Transaction, TxKind, TxLegacy, B256,
|
||||
};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase, state_change::HISTORY_SERVE_WINDOW,
|
||||
|
||||
Reference in New Issue
Block a user