Run Snowbridge halt and resume bridge preimages for verification#636
Conversation
|
The changes look good and the tests are well-structured. I have one minor suggestion to improve the clarity of the test file by adding comments to explain the magic numbers used for Review Suggestionspackages/polkadot/src/assetHubPolkadot.bridgeHubPolkadot.snowbridgeGovernance.e2e.test.ts:42, 89 The test uses the magic number |
|
Review comment details are hallucinated by I added a comment about the preimage length nonetheless: 59d3144 |
|
@claravanstaden alright, noted! I'll take a look at this PR this week. |
|
|
||
| type PreimageEntry = { hash: string; callData: string } | ||
|
|
||
| describe('Snowbridge governance halt/resume preimage', async () => { |
There was a problem hiding this comment.
Can you extract these test bodies out of the describe calls? That also allows for documentation to be written that explains the purpose/mechanism behind these tests.
I get that they're trivial to you as a Snowbridge maintainer, but consider someone without your context. Specifically:
- What do the fee keys (
FEE_KEY_V1,FEE_KEY_V2) actually control? Why does setting them to MAX_U128 halt the bridge? - What's the relationship between Asset Hub and Bridge Hub in this halt flow?
- Why are there V1 and V2 versions of everything?
- What does "halt" actually mean operationally - does it stop inbound, outbound, or both?
There was a problem hiding this comment.
@claravanstaden I was unclear in my previous comment. I've updated it with concrete examples of desirable things to comment, which I guess landed just before you pushed your commit! Sorry!
…to clara/snowbridge-halt-preimage
|
@claravanstaden thanks! |
Snowbridge requires an easy accessible, automated way of obtaining the preimage to halt the bridge, in case of an emergency. We added a page on our dApp to get the halt and resume bridge preimage: https://app.snowbridge.network/governance Even though the page is open-source, we need a way to:
This PR adds the halt and resume bridge preimages, to be tested against a fork of Polkadot mainnet (using Chopsticks) every 6 hours. The test verifies storage state and expected events. The Snowbridge app will show a badge that the preimage match what is in this repo, and it can also of course be compared manually too.