mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
chore(deps): weekly cargo update (#4627)
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com> Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
committed by
GitHub
parent
f7b28e5925
commit
a55f48cf28
@ -175,6 +175,8 @@ impl PayloadBuilderAttributes {
|
||||
basefee: U256::from(
|
||||
parent.next_block_base_fee(chain_spec.base_fee_params).unwrap_or_default(),
|
||||
),
|
||||
// calculate excess gas based on parent block's blob gas usage
|
||||
excess_blob_gas: parent.next_block_blob_fee().map(|fee| fee.saturating_to()),
|
||||
};
|
||||
|
||||
(cfg, block_env)
|
||||
|
||||
@ -43,6 +43,9 @@ pub enum EthApiError {
|
||||
/// An internal error where prevrandao is not set in the evm's environment
|
||||
#[error("Prevrandao not in th EVM's environment after merge")]
|
||||
PrevrandaoNotSet,
|
||||
/// Excess_blob_gas is not set for Cancun and above.
|
||||
#[error("Excess blob gas missing th EVM's environment after Cancun")]
|
||||
ExcessBlobGasNotSet,
|
||||
/// Thrown when a call or transaction request (`eth_call`, `eth_estimateGas`,
|
||||
/// `eth_sendTransaction`) contains conflicting fields (legacy, EIP-1559)
|
||||
#[error("both gasPrice and (maxFeePerGas or maxPriorityFeePerGas) specified")]
|
||||
@ -110,6 +113,7 @@ impl From<EthApiError> for ErrorObject<'static> {
|
||||
EthApiError::InvalidTransaction(err) => err.into(),
|
||||
EthApiError::PoolError(err) => err.into(),
|
||||
EthApiError::PrevrandaoNotSet |
|
||||
EthApiError::ExcessBlobGasNotSet |
|
||||
EthApiError::InvalidBlockData(_) |
|
||||
EthApiError::Internal(_) |
|
||||
EthApiError::TransactionNotFound => internal_rpc_err(error.to_string()),
|
||||
@ -184,7 +188,11 @@ where
|
||||
match err {
|
||||
EVMError::Transaction(err) => RpcInvalidTransactionError::from(err).into(),
|
||||
EVMError::PrevrandaoNotSet => EthApiError::PrevrandaoNotSet,
|
||||
EVMError::ExcessBlobGasNotSet => EthApiError::ExcessBlobGasNotSet,
|
||||
EVMError::Database(err) => err.into(),
|
||||
_ => {
|
||||
unreachable!()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -281,6 +289,16 @@ pub enum RpcInvalidTransactionError {
|
||||
/// The transitions is before Berlin and has access list
|
||||
#[error("Transactions before Berlin should not have access list")]
|
||||
AccessListNotSupported,
|
||||
/// `max_fee_per_blob_gas` is not supported for blocks before the Cancun hardfork.
|
||||
#[error("max_fee_per_blob_gas is not supported for blocks before the Cancun hardfork.")]
|
||||
MaxFeePerBlobGasNotSupported,
|
||||
/// `blob_hashes`/`blob_versioned_hashes` is not supported for blocks before the Cancun
|
||||
/// hardfork.
|
||||
#[error("blob_versioned_hashes is not supported for blocks before the Cancun hardfork.")]
|
||||
BlobVersionedHashesNotSupported,
|
||||
/// Block `blob_gas_price` is greater than tx-specified `max_fee_per_blob_gas` after Cancun.
|
||||
#[error("max fee per blob gas less than block blob gas fee")]
|
||||
BlobFeeCapTooLow,
|
||||
}
|
||||
|
||||
impl RpcInvalidTransactionError {
|
||||
@ -370,6 +388,15 @@ impl From<revm::primitives::InvalidTransaction> for RpcInvalidTransactionError {
|
||||
InvalidTransaction::AccessListNotSupported => {
|
||||
RpcInvalidTransactionError::AccessListNotSupported
|
||||
}
|
||||
InvalidTransaction::MaxFeePerBlobGasNotSupported => {
|
||||
RpcInvalidTransactionError::MaxFeePerBlobGasNotSupported
|
||||
}
|
||||
InvalidTransaction::BlobVersionedHashesNotSupported => {
|
||||
RpcInvalidTransactionError::BlobVersionedHashesNotSupported
|
||||
}
|
||||
InvalidTransaction::BlobGasPriceGreaterThanMax => {
|
||||
RpcInvalidTransactionError::BlobFeeCapTooLow
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -311,6 +311,10 @@ pub(crate) fn create_txn_env(block_env: &BlockEnv, request: CallRequest) -> EthR
|
||||
data: input.try_into_unique_input()?.map(|data| data.0).unwrap_or_default(),
|
||||
chain_id: chain_id.map(|c| c.as_u64()),
|
||||
access_list: access_list.map(AccessList::flattened).unwrap_or_default(),
|
||||
|
||||
// EIP-4844 fields
|
||||
blob_hashes: Default::default(),
|
||||
max_fee_per_blob_gas: None,
|
||||
};
|
||||
|
||||
Ok(env)
|
||||
|
||||
Reference in New Issue
Block a user