-
Notifications
You must be signed in to change notification settings - Fork 680
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 Beacon header age check #3727
Snowbridge Beacon header age check #3727
Conversation
@@ -15,8 +15,6 @@ | |||
//! ## Consensus Updates | |||
//! | |||
//! * [`Call::submit`]: Submit a finalized beacon header with an optional sync committee update | |||
//! * [`Call::submit_execution_header`]: Submit an execution header together with an ancestry proof |
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 does not seem relevant?
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.
Correct, reverted in 27ecafd.
@@ -286,8 +286,8 @@ impl Contains<RuntimeCall> for SafeCallFilter { | |||
match call { | |||
RuntimeCall::System(frame_system::Call::set_storage { items }) | |||
if items.iter().all(|(k, _)| { | |||
k.eq(&bridging::XcmBridgeHubRouterByteFee::key()) | |
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.
While this is certainly a bug you're fixing, its still not relevant to the issue in the beacon light client. I suggest updating the PR description, saying you added some miscellaneous unrelated fixes.
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 reverted this change to keep the PR as focused as possible. I added the change in this PR: #3761
3410dfb
## Bug Explanation Adds a check that prevents finalized headers with a gap larger than the sync committee period being imported, which could cause execution headers in the gap being unprovable. The current version of the Ethereum client checks that there is a header at least every sync committee, but it doesn't check that the headers are within a sync period of each other. For example: Header 100 (sync committee period 1) Header 9000 (sync committee period 2) (8900 blocks apart) These headers are in adjacent sync committees, but more than the sync committee period (8192 blocks) apart. The reason we need a header every 8192 slots at least, is the header is used to prove messages within the last 8192 blocks. If we import header 9000, and we receive a message to be verified at header 200, the `block_roots` field of header 9000 won't contain the header in order to do the ancestry check. ## Environment While running in Rococo, this edge case was discovered after the relayer was offline for a few days. It is unlikely, but not impossible, to happen again and so it should be backported to polkadot-sdk 1.7.0 (so that [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes) can be updated with the fix). Our Ethereum client has been operational on Rococo for the past few months, and this been the only major issue discovered so far. ### Unrelated Change An unrelated nit: Removes a left over file that should have been deleted when the `parachain` directory was removed. --------- Co-authored-by: claravanstaden <Cats 4 life!>
## Bug Explanation Adds a check that prevents finalized headers with a gap larger than the sync committee period being imported, which could cause execution headers in the gap being unprovable. The current version of the Ethereum client checks that there is a header at least every sync committee, but it doesn't check that the headers are within a sync period of each other. For example: Header 100 (sync committee period 1) Header 9000 (sync committee period 2) (8900 blocks apart) These headers are in adjacent sync committees, but more than the sync committee period (8192 blocks) apart. The reason we need a header every 8192 slots at least, is the header is used to prove messages within the last 8192 blocks. If we import header 9000, and we receive a message to be verified at header 200, the `block_roots` field of header 9000 won't contain the header in order to do the ancestry check. ## Environment While running in Rococo, this edge case was discovered after the relayer was offline for a few days. It is unlikely, but not impossible, to happen again and so it should be backported to polkadot-sdk 1.7.0 (so that [polkadot-fellows/runtimes](https://github.com/polkadot-fellows/runtimes) can be updated with the fix). Our Ethereum client has been operational on Rococo for the past few months, and this been the only major issue discovered so far. ### Unrelated Change An unrelated nit: Removes a left over file that should have been deleted when the `parachain` directory was removed. --------- Co-authored-by: claravanstaden <Cats 4 life!>
…nsure safety margins (paritytech#3791) This is a cherry-pick from master of paritytech#3727 and paritytech#3790 Expected patches for (1.7.0): snowbridge-pallet-ethereum-client snowbridge-pallet-inbound-queue snowbridge-pallet-outbound-queue snowbridge-outbound-queue-runtime-api snowbridge-pallet-system snowbridge-core
…nsure safety margins (paritytech#3791) This is a cherry-pick from master of paritytech#3727 and paritytech#3790 Expected patches for (1.7.0): snowbridge-pallet-ethereum-client snowbridge-pallet-inbound-queue snowbridge-pallet-outbound-queue snowbridge-outbound-queue-runtime-api snowbridge-pallet-system snowbridge-core
…nsure safety margins (#3814) This is a cherry-pick from master of #3790 and #3727 Expected patches for (1.8.0): snowbridge-pallet-ethereum-client snowbridge-pallet-inbound-queue snowbridge-pallet-outbound-queue snowbridge-outbound-queue-runtime-api snowbridge-pallet-system snowbridge-core --------- Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
…nsure safety margins (#3815) This is a cherry-pick from master of #3790 and #3727 Expected patches for (1.9.0): snowbridge-pallet-ethereum-client snowbridge-pallet-inbound-queue snowbridge-pallet-outbound-queue snowbridge-outbound-queue-runtime-api snowbridge-pallet-system snowbridge-core --------- Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: Vincent Geddes <[email protected]> Co-authored-by: Adrian Catangiu <[email protected]>
…c committee in next store period (#4482) This is a cherry-pick from master of [#3790 and https://github.com/paritytech/polkadot-sdk/pull/3727](https://github.com/paritytech/polkadot-sdk/pull/4478) Expected patches for (1.7.0): snowbridge-pallet-ethereum-client Co-authored-by: Vincent Geddes <[email protected]>
Bug Explanation
Adds a check that prevents finalized headers with a gap larger than the sync committee period being imported, which could cause execution headers in the gap being unprovable. The current version of the Ethereum client checks that there is a header at least every sync committee, but it doesn't check that the headers are within a sync period of each other. For example:
Header 100 (sync committee period 1)
Header 9000 (sync committee period 2)
(8900 blocks apart)
These headers are in adjacent sync committees, but more than the sync committee period (8192 blocks) apart.
The reason we need a header every 8192 slots at least, is the header is used to prove messages within the last 8192 blocks. If we import header 9000, and we receive a message to be verified at header 200, the
block_roots
field of header 9000 won't contain the header in order to do the ancestry check.Environment
While running in Rococo, this edge case was discovered after the relayer was offline for a few days. It is unlikely, but not impossible, to happen again and so it should be backported to polkadot-sdk 1.7.0 (so that polkadot-fellows/runtimes can be updated with the fix).
Our Ethereum client has been operational on Rococo for the past few months, and this been the only major issue discovered so far.
Unrelated Change
An unrelated nit: Removes a left over file that should have been deleted when the
parachain
directory was removed.