mempool to slasher stats bridge#1067
Open
Mododo wants to merge 9 commits intofeature/slasher-sessionfrom
Open
Conversation
🧪 Network TestsTo run network tests for this PR, use: gh workflow run network-tests.yml -f pr_number=1067Available test options:
Test types: Results will be posted as workflow runs in the Actions tab. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## feature/slasher-session #1067 +/- ##
==========================================================
Coverage ? 56.17%
==========================================================
Files ? 458
Lines ? 77089
Branches ? 77089
==========================================================
Hits ? 43305
Misses ? 31670
Partials ? 2114 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7ac1bd1 to
ceef721
Compare
remove "commit finished" msg
because stats need data from previous round
c959be2 to
2b844cc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The questionable uncovered corner case: there is a
received_and_collated=truefast path, when block is both collated and received from network. Then validation step is omitted and signatures are not reported to slasher. We actually have mempool stats for that block, but currently they are not reported.Also in case block collation was cancelled by a received block (
validate_block()returnsValidationStatus::Skipped) anchor stats are collected but not reported to slasher too.Slasher contract is left untouched intentionally until we agree on the models and code flow
The drawbacks of suggested design are:
max_consensus_lag_rounds=210 rounds of anchor stats, otherwise old vsetvalidator_idxs will be mixed with new one (mempool makes no difference between vset and subset changes), so subsets should not be changed too oftencommit_history_rounds=20 rounds lagInherited from general design: stats may not be reported to slasher near validation session end because detached validation tasks can finish after the session has already been closed on the slasher side; same for already flushed batches during the same session. Also in case a collated block is replaced by accepted by the quorum, its stats remain in slasher.
Parent branch code suggestion #1068: in
ValidatorSessionScope.remap_idsusePeerIdtoslotmap (instead ofvalidator_idx->slot) to allow cross-subset stat collection in mempool (likereferences_skipped: see commitfix(consensus): mempool stats across subset change)