-
Notifications
You must be signed in to change notification settings - Fork 97
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
Unstuck Snowbridge #313
Unstuck Snowbridge #313
Conversation
|
||
pub struct UnstuckSnowbridge; | ||
|
||
impl OnRuntimeUpgrade for UnstuckSnowbridge { |
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.
You also need to add it to the list of migrations (example)
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.
Thanks for the reminder! b13f7a9
@acatangiu the migration is roughly doing the same as the |
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_unstuck.rs
Outdated
Show resolved
Hide resolved
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_unstuck.rs
Outdated
Show resolved
Hide resolved
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_unstuck.rs
Outdated
Show resolved
Hide resolved
} | ||
|
||
fn is_bridge_stuck() -> bool { | ||
LatestFinalizedBlockRoot::<Runtime>::get() == LAST_IMPORTED_BEACON_HEADER.into() |
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.
We expect that this LAST_IMPORTED_BEACON_HEADER
will not be reimported, yes?
(I guess the checkpoint is from a block newer than that)
Should be ok as long as it fits a block. |
…o_ethereum_unstuck.rs Co-authored-by: Adrian Catangiu <[email protected]>
…o_ethereum_unstuck.rs Co-authored-by: Adrian Catangiu <[email protected]>
…o_ethereum_unstuck.rs Co-authored-by: Adrian Catangiu <[email protected]>
Yeah this is fine, is well below the block limit. And we know it works because our initial governance proposal already executed a |
system-parachains/bridge-hubs/bridge-hub-polkadot/src/bridge_to_ethereum_unstuck.rs
Outdated
Show resolved
Hide resolved
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.
+1
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.
Migration code looks good, also validated that the new checkpoint leads to https://beaconscan.com/slot/9094528.
Check is_bridge_upgraded at post_upgrade phase
/merge |
2f8a10e
into
polkadot-fellows:main
Enabled Available commands
For more information see the documentation |
Upgrades Snowbridge with an Ethereum client fixes:
Adds a migration to reset the Ethereum checkpoint. Will be reset again to the moment recent checkpoint before merged.
TODO: