chore: bump alloy (#16828)

This commit is contained in:
Arsenii Kulikov
2025-06-17 14:19:07 +02:00
committed by GitHub
parent 820c334a4a
commit 5d754195a3
6 changed files with 142 additions and 164 deletions

View File

@@ -1033,18 +1033,13 @@ mod tests {
use super::*;
use alloy_chains::Chain;
use alloy_consensus::constants::ETH_TO_WEI;
use alloy_eips::{eip4844::BLOB_TX_MIN_BLOB_GASPRICE, eip7840::BlobParams};
use alloy_evm::block::calc::{base_block_reward, block_reward};
use alloy_genesis::{ChainConfig, GenesisAccount};
use alloy_primitives::{b256, hex};
use alloy_trie::{TrieAccount, EMPTY_ROOT_HASH};
use core::ops::Deref;
use reth_ethereum_forks::{ForkCondition, ForkHash, ForkId, Head};
use std::{
collections::{BTreeMap, HashMap},
str::FromStr,
string::String,
};
use std::{collections::HashMap, str::FromStr};
fn test_hardfork_fork_ids(spec: &ChainSpec, cases: &[(EthereumHardfork, ForkId)]) {
for (hardfork, expected_id) in cases {
@@ -2506,38 +2501,4 @@ Post-merge hard forks (timestamp based):
assert_eq!(block_reward(base_reward, num_ommers), expected_reward);
}
}
#[test]
fn blob_params_from_genesis() {
let s = r#"{
"cancun":{
"baseFeeUpdateFraction":3338477,
"max":6,
"target":3
},
"prague":{
"baseFeeUpdateFraction":3338477,
"max":6,
"target":3
}
}"#;
let schedule: BTreeMap<String, BlobParams> = serde_json::from_str(s).unwrap();
let hardfork_params = BlobScheduleBlobParams::from_schedule(&schedule);
let expected = BlobScheduleBlobParams {
cancun: BlobParams {
target_blob_count: 3,
max_blob_count: 6,
update_fraction: 3338477,
min_blob_fee: BLOB_TX_MIN_BLOB_GASPRICE,
},
prague: BlobParams {
target_blob_count: 3,
max_blob_count: 6,
update_fraction: 3338477,
min_blob_fee: BLOB_TX_MIN_BLOB_GASPRICE,
},
..Default::default()
};
assert_eq!(hardfork_params, expected);
}
}

View File

@@ -1,5 +1,5 @@
use alloy_rpc_types_mev::{
SendBundleRequest, SendBundleResponse, SimBundleOverrides, SimBundleResponse,
EthBundleHash, SendBundleRequest, SimBundleOverrides, SimBundleResponse,
};
use jsonrpsee::proc_macros::rpc;
@@ -27,7 +27,7 @@ pub trait MevFullApi {
async fn send_bundle(
&self,
request: SendBundleRequest,
) -> jsonrpsee::core::RpcResult<SendBundleResponse>;
) -> jsonrpsee::core::RpcResult<EthBundleHash>;
/// Similar to `mev_sendBundle` but instead of submitting a bundle to the relay, it returns
/// a simulation result. Only fully matched bundles can be simulated.

View File

@@ -2,7 +2,7 @@
use alloy_eips::eip4895::Withdrawals;
use alloy_primitives::Bytes;
use alloy_rlp::{Decodable, Error as RlpError};
use alloy_rlp::Decodable;
use alloy_rpc_types_engine::{
ExecutionPayload, ExecutionPayloadBodyV1, ExecutionPayloadSidecar, ExecutionPayloadV1,
PayloadError,
@@ -105,5 +105,5 @@ fn payload_validation_conversion() {
*tx = Bytes::new();
});
let payload_with_invalid_txs = payload_with_invalid_txs.try_into_block::<TransactionSigned>();
assert_matches!(payload_with_invalid_txs, Err(PayloadError::Decode(RlpError::InputTooShort)));
assert_matches!(payload_with_invalid_txs, Err(PayloadError::Decode(_)));
}

View File

@@ -180,7 +180,7 @@ impl IntoRpcTx<Transaction> for EthereumTxEnvelope<TxEip4844> {
type TxInfo = TransactionInfo;
fn into_rpc_tx(self, signer: Address, tx_info: TransactionInfo) -> Transaction {
Transaction::from_transaction(self.with_signer(signer).convert(), tx_info)
Transaction::<Self>::from_transaction(self.with_signer(signer).convert(), tx_info)
}
}