Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Implementer's Guide: Make HRMP use upward message kinds #1591

Merged
merged 9 commits into from
Aug 18, 2020

Conversation

pepyakin
Copy link
Contributor

This PR changes HRMP so that it uses upward message kinds that were introduced in #1556 for channel opening and closing channels.

We also drop the notion of initiator because it is not used. To support requests for governance or retiring HRMP we introduce another queue which will be processed during the session change.

This PR doesn't update the TransientValidationData yet in spirit of #1539 since it would inflate it. I wonder if we could change TransientValidationData to something that won't require us assembling a lot of data.

@pepyakin pepyakin added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Aug 14, 2020
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
/// Used for checking if a given channel is registered for closure.
///
/// The set is accompanied by a list for iteration.
///
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 explicitness

Copy link
Contributor

@drahnr drahnr left a comment

Choose a reason for hiding this comment

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

A few very minor nits, other than that - LGTM!

pepyakin and others added 2 commits August 17, 2020 17:58
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
/// Invariant:
/// - There are no channels that exists in list but not in the set and vice versa.
HrmpOpenChannelRequests: map HrmpChannelId => Option<HrmpOpenChannelRequest>;
HrmpOpenChannelRequestsList: Vec<HrmpChannelId>;
Copy link
Contributor

Choose a reason for hiding this comment

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

frame maps support iteration already, i believe.

Co-authored-by: Robert Habermeier <rphmeier@gmail.com>
@rphmeier rphmeier merged commit 31f7ef9 into master Aug 18, 2020
@rphmeier rphmeier deleted the ser-hrmp-after-ump-v2 branch August 18, 2020 10:40
ordian added a commit that referenced this pull request Aug 20, 2020
* master:
  Companion for Substrate #6815 (Dynamic Whitelist) (#1612)
  Candidate backing respects scheduled collator (#1613)
  implementers-guide: in TOC move collators before backing, to match protocol pipeline (#1611)
  Initial guide text for approvals and especially approvals assignments  (#1518)
  Implement validation data refactor (#1585)
  Implementer's Guide: Make HRMP use upward message kinds (#1591)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants