reth_optimism_primitives/
bedrock.rsuse alloy_consensus::{Header, EMPTY_OMMER_ROOT_HASH, EMPTY_ROOT_HASH};
use alloy_primitives::{address, b256, bloom, bytes, B256, B64, U256};
pub const TX_BLOCK_985: [u64; 2] = [19_022, 45_036];
pub const TX_BLOCK_123_322: u64 = 123_542;
pub const TX_BLOCK_1_133_328: [u64; 2] = [1_135_391, 1_144_468];
pub const TX_BLOCK_1_244_152: u64 = 1_272_994;
pub const BLOCK_NUMS_REPLAYED_TX: [u64; 6] = [
TX_BLOCK_985[0],
TX_BLOCK_985[1],
TX_BLOCK_123_322,
TX_BLOCK_1_133_328[0],
TX_BLOCK_1_133_328[1],
TX_BLOCK_1_244_152,
];
pub fn is_dup_tx(block_number: u64) -> bool {
if block_number > BLOCK_NUMS_REPLAYED_TX[5] {
return false
}
if BLOCK_NUMS_REPLAYED_TX.contains(&block_number) {
return true
}
false
}
pub const OVM_HEADER_1_HASH: B256 =
b256!("bee7192e575af30420cae0c7776304ac196077ee72b048970549e4f08e875453");
pub const BEDROCK_HEADER_HASH: B256 =
b256!("dbf6a80fef073de06add9b0d14026d6e5a86c85f6d102c36d3d8e9cf89c2afd3");
pub const BEDROCK_HEADER: Header = Header {
difficulty: U256::ZERO,
extra_data: bytes!("424544524f434b"),
gas_limit: 30000000,
gas_used: 0,
logs_bloom: bloom!("00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"),
nonce: B64::ZERO,
number: 105235063,
parent_hash: b256!("21a168dfa5e727926063a28ba16fd5ee84c814e847c81a699c7a0ea551e4ca50"),
receipts_root: EMPTY_ROOT_HASH,
state_root: b256!("920314c198da844a041d63bf6cbe8b59583165fd2229d1b3f599da812fd424cb"),
timestamp: 1686068903,
transactions_root: EMPTY_ROOT_HASH,
ommers_hash: EMPTY_OMMER_ROOT_HASH,
beneficiary: address!("4200000000000000000000000000000000000011"),
withdrawals_root: None,
mix_hash: B256::ZERO,
base_fee_per_gas: Some(0x3b9aca00),
blob_gas_used: None,
excess_blob_gas: None,
parent_beacon_block_root: None,
requests_hash: None,
target_blobs_per_block: None,
};
pub const BEDROCK_HEADER_TTD: U256 = U256::ZERO;
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_bedrock_header() {
assert_eq!(BEDROCK_HEADER.hash_slow(), BEDROCK_HEADER_HASH);
}
}