mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
feat(spec): Holocene activation time for {OP/Base} Sepolia (#12453)
This commit is contained in:
@ -172,16 +172,12 @@ mod test {
|
||||
use crate::engine;
|
||||
use alloy_primitives::{b64, Address, B256, B64};
|
||||
use alloy_rpc_types_engine::PayloadAttributes;
|
||||
use reth_chainspec::ForkCondition;
|
||||
use reth_optimism_chainspec::BASE_SEPOLIA;
|
||||
|
||||
use super::*;
|
||||
|
||||
fn get_chainspec(is_holocene: bool) -> Arc<OpChainSpec> {
|
||||
let mut hardforks = OpHardfork::base_sepolia();
|
||||
if is_holocene {
|
||||
hardforks.insert(OpHardfork::Holocene.boxed(), ForkCondition::Timestamp(1800000000));
|
||||
}
|
||||
fn get_chainspec() -> Arc<OpChainSpec> {
|
||||
let hardforks = OpHardfork::base_sepolia();
|
||||
Arc::new(OpChainSpec {
|
||||
inner: ChainSpec {
|
||||
chain: BASE_SEPOLIA.inner.chain,
|
||||
@ -217,8 +213,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_well_formed_attributes_pre_holocene() {
|
||||
let validator = OpEngineValidator::new(get_chainspec(false));
|
||||
let attributes = get_attributes(None, 1799999999);
|
||||
let validator = OpEngineValidator::new(get_chainspec());
|
||||
let attributes = get_attributes(None, 1732201199);
|
||||
|
||||
let result = <engine::OpEngineValidator as reth_node_builder::EngineValidator<
|
||||
OpEngineTypes,
|
||||
@ -230,8 +226,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_well_formed_attributes_holocene_no_eip1559_params() {
|
||||
let validator = OpEngineValidator::new(get_chainspec(true));
|
||||
let attributes = get_attributes(None, 1800000000);
|
||||
let validator = OpEngineValidator::new(get_chainspec());
|
||||
let attributes = get_attributes(None, 1732201200);
|
||||
|
||||
let result = <engine::OpEngineValidator as reth_node_builder::EngineValidator<
|
||||
OpEngineTypes,
|
||||
@ -243,8 +239,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_well_formed_attributes_holocene_eip1559_params_zero_denominator() {
|
||||
let validator = OpEngineValidator::new(get_chainspec(true));
|
||||
let attributes = get_attributes(Some(b64!("0000000000000008")), 1800000000);
|
||||
let validator = OpEngineValidator::new(get_chainspec());
|
||||
let attributes = get_attributes(Some(b64!("0000000000000008")), 1732201200);
|
||||
|
||||
let result = <engine::OpEngineValidator as reth_node_builder::EngineValidator<
|
||||
OpEngineTypes,
|
||||
@ -256,8 +252,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_well_formed_attributes_holocene_valid() {
|
||||
let validator = OpEngineValidator::new(get_chainspec(true));
|
||||
let attributes = get_attributes(Some(b64!("0000000800000008")), 1800000000);
|
||||
let validator = OpEngineValidator::new(get_chainspec());
|
||||
let attributes = get_attributes(Some(b64!("0000000800000008")), 1732201200);
|
||||
|
||||
let result = <engine::OpEngineValidator as reth_node_builder::EngineValidator<
|
||||
OpEngineTypes,
|
||||
@ -269,8 +265,8 @@ mod test {
|
||||
|
||||
#[test]
|
||||
fn test_well_formed_attributes_holocene_valid_all_zero() {
|
||||
let validator = OpEngineValidator::new(get_chainspec(true));
|
||||
let attributes = get_attributes(Some(b64!("0000000000000000")), 1800000000);
|
||||
let validator = OpEngineValidator::new(get_chainspec());
|
||||
let attributes = get_attributes(Some(b64!("0000000000000000")), 1732201200);
|
||||
|
||||
let result = <engine::OpEngineValidator as reth_node_builder::EngineValidator<
|
||||
OpEngineTypes,
|
||||
|
||||
Reference in New Issue
Block a user