-
Notifications
You must be signed in to change notification settings - Fork 689
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Snowbridge Ethereum Deneb fork preparation #3029
Snowbridge Ethereum Deneb fork preparation #3029
Conversation
Co-authored-by: claravanstaden <Cats 4 life!>
* adds emulated test comments * pr comments * rename XCMs --------- Co-authored-by: claravanstaden <Cats 4 life!>
* Schedule dencun on sepolia * Update Cargo.lock
git-subtree-dir: bridges/snowbridge git-subtree-split: d65afb42f629a28eb1147fd6710f650c2928632b
# Conflicts: # Cargo.lock
* remove minimal spec * update test modules * fix fork versions in runtime * adds deneb * fix lodestar setup in nix, update fixtures with deneb fork --------- Co-authored-by: claravanstaden <Cats 4 life!>
53a5522d494 Remove minimal spec (paritytech#1119) git-subtree-dir: bridges/snowbridge git-subtree-split: 53a5522d494e38c5c3573c65e47bceda30572e45
…nowbridge-deneb-updates
# Conflicts: # Cargo.lock # cumulus/parachains/integration-tests/emulated/tests/bridges/bridge-hub-rococo/Cargo.toml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't want to block this PR, because most of changes are in the Snowfork pallets and are already reviewed. But need to ask a question before.
Looking at Eth hardfork times, won't it be hard for us to follow that schedule in deployment, given current deployment pipeline (fix in Snowfork repo -> update in polkadot-sdk
-> wait for crates publish -> upgrade dependencies in the fellowship repo -> runtime upgrade)? Like Paris
has been activated 9 days after the previous hardfork (Bellatrix
). Do you have some safety switch to turn off bridge if we'll fail to deploy on time? Or we'll be trying to do that on time.
Also I remember some accidental hard forks that have happened because of differences in client implementations. Do you also have some solution for bridge fixes in such case (e.g.: force switch forks). Just curious
@@ -89,7 +89,7 @@ snowbridge-system-runtime-api = { path = "../../pallets/system/runtime-api", def | |||
[dev-dependencies] | |||
static_assertions = "1.1" | |||
bridge-hub-test-utils = { path = "../../../../../cumulus/parachains/runtimes/bridge-hubs/test-utils" } | |||
bridge-runtime-common = { path = "../../../../bin/runtime-common", features = ["integrity-test"] } | |||
bridge-runtime-common = { path = "../../../../../bridges/bin/runtime-common", features = ["integrity-test"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was removed by purpose, so please revert :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, fixed in 57f9b19.
@@ -203,7 +203,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion { | |||
spec_name: create_runtime_str!("bridge-hub-rococo"), | |||
impl_name: create_runtime_str!("bridge-hub-rococo"), | |||
authoring_version: 1, | |||
spec_version: 1_006_000, | |||
spec_version: 1_007_000, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea - whether it should be bumped here, or during release?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Erm I'm also not sure. I wonder now if it shouldn't be a minor bump, like 1_006_001
? @bkontur? 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would not change spec_version
here, last time for 1.6.0 tag/release, they did it in the release branch and when released they backport that to master, so I would better revert this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't really check your subtree stuff, at the first glance looks ok,
I saw you removed minimal/mainet features, is it possible to remove this:
fast-runtime = [
"bridge-hub-rococo-runtime/fast-runtime",
]
and change to:
fast-runtime = [ ]
in the polkadot-parachain
Cargo.toml?
@svyatonik thanks for raising this, this is a valid point. A few things to note.
After the Ethereum merge, there are 2 Ethereum chains, the execution chain (the "old" Ethereum chain as it was before the merge) and the consensus chain (the new Beacon chain). For the Merge, it required an upgrade on both chains. Paris was the hard-fork on the execution chain and Bellatrix was the hardfork on the consensus chain. So they were essentially the same upgrade, just on the two different chains. We do not interact with the execution chain for our Ethereum light client, so we would just have prepared for the Bellatrix upgrade. Never say never, but it highly unlikely for hard-fork to be days from each other.
Iirc those hard-forks were related to the execution chain, and it has not been required since the consensus chain was launched. Consensus client changes, so far, have been planned months in advance and usually have required code changes (like the changes in the PR, to accommodate changes in the ExecutionHeaderPayload struct). We could have merged these changes in months ago but we decided to hold off since we had other higher priorities. This is usually how these hard-forks work:
If we had to, we could configure the hard-fork versions via a governance call. I am not sure if we want to do that now though. We do run the risk that the time between the mainnet epoch announcement and fork is shorther than the Parity release train. cc @vgeddes
We can halt the light client if need be, but it would obviously be preferable not to have "downtime" where we can't process messages. If there should be an unexpected Ethereum hard-fork because of the bug, we could halt the bridge until we configured the new fork version (cc @yrong please correct me if I am wrong). |
@bkontur it is unfortunately not possible because the fast-runtime feature needs to be propagated to the bridge hub runtime to toggle between the different fork versions for local testing and Rococo. |
* reset nonces * use set storage instead of kill storage
* More integration tests * Fix tests * Register token with inbound fixture * Import snowbridge-pallet-inbound-queue-fixtures * Cleanup Cargo.toml * Update emulated test * Fix emulated test * Rename to register_token * Update emulated tests * Update tests * Disable create agent/channel by xcm * More checks * Fix test * Clean test case * Test fixture sent token to penpal * Update test
3c4fe56af66 Disable system calls from xcm & Refactoring emulated tests (#1115) 769ce69a10a Allow resetting of Nonces in Rococo (paritytech#1128) ec4df8e1fab PR comments for upstream (paritytech#1127) git-subtree-dir: bridges/snowbridge git-subtree-split: 3c4fe56af666ad94d7aa06976d5510d37f737dc2
The CI pipeline was cancelled due to failure one of the required jobs. |
) | ||
.to_vec(), 0u64.encode()), | ||
(snowbridge_pallet_inbound_queue::Nonce::<Runtime>::hashed_key_for::<ChannelId>( | ||
channel_id_one, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
channel_id_one, | |
channel_id_two, |
@claravanstaden typo or intention?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is intentional because if I change it, the test fails. @alistair-singh can provide more context here and perhaps add a comment why.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test asserts that only channel_one
nonces are reset and that channel_two
nonces are left alone.
// encode `kill_storage` call | ||
let kill_storage_call = runtime_call_encode(frame_system::Call::<Runtime>::set_storage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@claravanstaden small nits, name kill_storage
here is kind of misleading, because it does set_storage
.
Also I think that this introduced set_storage_keys_by_governance_works
is not necessary and its usage can be replaced with four calls of change_storage_constant_by_governance_works
in-place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok cool! Would it be OK if I create an internal ticket for this? Just because the Ethereum Deneb fork on Sepolia is tomorrow. Clean-up storage test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally I used kill_storage to reset nonces so this is leftover naming from that and needs to change.
The issue with change_storage_constant_by_governance_works
is that it is bound to storage items which implement Get<StorageConstantType>. This limits its usage to storage constants that created in parameter_types!
macro and only tests single keys. This will not work for pallets with a StorageMap. set_storage_keys_by_governance_works
does this in a more general way by allowing two closures, one to initialize storage before modification, and one to assert storage after modification.
The tests that use change_storage_constant_by_governance_works
could be re-implemented in terms of set_storage_keys_by_governance_works
as it is more general, but that would affect 7 runtime tests which use it. Should we rather do that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alistair-singh yes, you're right, change_storage_constant_by_governance_works
was dedicated more for parameter_types! { pub storage..
stuff. Or maybe change_storage_constant_by_governance_works
can internally just call set_storage_keys_by_governance_works
, anyway, if we could make it nicer, lets do it, but this is very low prio,
@claravanstaden we don't have access to your, it is related to the polkadot-sdk
code directly, so it is also fine to create issue here.
@ggwpez several runtime migration check CI tasks are failing with:
It is for the Could you please point me in the right direction to correct this config? Edit: I am thinking it is a misconfiguration between configs HeapSize and ServiceWeight, but I would like your input on what values would be sensible given that the issue seems to affect runtimes that we have not changed. It is worth noting, our Ethereum light client needs to be initialised with the first initial validator set, which is why we have increased this value in the Rococo runtime: https://github.com/Snowfork/polkadot-sdk/blob/snowbridge/cumulus/parachains/runtimes/bridge-hubs/bridge-hub-rococo/src/lib.rs#L359 |
Mea culpa: #3117. Its from the XCMP queue, not the MessageQueue. |
85191e9
To deploy #3029 Co-authored-by: claravanstaden <Cats 4 life!>
beacon-minimal-spec
flag for simpler config