-
Notifications
You must be signed in to change notification settings - Fork 61
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
AuthorNoting should only deal with parachains with assigned collators (instead of all) #884
base: master
Are you sure you want to change the base?
Conversation
WASM runtime size check:Compared to target branchdancebox runtime: 1428 KB (no changes) ✅ flashbox runtime: 848 KB (no changes) ✅ dancelight runtime: 2180 KB (no changes) ✅ container chain template simple runtime: 1132 KB (no changes) ✅ container chain template frontier runtime: 1416 KB (no changes) ✅ |
Coverage Report@@ Coverage Diff @@
## master jeremy-author-noting-only-chains-with-collators +/- ##
===================================================================================
- Coverage 65.57% 65.54% -0.03%
Files 351 351
+ Lines 61167 61236 +69
===================================================================================
+ Hits 40107 40136 +29
+ Misses 21060 21100 +40
|
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.
Changes overall look good! small comments
Actually I just realized there is one change we need to do: registered_paras() currently tries to detect whether the next block is going to change the session. If so, we use the scheduled registered paras for the next session. See
The reason behind this is that runtime-apis are called with the state on-finalize of the previous block. And if the previous block is a session-boundary, we will have the wrong things injected here. MY suggestion is that you keep the new |
@nanocryk dev_tanssi tests are failing because the author noting weight changed. Could you update the test to use this syntax? So that we see the new value the next time the test fails: const min = (CLEAR_ORIGIN_WEIGHT * 90n) / 100n;
const max = (CLEAR_ORIGIN_WEIGHT * 110n) / 100n;
expect(
weight,
`weightMessage returned ${weight} but expected a value between ${min} and ${max}`
).to.satisfy((val) => val >= min && val <= max); |
this is actually a good sign, I do believe that we have 2 registered chains but only 1 gets collators. If that is the case the weight reduction would make sense. Can you check that? |
Currently the runtime checks that the inherents contain the relay proof of all registered parachains to notice new blocks.
If a chain doesn't have assigned collators, we know there can't be new blocks, so it's safe to skip them in the runtime, and thus not insert them in the inherents. This PR thus updates both runtime and client sides to only check/insert inherents related to parachains with assigned collators.