mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(ethereum): replace reth-primitives with alloy (#11155)
Signed-off-by: Abhishekkochar <abhishekkochar2@gmail.com>
This commit is contained in:
5
Cargo.lock
generated
5
Cargo.lock
generated
@ -7188,6 +7188,7 @@ dependencies = [
|
||||
name = "reth-ethereum-consensus"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"reth-chainspec",
|
||||
"reth-consensus",
|
||||
"reth-consensus-common",
|
||||
@ -7199,6 +7200,8 @@ dependencies = [
|
||||
name = "reth-ethereum-engine-primitives"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-primitives",
|
||||
"alloy-rlp",
|
||||
"reth-chain-state",
|
||||
"reth-chainspec",
|
||||
@ -7235,6 +7238,7 @@ dependencies = [
|
||||
name = "reth-ethereum-payload-builder"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-primitives",
|
||||
"reth-basic-payload-builder",
|
||||
"reth-chain-state",
|
||||
"reth-errors",
|
||||
@ -7288,6 +7292,7 @@ name = "reth-evm-ethereum"
|
||||
version = "1.0.7"
|
||||
dependencies = [
|
||||
"alloy-eips",
|
||||
"alloy-primitives",
|
||||
"alloy-sol-types",
|
||||
"reth-chainspec",
|
||||
"reth-ethereum-consensus",
|
||||
|
||||
@ -17,4 +17,7 @@ reth-consensus-common.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-consensus.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
tracing.workspace = true
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
|
||||
use alloy_primitives::U256;
|
||||
use reth_chainspec::{EthChainSpec, EthereumHardfork, EthereumHardforks};
|
||||
use reth_consensus::{Consensus, ConsensusError, PostExecutionInput};
|
||||
use reth_consensus_common::validation::{
|
||||
@ -18,7 +19,7 @@ use reth_consensus_common::validation::{
|
||||
};
|
||||
use reth_primitives::{
|
||||
constants::MINIMUM_GAS_LIMIT, BlockWithSenders, Header, SealedBlock, SealedHeader,
|
||||
EMPTY_OMMER_ROOT_HASH, U256,
|
||||
EMPTY_OMMER_ROOT_HASH,
|
||||
};
|
||||
use std::{fmt::Debug, sync::Arc, time::SystemTime};
|
||||
|
||||
@ -232,8 +233,9 @@ impl<ChainSpec: Send + Sync + EthChainSpec + EthereumHardforks + Debug> Consensu
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::{Sealable, B256};
|
||||
use reth_chainspec::{ChainSpec, ChainSpecBuilder};
|
||||
use reth_primitives::{alloy_primitives::Sealable, proofs, B256};
|
||||
use reth_primitives::proofs;
|
||||
|
||||
fn header_with_gas_limit(gas_limit: u64) -> SealedHeader {
|
||||
let header = Header { gas_limit: gas_limit.into(), ..Default::default() };
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
use alloy_primitives::{Bloom, B256};
|
||||
use reth_chainspec::EthereumHardforks;
|
||||
use reth_consensus::ConsensusError;
|
||||
use reth_primitives::{
|
||||
gas_spent_by_transactions, BlockWithSenders, Bloom, GotExpected, Receipt, Request, B256,
|
||||
};
|
||||
use reth_primitives::{gas_spent_by_transactions, BlockWithSenders, GotExpected, Receipt, Request};
|
||||
|
||||
/// Validate a block with regard to execution results:
|
||||
///
|
||||
|
||||
@ -21,6 +21,10 @@ reth-rpc-types-compat.workspace = true
|
||||
alloy-rlp.workspace = true
|
||||
reth-chain-state.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
|
||||
# misc
|
||||
serde.workspace = true
|
||||
sha2.workspace = true
|
||||
|
||||
@ -1,9 +1,11 @@
|
||||
//! Contains types required for building a payload.
|
||||
|
||||
use alloy_eips::eip4844::BlobTransactionSidecar;
|
||||
use alloy_primitives::{Address, B256, U256};
|
||||
use alloy_rlp::Encodable;
|
||||
use reth_chain_state::ExecutedBlock;
|
||||
use reth_payload_primitives::{BuiltPayload, PayloadBuilderAttributes};
|
||||
use reth_primitives::{Address, BlobTransactionSidecar, SealedBlock, Withdrawals, B256, U256};
|
||||
use reth_primitives::{SealedBlock, Withdrawals};
|
||||
use reth_rpc_types::engine::{
|
||||
ExecutionPayloadEnvelopeV2, ExecutionPayloadEnvelopeV3, ExecutionPayloadEnvelopeV4,
|
||||
ExecutionPayloadV1, PayloadAttributes, PayloadId,
|
||||
|
||||
@ -25,6 +25,7 @@ reth-execution-types.workspace = true
|
||||
revm-primitives.workspace = true
|
||||
|
||||
# Alloy
|
||||
alloy-primitives.workspace = true
|
||||
alloy-eips.workspace = true
|
||||
alloy-sol-types.workspace = true
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
//! DAO Fork related constants from [EIP-779](https://eips.ethereum.org/EIPS/eip-779).
|
||||
//! It happened on Ethereum block 1_920_000
|
||||
|
||||
use reth_primitives::{address, Address};
|
||||
use alloy_primitives::{address, Address};
|
||||
|
||||
/// Dao hardfork beneficiary that received ether from accounts from DAO and DAO creator children.
|
||||
pub static DAO_HARDFORK_BENEFICIARY: Address = address!("bf4ed7b27f1d666546e30d74d50d173d20bca754");
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
//! EIP-6110 deposit requests parsing
|
||||
use alloc::{string::ToString, vec::Vec};
|
||||
use alloy_eips::eip6110::{DepositRequest, MAINNET_DEPOSIT_CONTRACT_ADDRESS};
|
||||
use alloy_primitives::Log;
|
||||
use alloy_sol_types::{sol, SolEvent};
|
||||
use reth_chainspec::ChainSpec;
|
||||
use reth_evm::execute::BlockValidationError;
|
||||
use reth_primitives::{Receipt, Request};
|
||||
use revm_primitives::Log;
|
||||
|
||||
sol! {
|
||||
#[allow(missing_docs)]
|
||||
|
||||
@ -5,6 +5,7 @@ use crate::{
|
||||
EthEvmConfig,
|
||||
};
|
||||
use alloc::{boxed::Box, sync::Arc, vec, vec::Vec};
|
||||
use alloy_primitives::{BlockNumber, U256};
|
||||
use core::fmt::Display;
|
||||
use reth_chainspec::{ChainSpec, EthereumHardforks, MAINNET};
|
||||
use reth_ethereum_consensus::validate_block_post_execution;
|
||||
@ -20,9 +21,7 @@ use reth_evm::{
|
||||
ConfigureEvm,
|
||||
};
|
||||
use reth_execution_types::ExecutionOutcome;
|
||||
use reth_primitives::{
|
||||
BlockNumber, BlockWithSenders, EthereumHardfork, Header, Receipt, Request, U256,
|
||||
};
|
||||
use reth_primitives::{BlockWithSenders, EthereumHardfork, Header, Receipt, Request};
|
||||
use reth_prune_types::PruneModes;
|
||||
use reth_revm::{
|
||||
batch::BlockBatchRecord,
|
||||
@ -478,17 +477,17 @@ mod tests {
|
||||
eip4788::{BEACON_ROOTS_ADDRESS, BEACON_ROOTS_CODE, SYSTEM_ADDRESS},
|
||||
eip7002::{WITHDRAWAL_REQUEST_PREDEPLOY_ADDRESS, WITHDRAWAL_REQUEST_PREDEPLOY_CODE},
|
||||
};
|
||||
use alloy_primitives::{b256, fixed_bytes, keccak256, Bytes, TxKind, B256};
|
||||
use reth_chainspec::{ChainSpecBuilder, ForkCondition};
|
||||
use reth_primitives::{
|
||||
constants::{EMPTY_ROOT_HASH, ETH_TO_WEI},
|
||||
keccak256, public_key_to_address, Account, Block, BlockBody, Transaction, TxKind, TxLegacy,
|
||||
B256,
|
||||
public_key_to_address, Account, Block, BlockBody, Transaction, TxLegacy,
|
||||
};
|
||||
use reth_revm::{
|
||||
database::StateProviderDatabase, test_utils::StateProviderTest, TransitionState,
|
||||
};
|
||||
use reth_testing_utils::generators::{self, sign_tx_with_key_pair};
|
||||
use revm_primitives::{b256, fixed_bytes, Bytes, BLOCKHASH_SERVE_WINDOW};
|
||||
use revm_primitives::BLOCKHASH_SERVE_WINDOW;
|
||||
use secp256k1::{Keypair, Secp256k1};
|
||||
use std::collections::HashMap;
|
||||
|
||||
|
||||
@ -12,12 +12,12 @@
|
||||
extern crate alloc;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use alloy_primitives::{Address, Bytes, TxKind, U256};
|
||||
use reth_chainspec::{ChainSpec, Head};
|
||||
use reth_evm::{ConfigureEvm, ConfigureEvmEnv, NextBlockEnvAttributes};
|
||||
use reth_primitives::{transaction::FillTxEnv, Address, Header, TransactionSigned, U256};
|
||||
use reth_primitives::{transaction::FillTxEnv, Header, TransactionSigned};
|
||||
use revm_primitives::{
|
||||
AnalysisKind, BlobExcessGasAndPrice, BlockEnv, Bytes, CfgEnv, CfgEnvWithHandlerCfg, Env,
|
||||
SpecId, TxEnv, TxKind,
|
||||
AnalysisKind, BlobExcessGasAndPrice, BlockEnv, CfgEnv, CfgEnvWithHandlerCfg, Env, SpecId, TxEnv,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
|
||||
@ -194,11 +194,12 @@ impl ConfigureEvm for EthEvmConfig {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use alloy_primitives::{B256, U256};
|
||||
use reth_chainspec::{Chain, ChainSpec, MAINNET};
|
||||
use reth_evm::execute::ProviderError;
|
||||
use reth_primitives::{
|
||||
revm_primitives::{BlockEnv, CfgEnv, SpecId},
|
||||
Genesis, Header, B256, KECCAK_EMPTY, U256,
|
||||
Genesis, Header, KECCAK_EMPTY,
|
||||
};
|
||||
use reth_revm::{
|
||||
db::{CacheDB, EmptyDBTyped},
|
||||
|
||||
@ -30,5 +30,8 @@ reth-chain-state.workspace = true
|
||||
# ethereum
|
||||
revm.workspace = true
|
||||
|
||||
# alloy
|
||||
alloy-primitives.workspace = true
|
||||
|
||||
# misc
|
||||
tracing.workspace = true
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
|
||||
#![allow(clippy::useless_let_if_seq)]
|
||||
|
||||
use alloy_primitives::U256;
|
||||
use reth_basic_payload_builder::{
|
||||
commit_withdrawals, is_better_payload, BuildArguments, BuildOutcome, PayloadBuilder,
|
||||
PayloadConfig, WithdrawalsOutcome,
|
||||
@ -33,7 +34,7 @@ use reth_primitives::{
|
||||
proofs::{self, calculate_requests_root},
|
||||
revm_primitives::{BlockEnv, CfgEnvWithHandlerCfg},
|
||||
Block, BlockBody, EthereumHardforks, Header, IntoRecoveredTransaction, Receipt,
|
||||
EMPTY_OMMER_ROOT_HASH, U256,
|
||||
EMPTY_OMMER_ROOT_HASH,
|
||||
};
|
||||
use reth_provider::StateProviderFactory;
|
||||
use reth_revm::database::StateProviderDatabase;
|
||||
|
||||
Reference in New Issue
Block a user