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

Breakdown the Router module on Dmp, Ump, Hrmp modules #1939

Merged
16 commits merged into from
Nov 16, 2020
Merged

Conversation

pepyakin
Copy link
Contributor

@pepyakin pepyakin commented Nov 10, 2020

Even though this PR looks big it actually isn't. What we do here is we split the Router module on three separate independent modules: Dmp, Ump and Hrmp, and update tests and plumbing. I tried to collate a proper commit history so I'd recommend going over all commits.

As I said in our parachains team call, there is a not so nice duplication of OutgoingParas. On the bonus side, the external modules (such as registrar) now can call into a single entrypoint rather than calling both Router and Paras schedule_para_cleanup. In future, we would need to tackle this.

@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 Nov 10, 2020
@pepyakin pepyakin marked this pull request as draft November 11, 2020 11:52
@pepyakin
Copy link
Contributor Author

pepyakin commented Nov 11, 2020

borked rebase, converting into draft. UPD. fixed

@pepyakin pepyakin marked this pull request as ready for review November 11, 2020 12:25
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
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.

Looks good!

roadmap/implementers-guide/src/glossary.md Outdated Show resolved Hide resolved
roadmap/implementers-guide/src/runtime/hrmp.md Outdated Show resolved Hide resolved
Co-authored-by: Bernhard Schuster <bernhard@ahoi.io>
Copy link
Contributor

@coriolinus coriolinus left a comment

Choose a reason for hiding this comment

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

Overall seems fine with just minor nits. The only real question I have: from the commit messages, it seems like you extracted the DMP, UMP, HRMP modules from existing implementations. However, I don't see where the previous implementation has been removed. If there is dead code remaining, it would be good to get rid of it.

roadmap/implementers-guide/src/runtime/dmp.md Show resolved Hide resolved
roadmap/implementers-guide/src/runtime/dmp.md Outdated Show resolved Hide resolved
roadmap/implementers-guide/src/runtime/ump.md Show resolved Hide resolved

Candidate Acceptance Function:

* `check_upward_messages(P: ParaId, Vec<UpwardMessage>`):
Copy link
Contributor

Choose a reason for hiding this comment

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

messages should be named.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

should it though? Isn't it already clear that when we say "the messages" it refers to those?

I am not entirely against that, but in that case we should probably address it throughout the whole doc


The following routine is intended to be called in the same time when `Paras::schedule_para_cleanup` is called.

`schedule_para_cleanup(ParaId)`:
Copy link
Contributor

Choose a reason for hiding this comment

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

para should be named.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

again, the same logic as here

roadmap/implementers-guide/src/glossary.md Outdated Show resolved Hide resolved
@pepyakin
Copy link
Contributor Author

pepyakin commented Nov 13, 2020

I've addressed some of the uncontroversial comments. The router module implementation was removed in this commit

a870f71

Additionally, I've noticed that hrmp.rs has quite a lot of repetition, all these HRMP prefixes/postfixes. I will get rid of em' but in a separate PR.

@pepyakin
Copy link
Contributor Author

Yeah, @coriolinus you were right! That commit did not include removal of the (sub-)modules themselves.

@pepyakin
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Nov 16, 2020

Trying merge.

@ghost ghost merged commit c770881 into master Nov 16, 2020
@ghost ghost deleted the ser-breakdown-router branch November 16, 2020 14:02
ordian added a commit that referenced this pull request Nov 16, 2020
* master:
  Breakdown the Router module on Dmp, Ump, Hrmp modules (#1939)
  Add CI job to verify extrinsic ordering (#1950)
This pull request was closed.
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