-
Notifications
You must be signed in to change notification settings - Fork 707
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
Bridges: Making relayer compatible with runtime upgrades #4256
base: master
Are you sure you want to change the base?
Conversation
…pallet_bridge_grandpa + tests to ensure GRANDPA relayer compatibility
…f filters to generate signed extension identifier + renamed refund extensions to "ComplexRefund" - we will change it in upcoming upgrade
… + tests to ensure parachains relayer compatibility
… tests to ensure messages relayer compatibility
… are upgraded to metadata v15, we will be able to fetch that using regural state_metadata call (given that we will be able to parse metadata from rust code)
…w versioning scheme
…yer versions (see paritytech/parity-bridges-common#2891 for request)
…re running an older version
…rsion into bridge version
… generated; - change RelayerVersion comparison in relayer - only `manual` field matters; - fixed merge damage and updated versions
Latest commit introduces some important changes:
|
Due to recent bump of Rococo/Westend versions + the fact that paritytech/parity-bridges-common#2894 has finally reached this repo, tests now fail, because we've started checking all client versions (even source) unless we specify `--source-version-mode Auto` in CLI arguments. This looks like an overkill, but all those version checks will be fixed by #4256, so now it makes sense just to add this CLI option. We also need to propagate it to running relays eventually.
@@ -403,9 +403,9 @@ impl<C: Chain> Client<C> { | |||
} | |||
|
|||
/// Return runtime version. | |||
pub async fn runtime_version(&self) -> Result<RuntimeVersion> { | |||
pub async fn runtime_version(&self, at: HeaderIdOf<C>) -> Result<RuntimeVersion> { |
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.
Looks like we only need the hash here and also looks like sometimes we want to query the runtime version at the latest block. So could we do at: Option<C::Hash>
?
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.
Changed to HashOf
. All places where the latest block is used (version guards) shall be removed once this update is applied, so no Option<_>
//! version every time one of chains is upgraded. Recently we have "eased" our | ||
//! requirements and now only watch for bridge hub versions (2 chains). | ||
//! | ||
//! What we are trying to solve with 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.
Overall seems quite complex to me. I think my personal preference would be to keep only the manual version for simplicity. I'm not totally sure. I'll spend some more time thinking about it. Also I'm curious what others think as well.
Due to recent bump of Rococo/Westend versions + the fact that paritytech/parity-bridges-common#2894 has finally reached this repo, tests now fail, because we've started checking all client versions (even source) unless we specify `--source-version-mode Auto` in CLI arguments. This looks like an overkill, but all those version checks will be fixed by #4256, so now it makes sense just to add this CLI option. We also need to propagate it to running relays eventually.
I think this RFC with transaction/signed extension version: polkadot-fellows/RFCs#99 could also simplify/avoid lots of these code probably |
Due to recent bump of Rococo/Westend versions + the fact that paritytech/parity-bridges-common#2894 has finally reached this repo, tests now fail, because we've started checking all client versions (even source) unless we specify `--source-version-mode Auto` in CLI arguments. This looks like an overkill, but all those version checks will be fixed by paritytech#4256, so now it makes sense just to add this CLI option. We also need to propagate it to running relays eventually.
See paritytech/parity-bridges-common#2956 for details
Relayer PR: paritytech/parity-bridges-common#2969
Would be better to have paritytech/parity-bridges-common#2947 implemented before
Main changes here:
RelayerVersion
struct with two fields:auto
isH256
, computed with a tests. When it changes, it means that existing relayer is no longer compatible with new runtime.manual
should be bumped in that case.manual
can also be bumped if there are breaking changes, not covered by the tests;RelayerVersion
as a constant in a pallet configuration;RelayerVersion
as a constant in a pipeline configuration;offchain.manual <= onchain.manual
and keep working otherwise.