mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: phase out reth-primitives from optimism consensus (#14548)
This commit is contained in:
@ -17,7 +17,6 @@ reth-execution-types.workspace = true
|
||||
reth-chainspec.workspace = true
|
||||
reth-consensus-common.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-primitives-traits.workspace = true
|
||||
reth-storage-api.workspace = true
|
||||
reth-storage-errors.workspace = true
|
||||
@ -26,7 +25,7 @@ reth-trie-common.workspace = true
|
||||
# op-reth
|
||||
reth-optimism-forks.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
# TODO: remove this after feature cleanup
|
||||
# remove this after feature cleanup
|
||||
reth-optimism-primitives = { workspace = true, features = ["serde", "reth-codec"] }
|
||||
|
||||
# ethereum
|
||||
@ -43,15 +42,15 @@ thiserror.workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
reth-provider = { workspace = true, features = ["test-utils"] }
|
||||
reth-trie-db.workspace = true
|
||||
reth-db-common.workspace = true
|
||||
reth-optimism-node.workspace = true
|
||||
reth-revm.workspace = true
|
||||
op-alloy-consensus.workspace = true
|
||||
reth-trie.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
reth-optimism-node.workspace = true
|
||||
|
||||
alloy-chains.workspace = true
|
||||
alloy-primitives.workspace = true
|
||||
reth-optimism-chainspec.workspace = true
|
||||
reth-trie.workspace = true
|
||||
op-alloy-consensus.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std"]
|
||||
@ -59,7 +58,6 @@ std = [
|
||||
"reth-chainspec/std",
|
||||
"reth-consensus/std",
|
||||
"reth-consensus-common/std",
|
||||
"reth-primitives/std",
|
||||
"reth-primitives-traits/std",
|
||||
"reth-optimism-forks/std",
|
||||
"reth-optimism-chainspec/std",
|
||||
|
||||
@ -25,8 +25,10 @@ use reth_consensus_common::validation::{
|
||||
use reth_execution_types::BlockExecutionResult;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::DepositReceipt;
|
||||
use reth_primitives::{GotExpected, NodePrimitives, RecoveredBlock, SealedHeader};
|
||||
use reth_primitives_traits::{Block, BlockBody, BlockHeader, SealedBlock};
|
||||
use reth_primitives_traits::{
|
||||
Block, BlockBody, BlockHeader, GotExpected, NodePrimitives, RecoveredBlock, SealedBlock,
|
||||
SealedHeader,
|
||||
};
|
||||
|
||||
mod proof;
|
||||
pub use proof::calculate_receipt_root_no_memo_optimism;
|
||||
|
||||
@ -1,12 +1,12 @@
|
||||
//! Helper function for Receipt root calculation for Optimism hardforks.
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use alloy_consensus::ReceiptWithBloom;
|
||||
use alloy_eips::eip2718::Encodable2718;
|
||||
use alloy_primitives::B256;
|
||||
use alloy_trie::root::ordered_trie_root_with_encoder;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::DepositReceipt;
|
||||
use reth_primitives::ReceiptWithBloom;
|
||||
|
||||
/// Calculates the receipt root for a header.
|
||||
pub(crate) fn calculate_receipt_root_optimism<R: DepositReceipt>(
|
||||
@ -79,12 +79,11 @@ pub fn calculate_receipt_root_no_memo_optimism<R: DepositReceipt>(
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_consensus::Receipt;
|
||||
use alloy_consensus::{Receipt, ReceiptWithBloom};
|
||||
use alloy_primitives::{b256, bloom, hex, Address, Bloom, Bytes, Log, LogData};
|
||||
use op_alloy_consensus::OpDepositReceipt;
|
||||
use reth_optimism_chainspec::BASE_SEPOLIA;
|
||||
use reth_optimism_primitives::OpReceipt;
|
||||
use reth_primitives::ReceiptWithBloom;
|
||||
|
||||
/// Tests that the receipt root is computed correctly for the regolith block.
|
||||
/// This was implemented due to a minor bug in op-geth and op-erigon where in
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
use alloy_consensus::BlockHeader;
|
||||
use alloy_trie::EMPTY_ROOT_HASH;
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_primitives::GotExpected;
|
||||
use reth_primitives_traits::GotExpected;
|
||||
|
||||
/// Verifies that withdrawals root in block header (Shanghai) is always [`EMPTY_ROOT_HASH`] in
|
||||
/// Canyon.
|
||||
|
||||
@ -13,7 +13,7 @@ use reth_chainspec::{BaseFeeParams, EthChainSpec};
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_optimism_forks::OpHardforks;
|
||||
use reth_optimism_primitives::DepositReceipt;
|
||||
use reth_primitives::{gas_spent_by_transactions, GotExpected};
|
||||
use reth_primitives_traits::{receipt::gas_spent_by_transactions, GotExpected};
|
||||
|
||||
/// Validate a block with regard to execution results:
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user