mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 05:11:02 +00:00
Snowbridge Ethereum Deneb fork preparation (#3029)
- Prepares for the Deneb hardfork on Sepolia testnet on 31 January (needs to be deployed to Rococo before then) - Removes `beacon-minimal-spec` flag for simpler config - Adds test comments --------- Co-authored-by: Ron <yrong1997@gmail.com> Co-authored-by: claravanstaden <Cats 4 life!> Co-authored-by: Alistair Singh <alistair.singh7@gmail.com>
This commit is contained in:
@@ -498,13 +498,6 @@ impl pallet_utility::Config for Runtime {
|
||||
}
|
||||
|
||||
// Ethereum Bridge
|
||||
|
||||
#[cfg(not(feature = "runtime-benchmarks"))]
|
||||
parameter_types! {
|
||||
pub storage EthereumGatewayAddress: H160 = H160::zero();
|
||||
}
|
||||
|
||||
#[cfg(feature = "runtime-benchmarks")]
|
||||
parameter_types! {
|
||||
pub storage EthereumGatewayAddress: H160 = H160(hex_literal::hex!("EDa338E4dC46038493b885327842fD3E301CaB39"));
|
||||
}
|
||||
@@ -600,29 +593,33 @@ impl snowbridge_pallet_outbound_queue::Config for Runtime {
|
||||
type Channels = EthereumSystem;
|
||||
}
|
||||
|
||||
#[cfg(feature = "fast-runtime")]
|
||||
#[cfg(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test))]
|
||||
parameter_types! {
|
||||
pub const ChainForkVersions: ForkVersions = ForkVersions {
|
||||
genesis: Fork {
|
||||
version: [0, 0, 0, 1], // 0x00000001
|
||||
version: [0, 0, 0, 0], // 0x00000000
|
||||
epoch: 0,
|
||||
},
|
||||
altair: Fork {
|
||||
version: [1, 0, 0, 1], // 0x01000001
|
||||
version: [1, 0, 0, 0], // 0x01000000
|
||||
epoch: 0,
|
||||
},
|
||||
bellatrix: Fork {
|
||||
version: [2, 0, 0, 1], // 0x02000001
|
||||
version: [2, 0, 0, 0], // 0x02000000
|
||||
epoch: 0,
|
||||
},
|
||||
capella: Fork {
|
||||
version: [3, 0, 0, 1], // 0x03000001
|
||||
version: [3, 0, 0, 0], // 0x03000000
|
||||
epoch: 0,
|
||||
},
|
||||
deneb: Fork {
|
||||
version: [4, 0, 0, 0], // 0x04000000
|
||||
epoch: 0,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "fast-runtime"))]
|
||||
#[cfg(not(any(feature = "std", feature = "fast-runtime", feature = "runtime-benchmarks", test)))]
|
||||
parameter_types! {
|
||||
pub const ChainForkVersions: ForkVersions = ForkVersions {
|
||||
genesis: Fork {
|
||||
@@ -641,6 +638,10 @@ parameter_types! {
|
||||
version: [144, 0, 0, 114], // 0x90000072
|
||||
epoch: 56832,
|
||||
},
|
||||
deneb: Fork {
|
||||
version: [144, 0, 0, 115], // 0x90000073
|
||||
epoch: 132608,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ use bp_runtime::ChainId;
|
||||
use frame_support::{
|
||||
parameter_types,
|
||||
traits::{ConstU32, Contains, Equals, Everything, Nothing},
|
||||
StoragePrefixedMap,
|
||||
};
|
||||
use frame_system::EnsureRoot;
|
||||
use pallet_xcm::XcmPassthrough;
|
||||
@@ -161,9 +162,12 @@ impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
match call {
|
||||
RuntimeCall::System(frame_system::Call::set_storage { items })
|
||||
if items.iter().all(|(k, _)| {
|
||||
k.eq(&DeliveryRewardInBalance::key()) |
|
||||
k.eq(&RequiredStakeForStakeAndSlash::key()) |
|
||||
k.eq(&EthereumGatewayAddress::key())
|
||||
k.eq(&DeliveryRewardInBalance::key()) ||
|
||||
k.eq(&RequiredStakeForStakeAndSlash::key()) ||
|
||||
k.eq(&EthereumGatewayAddress::key()) ||
|
||||
// Allow resetting of Ethereum nonces in Rococo only.
|
||||
k.starts_with(&snowbridge_pallet_inbound_queue::Nonce::<Runtime>::final_prefix()) ||
|
||||
k.starts_with(&snowbridge_pallet_outbound_queue::Nonce::<Runtime>::final_prefix())
|
||||
}) =>
|
||||
return true,
|
||||
_ => (),
|
||||
@@ -223,7 +227,14 @@ impl Contains<RuntimeCall> for SafeCallFilter {
|
||||
snowbridge_pallet_inbound_queue::Call::set_operating_mode { .. },
|
||||
) | RuntimeCall::EthereumOutboundQueue(
|
||||
snowbridge_pallet_outbound_queue::Call::set_operating_mode { .. },
|
||||
) | RuntimeCall::EthereumSystem(..)
|
||||
) | RuntimeCall::EthereumSystem(
|
||||
snowbridge_pallet_system::Call::upgrade { .. } |
|
||||
snowbridge_pallet_system::Call::set_operating_mode { .. } |
|
||||
snowbridge_pallet_system::Call::set_pricing_parameters { .. } |
|
||||
snowbridge_pallet_system::Call::force_update_channel { .. } |
|
||||
snowbridge_pallet_system::Call::force_transfer_native_from_agent { .. } |
|
||||
snowbridge_pallet_system::Call::set_token_transfer_fees { .. },
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user