-
Notifications
You must be signed in to change notification settings - Fork 7
feat(collator): add by slots check for messages buffer #784
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
base: master
Are you sure you want to change the base?
Conversation
4357908 to
755fe3d
Compare
| let full_slots = self | ||
| .msgs | ||
| .iter() | ||
| .filter(|(_, msgs)| msgs.len() >= limits.slot_vert_size) |
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.
In fact, a slot isn’t filled with messages from only one account. So it’s incorrect to look for all accounts whose message count exceeds the vertical limit. A slot can contain messages from multiple accounts, but any given account can appear in only one slot. Thus, if our slot height is 10 and our buffer holds { A: 10, B: 4, C: 7 }, the slot may be filled entirely with A’s messages, or with a combination of B’s and C’s messages. Any remaining messages from B and C would then go unused in other slots.
The original idea was that a sorted_index by message count would simplify this calculation. But if benchmarks show that omitting the index isn’t any slower, we can do without it. Though we still need to compare.
755fe3d to
78fae7e
Compare
5a83fcb to
1b9e10a
Compare
dad89c9 to
8d9ab65
Compare
78fae7e to
68f8f4b
Compare
🧪 Network TestsTo run network tests for this PR, use: gh workflow run network-tests.yml -f pr_number=784Available test options:
Test types: Results will be posted as workflow runs in the Actions tab. |
55eb003 to
5358a33
Compare
5358a33 to
e119cc3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #784 +/- ##
==========================================
+ Coverage 46.65% 46.67% +0.01%
==========================================
Files 329 329
Lines 59147 59242 +95
Branches 59147 59242 +95
==========================================
+ Hits 27596 27652 +56
- Misses 30117 30148 +31
- Partials 1434 1442 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|


Pull Request Checklist
NODE CONFIGURATION MODEL CHANGES
None
BLOCKCHAIN CONFIGURATION MODEL CHANGES
None
COMPATIBILITY
SPECIAL DEPLOYMENT ACTIONS
Not Required
PERFORMANCE IMPACT
No impact expected
TESTS
Unit Tests
No coverage
Network Tests
No coverage
Manual Tests
No coverage