mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore: remove reth-primitives dep from op-primitives (#13699)
This commit is contained in:
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -7150,7 +7150,6 @@ dependencies = [
|
||||
"reth-payload-builder",
|
||||
"reth-payload-builder-primitives",
|
||||
"reth-payload-primitives",
|
||||
"reth-primitives",
|
||||
"reth-provider",
|
||||
"reth-rpc-api",
|
||||
"reth-rpc-eth-api",
|
||||
@ -8499,7 +8498,6 @@ dependencies = [
|
||||
"proptest-arbitrary-interop",
|
||||
"rand 0.8.5",
|
||||
"reth-codecs",
|
||||
"reth-primitives",
|
||||
"reth-primitives-traits",
|
||||
"reth-zstd-compressors",
|
||||
"revm-primitives",
|
||||
|
||||
@ -22,7 +22,6 @@ reth-rpc-api = { workspace = true, features = ["client"] }
|
||||
reth-payload-builder = { workspace = true, features = ["test-utils"] }
|
||||
reth-payload-builder-primitives.workspace = true
|
||||
reth-payload-primitives.workspace = true
|
||||
reth-primitives.workspace = true
|
||||
reth-provider.workspace = true
|
||||
reth-network.workspace = true
|
||||
reth-node-api.workspace = true
|
||||
@ -35,7 +34,7 @@ reth-engine-local.workspace = true
|
||||
reth-tasks.workspace = true
|
||||
|
||||
# currently need to enable this for workspace level
|
||||
reth-optimism-primitives = { workspace = true, features = ["arbitrary"] }
|
||||
reth-optimism-primitives = { workspace = true, features = ["arbitrary", "serde"] }
|
||||
|
||||
# rpc
|
||||
jsonrpsee.workspace = true
|
||||
|
||||
@ -13,7 +13,6 @@ workspace = true
|
||||
|
||||
[dependencies]
|
||||
# reth
|
||||
reth-primitives.workspace = true
|
||||
reth-primitives-traits = { workspace = true, features = ["op"] }
|
||||
reth-codecs = { workspace = true, optional = true, features = ["op"] }
|
||||
reth-zstd-compressors = { workspace = true, optional = true }
|
||||
@ -48,13 +47,13 @@ proptest-arbitrary-interop.workspace = true
|
||||
reth-codecs = { workspace = true, features = ["test-utils", "op"] }
|
||||
rstest.workspace = true
|
||||
arbitrary.workspace = true
|
||||
secp256k1 = { workspace = true, features = ["rand"] }
|
||||
proptest.workspace = true
|
||||
|
||||
[features]
|
||||
default = ["std", "serde"]
|
||||
default = ["std"]
|
||||
std = [
|
||||
"reth-primitives-traits/std",
|
||||
"reth-primitives/std",
|
||||
"reth-codecs?/std",
|
||||
"alloy-consensus/std",
|
||||
"alloy-eips/std",
|
||||
@ -74,10 +73,8 @@ reth-codec = [
|
||||
"std",
|
||||
"dep:proptest",
|
||||
"dep:arbitrary",
|
||||
"reth-primitives/reth-codec",
|
||||
"reth-primitives-traits/reth-codec",
|
||||
"reth-codecs?/op",
|
||||
"reth-primitives/reth-codec",
|
||||
"dep:bytes",
|
||||
"dep:modular-bitfield",
|
||||
"dep:reth-zstd-compressors"
|
||||
@ -99,14 +96,13 @@ serde-bincode-compat = [
|
||||
"alloy-consensus/serde-bincode-compat",
|
||||
"alloy-eips/serde-bincode-compat",
|
||||
"op-alloy-consensus/serde-bincode-compat",
|
||||
"reth-primitives/serde-bincode-compat",
|
||||
"reth-primitives-traits/serde-bincode-compat"
|
||||
]
|
||||
arbitrary = [
|
||||
"dep:arbitrary",
|
||||
"dep:secp256k1",
|
||||
"secp256k1?/rand",
|
||||
"reth-primitives-traits/arbitrary",
|
||||
"reth-primitives/arbitrary",
|
||||
"reth-codecs?/arbitrary",
|
||||
"op-alloy-consensus/arbitrary",
|
||||
"alloy-consensus/arbitrary",
|
||||
@ -118,5 +114,4 @@ arbitrary = [
|
||||
optimism = [
|
||||
"dep:revm-primitives",
|
||||
"revm-primitives/optimism",
|
||||
"reth-primitives/optimism"
|
||||
]
|
||||
|
||||
@ -21,7 +21,7 @@ mod receipt;
|
||||
pub use receipt::OpReceipt;
|
||||
|
||||
/// Optimism-specific block type.
|
||||
pub type OpBlock = reth_primitives::Block<OpTransactionSigned>;
|
||||
pub type OpBlock = alloy_consensus::Block<OpTransactionSigned>;
|
||||
|
||||
/// Optimism-specific block body type.
|
||||
pub type OpBlockBody = <OpBlock as Block>::Body;
|
||||
@ -31,7 +31,7 @@ pub type OpBlockBody = <OpBlock as Block>::Body;
|
||||
pub struct OpPrimitives;
|
||||
|
||||
#[cfg(feature = "optimism")]
|
||||
impl reth_primitives::NodePrimitives for OpPrimitives {
|
||||
impl reth_primitives_traits::NodePrimitives for OpPrimitives {
|
||||
type Block = OpBlock;
|
||||
type BlockHeader = alloy_consensus::Header;
|
||||
type BlockBody = OpBlockBody;
|
||||
|
||||
@ -26,7 +26,7 @@ use op_alloy_consensus::{OpPooledTransaction, OpTypedTransaction, TxDeposit};
|
||||
#[cfg(any(test, feature = "reth-codec"))]
|
||||
use proptest as _;
|
||||
use reth_primitives_traits::{
|
||||
crypto::secp256k1::{recover_signer, recover_signer_unchecked, sign_message},
|
||||
crypto::secp256k1::{recover_signer, recover_signer_unchecked},
|
||||
transaction::error::TransactionConversionError,
|
||||
InMemorySize, SignedTransaction,
|
||||
};
|
||||
@ -519,7 +519,7 @@ impl<'a> arbitrary::Arbitrary<'a> for OpTransactionSigned {
|
||||
|
||||
let secp = secp256k1::Secp256k1::new();
|
||||
let key_pair = secp256k1::Keypair::new(&secp, &mut rand::thread_rng());
|
||||
let signature = sign_message(
|
||||
let signature = reth_primitives_traits::crypto::secp256k1::sign_message(
|
||||
B256::from_slice(&key_pair.secret_bytes()[..]),
|
||||
signature_hash(&transaction),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user