Snowbridge - Ethereum Client - Reject finalized updates without a sync committee in next store period#4482
Merged
acatangiu merged 1 commit intoparitytech:release-crates-io-v1.7.0from May 16, 2024
Conversation
…c committee in next store period (paritytech#4478) While syncing Ethereum consensus updates to the Snowbridge Ethereum light client, the syncing process stalled due to error `InvalidSyncCommitteeUpdate` when importing the next sync committee for period `1087`. This bug manifested specifically because our light client checkpoint is a few weeks old (submitted to governance weeks ago) and had to catchup until a recent block. Since then, we have done thorough testing of the catchup sync process. ### Symptoms - Import next sync committee for period `1086` (essentially period `1087`). Light client store period = `1086`. - Import header in period `1087`. Light client store period = `1087`. The current and next sync committee is not updated, and is now in an outdated state. (current sync committee = `1086` and current sync committee = `1087`, where it should be current sync committee = `1087` and current sync committee = `None`) - Import next sync committee for period `1087` (essentially period `1088`) fails because the expected next sync committee's roots don't match. ### Bug The bug here is that the current and next sync committee's didn't handover when an update in the next period was received. ### Fix There are two possible fixes here: 1. Correctly handover sync committees when a header in the next period is received. 2. Reject updates in the next period until the next sync committee period is known. We opted for solution 2, which is more conservative and requires less changes. ### Polkadot-sdk versions This fix should be backported in polkadot-sdk versions 1.7 and up. Snowfork PR: #145 --------- Co-authored-by: Vincent Geddes <[email protected]>
|
The CI pipeline was cancelled due to failure one of the required jobs. |
Contributor
Author
|
@bkontur clippy is failing because the Cargo.lock file should be updated. Should I update it? My changes didn't require a lock file update. Also PR doc is failing because the format in 1.7 was different, I think. Should I remove the PR doc? Add it to 1.7.0 folder? 🤔 |
bkontur
approved these changes
May 16, 2024
acatangiu
approved these changes
May 16, 2024
2 tasks
fellowship-merge-bot bot
pushed a commit
to polkadot-fellows/runtimes
that referenced
this pull request
May 19, 2024
Upgrades Snowbridge with an Ethereum client fixes: - paritytech/polkadot-sdk#4504 - paritytech/polkadot-sdk#4482 Adds a migration to reset the Ethereum checkpoint. Will be reset again to the moment recent checkpoint before merged. TODO: - [x] Check migration works - [x] Check converting Sync Committee to prepared keys is OK for a migration --------- Co-authored-by: Adrian Catangiu <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: ron <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a cherry-pick from master of https://github.com/paritytech/polkadot-sdk/pull/3790 and https://github.com/paritytech/polkadot-sdk/pull/3727
Expected patches for (1.7.0):
snowbridge-pallet-ethereum-client