primitives: rm alloy BlobTransactionValidationError reexport (#12311)

This commit is contained in:
Thomas Coratger
2024-11-05 13:17:28 +01:00
committed by GitHub
parent 5c2e9417fc
commit 15c230bac2
6 changed files with 18 additions and 17 deletions

View File

@@ -51,9 +51,6 @@ pub use transaction::{
PooledTransactionsElementEcRecovered,
};
#[cfg(feature = "c-kzg")]
pub use transaction::BlobTransactionValidationError;
pub use transaction::{
util::secp256k1::{public_key_to_address, recover_signer_unchecked, sign_message},
InvalidTransactionError, Transaction, TransactionMeta, TransactionSigned,

View File

@@ -31,8 +31,6 @@ pub use error::{
};
pub use meta::TransactionMeta;
pub use pooled::{PooledTransactionsElement, PooledTransactionsElementEcRecovered};
#[cfg(feature = "c-kzg")]
pub use sidecar::BlobTransactionValidationError;
pub use sidecar::{BlobTransaction, BlobTransactionSidecar};
pub use compat::FillTxEnv;

View File

@@ -9,9 +9,6 @@ use serde::{Deserialize, Serialize};
#[doc(inline)]
pub use alloy_eips::eip4844::BlobTransactionSidecar;
#[cfg(feature = "c-kzg")]
pub use alloy_eips::eip4844::BlobTransactionValidationError;
/// A response to `GetPooledTransactions` that includes blob data, their commitments, and their
/// corresponding proofs.
///
@@ -58,7 +55,7 @@ impl BlobTransaction {
pub fn validate(
&self,
proof_settings: &c_kzg::KzgSettings,
) -> Result<(), BlobTransactionValidationError> {
) -> Result<(), alloy_eips::eip4844::BlobTransactionValidationError> {
self.transaction.validate_blob(proof_settings)
}

View File

@@ -1,7 +1,8 @@
//! Transaction pool errors
use alloy_eips::eip4844::BlobTransactionValidationError;
use alloy_primitives::{Address, TxHash, U256};
use reth_primitives::{BlobTransactionValidationError, InvalidTransactionError};
use reth_primitives::InvalidTransactionError;
/// Transaction pool result type.
pub type PoolResult<T> = Result<T, PoolError>;

View File

@@ -11,7 +11,11 @@ use alloy_consensus::{
constants::{EIP1559_TX_TYPE_ID, EIP2930_TX_TYPE_ID, EIP4844_TX_TYPE_ID, LEGACY_TX_TYPE_ID},
TxEip1559, TxEip2930, TxEip4844, TxLegacy,
};
use alloy_eips::{eip1559::MIN_PROTOCOL_BASE_FEE, eip2930::AccessList, eip4844::DATA_GAS_PER_BLOB};
use alloy_eips::{
eip1559::MIN_PROTOCOL_BASE_FEE,
eip2930::AccessList,
eip4844::{BlobTransactionValidationError, DATA_GAS_PER_BLOB},
};
use alloy_primitives::{Address, Bytes, ChainId, Signature, TxHash, TxKind, B256, U256};
use paste::paste;
use rand::{
@@ -20,8 +24,8 @@ use rand::{
};
use reth_primitives::{
transaction::TryFromRecoveredTransactionError, BlobTransactionSidecar,
BlobTransactionValidationError, PooledTransactionsElementEcRecovered, Transaction,
TransactionSigned, TransactionSignedEcRecovered, TxType,
PooledTransactionsElementEcRecovered, Transaction, TransactionSigned,
TransactionSignedEcRecovered, TxType,
};
use std::{ops::Range, sync::Arc, time::Instant, vec::IntoIter};
@@ -761,7 +765,7 @@ impl EthPoolTransaction for MockTransaction {
&self,
_blob: &BlobTransactionSidecar,
_settings: &reth_primitives::kzg::KzgSettings,
) -> Result<(), reth_primitives::BlobTransactionValidationError> {
) -> Result<(), alloy_eips::eip4844::BlobTransactionValidationError> {
match &self {
Self::Eip4844 { .. } => Ok(()),
_ => Err(BlobTransactionValidationError::NotBlobTransaction(self.tx_type())),

View File

@@ -11,15 +11,19 @@ use alloy_consensus::{
constants::{EIP1559_TX_TYPE_ID, EIP4844_TX_TYPE_ID, EIP7702_TX_TYPE_ID},
Transaction as _,
};
use alloy_eips::{eip2718::Encodable2718, eip2930::AccessList, eip4844::BlobAndProofV1};
use alloy_eips::{
eip2718::Encodable2718,
eip2930::AccessList,
eip4844::{BlobAndProofV1, BlobTransactionValidationError},
};
use alloy_primitives::{Address, TxHash, TxKind, B256, U256};
use futures_util::{ready, Stream};
use reth_eth_wire_types::HandleMempoolData;
use reth_execution_types::ChangedAccount;
use reth_primitives::{
kzg::KzgSettings, transaction::TryFromRecoveredTransactionError, BlobTransactionSidecar,
BlobTransactionValidationError, PooledTransactionsElement,
PooledTransactionsElementEcRecovered, SealedBlock, Transaction, TransactionSignedEcRecovered,
PooledTransactionsElement, PooledTransactionsElementEcRecovered, SealedBlock, Transaction,
TransactionSignedEcRecovered,
};
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};