Skip to content

Commit 6c88f19

Browse files
committed
Use Uint256 for base_fee_per_gas
1 parent 3a73cde commit 6c88f19

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

consensus/state_processing/src/genesis.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub fn initialize_beacon_state_from_eth1<T: EthSpec>(
7171
timestamp: eth1_timestamp,
7272
random: eth1_block_hash,
7373
gas_limit: GENESIS_GAS_LIMIT,
74-
base_fee_per_gas: GENESIS_BASE_FEE_PER_GAS,
74+
base_fee_per_gas: Uint256::from_little_endian(&GENESIS_BASE_FEE_PER_GAS),
7575
..ExecutionPayloadHeader::default()
7676
};
7777
}

consensus/types/src/consts.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ pub mod altair {
2121
}
2222

2323
pub mod merge_testing {
24-
use ethereum_types::H256;
2524
pub const GENESIS_GAS_LIMIT: u64 = 30_000_000;
26-
pub const GENESIS_BASE_FEE_PER_GAS: H256 = H256([
25+
pub const GENESIS_BASE_FEE_PER_GAS: [u8; 32] = [
2726
0x00, 0xca, 0x9a, 0x3b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2827
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
2928
0x00, 0x00,
30-
]);
29+
];
3130
}

consensus/types/src/execution_payload.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub struct ExecutionPayload<T: EthSpec> {
5959
pub timestamp: u64,
6060
#[serde(with = "ssz_types::serde_utils::hex_var_list")]
6161
pub extra_data: VariableList<u8, T::MaxExtraDataBytes>,
62-
pub base_fee_per_gas: Hash256,
62+
pub base_fee_per_gas: Uint256,
6363
pub block_hash: Hash256,
6464
#[test_random(default)]
6565
pub transactions: VariableList<Transaction<T>, T::MaxTransactionsPerPayload>,
@@ -80,7 +80,7 @@ impl<T: EthSpec> ExecutionPayload<T> {
8080
gas_used: 0,
8181
timestamp: 0,
8282
extra_data: VariableList::empty(),
83-
base_fee_per_gas: Hash256::zero(),
83+
base_fee_per_gas: Uint256::zero(),
8484
block_hash: Hash256::zero(),
8585
transactions: VariableList::empty(),
8686
}

consensus/types/src/execution_payload_header.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub struct ExecutionPayloadHeader<T: EthSpec> {
2626
pub timestamp: u64,
2727
#[serde(with = "ssz_types::serde_utils::hex_var_list")]
2828
pub extra_data: VariableList<u8, T::MaxExtraDataBytes>,
29-
pub base_fee_per_gas: Hash256,
29+
pub base_fee_per_gas: Uint256,
3030
pub block_hash: Hash256,
3131
pub transactions_root: Hash256,
3232
}

0 commit comments

Comments
 (0)