mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-02 16:21:42 +00:00
Remove ethers-core from execution_layer (#8149)
#6022 Use `alloy_rpc_types::Transaction` to replace the `ethers_core::Transaction` inside the execution block generator. Co-Authored-By: Mac L <mjladson@pm.me>
This commit is contained in:
@@ -8,13 +8,13 @@ edition = { workspace = true }
|
||||
alloy-consensus = { workspace = true }
|
||||
alloy-primitives = { workspace = true }
|
||||
alloy-rlp = { workspace = true }
|
||||
alloy-rpc-types-eth = { workspace = true }
|
||||
arc-swap = "1.6.0"
|
||||
builder_client = { path = "../builder_client" }
|
||||
bytes = { workspace = true }
|
||||
eth2 = { workspace = true }
|
||||
ethereum_serde_utils = { workspace = true }
|
||||
ethereum_ssz = { workspace = true }
|
||||
ethers-core = { workspace = true }
|
||||
fixed_bytes = { workspace = true }
|
||||
fork_choice = { workspace = true }
|
||||
hash-db = "0.15.2"
|
||||
|
||||
@@ -18,7 +18,6 @@ use engines::{Engine, EngineError};
|
||||
pub use engines::{EngineState, ForkchoiceState};
|
||||
use eth2::types::{BlobsBundle, FullPayloadContents};
|
||||
use eth2::types::{ForkVersionedResponse, builder_bid::SignedBuilderBid};
|
||||
use ethers_core::types::Transaction as EthersTransaction;
|
||||
use fixed_bytes::UintExtended;
|
||||
use fork_choice::ForkchoiceUpdateParameters;
|
||||
use logging::crit;
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
use crate::EthersTransaction;
|
||||
use crate::engine_api::{
|
||||
ExecutionBlock, PayloadAttributes, PayloadId, PayloadStatusV1, PayloadStatusV1Status,
|
||||
json_structures::{
|
||||
@@ -6,6 +5,8 @@ use crate::engine_api::{
|
||||
},
|
||||
};
|
||||
use crate::engines::ForkchoiceState;
|
||||
use alloy_consensus::TxEnvelope;
|
||||
use alloy_rpc_types_eth::Transaction as AlloyTransaction;
|
||||
use eth2::types::BlobsBundle;
|
||||
use kzg::{Kzg, KzgCommitment, KzgProof};
|
||||
use parking_lot::Mutex;
|
||||
@@ -833,7 +834,7 @@ pub fn generate_blobs<E: EthSpec>(
|
||||
|
||||
pub fn static_valid_tx<E: EthSpec>() -> Result<Transaction<E::MaxBytesPerTransaction>, String> {
|
||||
// This is a real transaction hex encoded, but we don't care about the contents of the transaction.
|
||||
let transaction: EthersTransaction = serde_json::from_str(
|
||||
let transaction: AlloyTransaction = serde_json::from_str(
|
||||
r#"{
|
||||
"blockHash":"0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2",
|
||||
"blockNumber":"0x5daf3b",
|
||||
@@ -852,7 +853,8 @@ pub fn static_valid_tx<E: EthSpec>() -> Result<Transaction<E::MaxBytesPerTransac
|
||||
}"#,
|
||||
)
|
||||
.unwrap();
|
||||
VariableList::new(transaction.rlp().to_vec())
|
||||
|
||||
VariableList::new(alloy_rlp::encode::<TxEnvelope>(transaction.into()).to_vec())
|
||||
.map_err(|e| format!("Failed to convert transaction to SSZ: {:?}", e))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user