-
Notifications
You must be signed in to change notification settings - Fork 3
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
whois: Add bitfield performance subcommand #834
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
Signed-off-by: Alexandru Gheorghe <[email protected]>
@@ -89,6 +95,35 @@ enum WhoisCommand { | |||
ByPeerId(PeerIdOptions), | |||
/// Display information about all validators. | |||
DumpAll, | |||
/// Display performance statistics for bitfields for each validator. | |||
BitFieldsPerformance(BitFieldsPerformance), |
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.
BitFieldsPerformance(BitFieldsPerformance), | |
BitfieldsPerformance(BitfieldsPerformance), |
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.
I believe we should use the common spelling for bitfields
|
||
for _ in 0..opts.num_blocks { | ||
let Ok(Some(block_hash)) = executor.get_block_hash(&self.opts.ws, Some(start)).await else { | ||
break; |
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.
shouldn't we print some output on error?
Add BitfieldPerformace subcommand that uses the onchain data to list the validator's performance regarding the availability bitfields. The tool logic which validators don't have the right performance is really naive, but useful it was used in root causing: paritytech/polkadot-sdk#6910.
The command just crawls back from a give start block a specified number of blocks a prints the stats about validators that are bellow a user-defined performance threshold. For example you can use the tool to determine all validators that didn't populate their bitfields in 30% of the relay chain blocks.
Usage:
Output example