Skip to content

Unify the operating mode for bridge pallets#1483

Merged
serban300 merged 2 commits into
paritytech:masterfrom
serban300:parachains_operating_mode_and_owner
Jun 28, 2022
Merged

Unify the operating mode for bridge pallets#1483
serban300 merged 2 commits into
paritytech:masterfrom
serban300:parachains_operating_mode_and_owner

Conversation

@serban300
Copy link
Copy Markdown
Collaborator

Fixes #1479

It breaks runtime compatibility. I think it's also going to break relayers.

  • define the OperationMode trait and BasicOperatingMode enum
  • use the OperationMode trait in all the bridge pallets
  • use BasicOperatingMode instead of IsHalted for the Grandpa pallet
  • use BasicOperatingMode as part of MessagesOperatingMode

@serban300 serban300 added PR-breaksrelay A PR that is going to break existing relayers. I.e. some Runtime changes render old relayers unusabl PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade. labels Jun 28, 2022
@serban300 serban300 self-assigned this Jun 28, 2022
@serban300 serban300 force-pushed the parachains_operating_mode_and_owner branch from d3cc258 to 0d18874 Compare June 28, 2022 13:36
Copy link
Copy Markdown
Contributor

@svyatonik svyatonik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you! Yep - it breaks both relay and existing runtimes, thanks for proper labeling! Fortunately, apart from Rialto/Millau, we only have those pallets deployed at Rococo/Wococo and we're not going to make any upgrades there - instead this deployment will be deprecated soon.


/// Operating mode for a bridge module.
pub trait OperatingMode: Send + Copy + Debug + FullCodec {
fn is_halted(&self) -> bool;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please some docs for this public method

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I missed it. Done.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries! Thanks! :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(btw - I still do not see any docs :) )

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I placed it in the implementation by mistake. Fixed.

@serban300 serban300 force-pushed the parachains_operating_mode_and_owner branch from 0d18874 to b0a40d7 Compare June 28, 2022 13:42
- define the OperationMode trait and BasicOperatingMode enum
- use the OperationMode trait in all the bridge pallets
- use BasicOperatingMode instead of IsHalted for the Grandpa pallet
- use BasicOperatingMode as part of MessagesOperatingMode

Signed-off-by: Serban Iorga <serban@parity.io>
@serban300 serban300 force-pushed the parachains_operating_mode_and_owner branch from b0a40d7 to 0302a4e Compare June 28, 2022 14:01
Signed-off-by: Serban Iorga <serban@parity.io>
@serban300 serban300 merged commit c5d5a98 into paritytech:master Jun 28, 2022
svyatonik pushed a commit that referenced this pull request Jul 17, 2023
serban300 added a commit to serban300/parity-bridges-common that referenced this pull request Mar 27, 2024
Unify the operating mode for bridge pallets

- define the OperationMode trait and BasicOperatingMode enum
- use the OperationMode trait in all the bridge pallets
- use BasicOperatingMode instead of IsHalted for the Grandpa pallet
- use BasicOperatingMode as part of MessagesOperatingMode

Signed-off-by: Serban Iorga <serban@parity.io>
serban300 added a commit to serban300/parity-bridges-common that referenced this pull request Apr 8, 2024
Unify the operating mode for bridge pallets

- define the OperationMode trait and BasicOperatingMode enum
- use the OperationMode trait in all the bridge pallets
- use BasicOperatingMode instead of IsHalted for the Grandpa pallet
- use BasicOperatingMode as part of MessagesOperatingMode

Signed-off-by: Serban Iorga <serban@parity.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-breaksrelay A PR that is going to break existing relayers. I.e. some Runtime changes render old relayers unusabl PR-breaksruntime A PR that is going to break runtime bridge compatibility. We need to be careful with upgrade.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change the IsHalted storage value for Grandpa from bool to enum

2 participants