feat: add FreeHeadersInterval parameter to Ethereum client config (#279)

## Add FreeHeadersInterval parameter to Ethereum client config

Configure parameter `FreeHeadersInterval` set to `32` (1 epoch = 6.4
minutes) across `mainnet`, `stagenet`, and `testnet` configurations.

### Rationale
1. Aligns with Ethereum's epoch change, so it's easier to identify in
which epoch we are in
2. It's the value used in Snowbridge's test configuration

The value can be changed via pallet parameters.

---------

Co-authored-by: Steve Degosserie <723552+stiiifff@users.noreply.github.com>
This commit is contained in:
Gonza Montiel 2025-11-06 10:31:00 +01:00 committed by GitHub
parent f293766fe9
commit c18c9dc364
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 15 additions and 3 deletions

View file

@ -1190,10 +1190,14 @@ parameter_types! {
};
}
parameter_types! {
pub const FreeHeadersInterval: u32 = 32; // 1 epoch = 6.4 minutes
}
impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type FreeHeadersInterval = ();
type FreeHeadersInterval = FreeHeadersInterval;
type WeightInfo = mainnet_weights::snowbridge_pallet_ethereum_client::WeightInfo<Runtime>;
}

View file

@ -1189,10 +1189,14 @@ parameter_types! {
};
}
parameter_types! {
pub const FreeHeadersInterval: u32 = 32; // 1 epoch = 6.4 minutes
}
impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type FreeHeadersInterval = ();
type FreeHeadersInterval = FreeHeadersInterval;
type WeightInfo = stagenet_weights::snowbridge_pallet_ethereum_client::WeightInfo<Runtime>;
}

View file

@ -1190,10 +1190,14 @@ parameter_types! {
};
}
parameter_types! {
pub const FreeHeadersInterval: u32 = 32; // 1 epoch = 6.4 minutes
}
impl snowbridge_pallet_ethereum_client::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
type ForkVersions = ChainForkVersions;
type FreeHeadersInterval = ();
type FreeHeadersInterval = FreeHeadersInterval;
type WeightInfo = testnet_weights::snowbridge_pallet_ethereum_client::WeightInfo<Runtime>;
}

Binary file not shown.