Skip to content

Add cross domain message benchmark#1481

Merged
NingLin-P merged 13 commits intomainfrom
xdm-benchmark
Jun 6, 2023
Merged

Add cross domain message benchmark#1481
NingLin-P merged 13 commits intomainfrom
xdm-benchmark

Conversation

@NingLin-P
Copy link
Copy Markdown
Contributor

close #1472

This PR implement #1472, it contains changes of:

  • Refactoring pallet-messenger to make it more benchmark friendly
    • Utilized the tx pool requires/provides tag to ensure xdm will be executed one by one in the channel nonce order, and remove our hand-crafted processing queue
    • Add weight tag to xdm to make it easier to inspect the consume weight of a xdm
  • Add test test_unordered_cross_domains_message_should_work to ensure the above changes work as expected
  • Add benchmark/weight to pallet-messenger and pallet-transporter

Code contributor checklist:

NingLin-P added 4 commits June 1, 2023 12:23
… in channel nonce order

Similar to how account nonce is handled, this commit utilzed the tx pool processing queue
to ensure xdm will be executed one by one in the channel nonce order, and remove the need
needness of our hand-crafted processing queue.

Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Message weight tag is used to indicate the consume weight when handling the message

Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
NingLin-P added 6 commits June 1, 2023 12:47
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
Signed-off-by: linning <linningde25@gmail.com>
…rging to pre_dispatch_relay_message

The xdm payload check should be check earlier in validate_unsigned while the
inbox fee charging should only take once thus need to be inside pre_dispatch

Signed-off-by: linning <linningde25@gmail.com>
Copy link
Copy Markdown
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

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

Overall make sense. Good work. Having said that, commits are not self contianed in the sense each commit should not give any compile time errors. First commit I believe is not compilable since the changes are introduced in second. Please add TODOs when the the change is temporary within the PR. This makes it easier to track.

@NingLin-P
Copy link
Copy Markdown
Contributor Author

Overall make sense. Good work. Having said that, commits are not self contianed in the sense each commit should not give any compile time errors. First commit I believe is not compilable since the changes are introduced in second. Please add TODOs when the the change is temporary within the PR. This makes it easier to track.

Sorry for the inconvenience here, I'm constructing these commits after all development is finished thus may forget some changes or pick the wrong changes into a commit, I will pay attention next time.

Signed-off-by: linning <linningde25@gmail.com>
Copy link
Copy Markdown
Contributor

@vedhavyas vedhavyas left a comment

Choose a reason for hiding this comment

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

Minor nits. Good to merge after 👍🏼

NingLin-P added 2 commits June 6, 2023 16:36
Signed-off-by: linning <linningde25@gmail.com>
@NingLin-P NingLin-P enabled auto-merge June 6, 2023 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extrinsic weight for cross domain message

2 participants