mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: alloy 0.14 (#15635)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -9,7 +9,7 @@ use alloy_eips::{
|
||||
};
|
||||
use alloy_primitives::{
|
||||
bytes::{Buf, BytesMut},
|
||||
keccak256, PrimitiveSignature as Signature, TxHash, B256, U256,
|
||||
keccak256, Signature, TxHash, B256, U256,
|
||||
};
|
||||
use alloy_rlp::{Decodable, Error as RlpError, RlpDecodable};
|
||||
use derive_more::{AsRef, Deref};
|
||||
|
||||
@@ -24,9 +24,7 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::OpChainSpec;
|
||||
use alloy_consensus::{Block, BlockBody, Header, TxEip1559};
|
||||
use alloy_primitives::{
|
||||
b256, Address, PrimitiveSignature as Signature, StorageKey, StorageValue, U256,
|
||||
};
|
||||
use alloy_primitives::{b256, Address, Signature, StorageKey, StorageValue, U256};
|
||||
use op_alloy_consensus::{OpTypedTransaction, TxDeposit};
|
||||
use op_revm::constants::L1_BLOCK_CONTRACT;
|
||||
use reth_chainspec::MIN_TRANSACTION_GAS;
|
||||
|
||||
@@ -384,7 +384,7 @@ impl<Txs> OpBuilder<'_, Txs> {
|
||||
let ExecutionWitnessRecord { hashed_state, codes, keys } =
|
||||
ExecutionWitnessRecord::from_executed_state(&db);
|
||||
let state = state_provider.witness(Default::default(), hashed_state)?;
|
||||
Ok(ExecutionWitness { state: state.into_iter().collect(), codes, keys })
|
||||
Ok(ExecutionWitness { state: state.into_iter().collect(), codes, keys, headers: vec![] })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ serde_with = { workspace = true, optional = true }
|
||||
|
||||
# misc
|
||||
derive_more = { workspace = true, features = ["deref", "from", "into", "constructor"] }
|
||||
rand = { workspace = true, optional = true }
|
||||
rand_08 = { workspace = true, optional = true }
|
||||
|
||||
# test
|
||||
arbitrary = { workspace = true, features = ["derive"], optional = true }
|
||||
@@ -52,6 +52,7 @@ arbitrary.workspace = true
|
||||
proptest-arbitrary-interop.workspace = true
|
||||
proptest.workspace = true
|
||||
rand.workspace = true
|
||||
rand_08.workspace = true
|
||||
reth-codecs = { workspace = true, features = ["test-utils", "op"] }
|
||||
rstest.workspace = true
|
||||
secp256k1 = { workspace = true, features = ["rand"] }
|
||||
@@ -101,11 +102,12 @@ serde = [
|
||||
"bytes?/serde",
|
||||
"reth-codecs?/serde",
|
||||
"op-alloy-consensus/serde",
|
||||
"rand?/serde",
|
||||
"rand_08?/serde",
|
||||
"secp256k1?/serde",
|
||||
"op-revm/serde",
|
||||
"alloy-rpc-types-eth?/serde",
|
||||
"revm-context/serde",
|
||||
"rand/serde",
|
||||
]
|
||||
serde-bincode-compat = [
|
||||
"serde",
|
||||
@@ -126,7 +128,7 @@ arbitrary = [
|
||||
"alloy-consensus/arbitrary",
|
||||
"alloy-eips/arbitrary",
|
||||
"alloy-primitives/arbitrary",
|
||||
"rand",
|
||||
"rand_08",
|
||||
"alloy-rpc-types-eth?/arbitrary",
|
||||
"alloy-serde?/arbitrary",
|
||||
]
|
||||
|
||||
@@ -439,7 +439,7 @@ pub(super) mod serde_bincode_compat {
|
||||
}
|
||||
|
||||
let mut bytes = [0u8; 1024];
|
||||
rand::thread_rng().fill(bytes.as_mut_slice());
|
||||
rand::rng().fill(bytes.as_mut_slice());
|
||||
let mut data = Data {
|
||||
reseipt: OpReceipt::arbitrary(&mut arbitrary::Unstructured::new(&bytes)).unwrap(),
|
||||
};
|
||||
|
||||
@@ -13,9 +13,7 @@ use alloy_eips::{
|
||||
eip7702::SignedAuthorization,
|
||||
};
|
||||
use alloy_evm::{FromRecoveredTx, FromTxWithEncoded};
|
||||
use alloy_primitives::{
|
||||
keccak256, Address, Bytes, PrimitiveSignature as Signature, TxHash, TxKind, Uint, B256,
|
||||
};
|
||||
use alloy_primitives::{keccak256, Address, Bytes, Signature, TxHash, TxKind, Uint, B256};
|
||||
use alloy_rlp::Header;
|
||||
use core::{
|
||||
hash::{Hash, Hasher},
|
||||
@@ -650,7 +648,7 @@ impl<'a> arbitrary::Arbitrary<'a> for OpTransactionSigned {
|
||||
let mut transaction = OpTypedTransaction::arbitrary(u)?;
|
||||
|
||||
let secp = secp256k1::Secp256k1::new();
|
||||
let key_pair = secp256k1::Keypair::new(&secp, &mut rand::thread_rng());
|
||||
let key_pair = secp256k1::Keypair::new(&secp, &mut rand_08::thread_rng());
|
||||
let signature = reth_primitives_traits::crypto::secp256k1::sign_message(
|
||||
B256::from_slice(&key_pair.secret_bytes()[..]),
|
||||
signature_hash(&transaction),
|
||||
@@ -730,7 +728,7 @@ pub mod serde_bincode_compat {
|
||||
use alloy_consensus::transaction::serde_bincode_compat::{
|
||||
TxEip1559, TxEip2930, TxEip7702, TxLegacy,
|
||||
};
|
||||
use alloy_primitives::{PrimitiveSignature as Signature, TxHash};
|
||||
use alloy_primitives::{Signature, TxHash};
|
||||
use reth_primitives_traits::{serde_bincode_compat::SerdeBincodeCompat, SignedTransaction};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//! Loads and formats OP transaction RPC response.
|
||||
|
||||
use alloy_consensus::{transaction::Recovered, Transaction as _};
|
||||
use alloy_primitives::{Bytes, PrimitiveSignature as Signature, Sealable, Sealed, B256};
|
||||
use alloy_primitives::{Bytes, Sealable, Sealed, Signature, B256};
|
||||
use alloy_rpc_types_eth::TransactionInfo;
|
||||
use op_alloy_consensus::OpTxEnvelope;
|
||||
use op_alloy_rpc_types::{OpTransactionRequest, Transaction};
|
||||
|
||||
@@ -284,7 +284,7 @@ mod tests {
|
||||
use crate::{OpPooledTransaction, OpTransactionValidator};
|
||||
use alloy_consensus::transaction::Recovered;
|
||||
use alloy_eips::eip2718::Encodable2718;
|
||||
use alloy_primitives::{PrimitiveSignature as Signature, TxKind, U256};
|
||||
use alloy_primitives::{Signature, TxKind, U256};
|
||||
use op_alloy_consensus::{OpTypedTransaction, TxDeposit};
|
||||
use reth_optimism_chainspec::OP_MAINNET;
|
||||
use reth_optimism_primitives::OpTransactionSigned;
|
||||
|
||||
Reference in New Issue
Block a user