Skip to content

Collect validation stats and report them to Slasher component #714

@SmaGMan

Description

@SmaGMan

During block validation, collect statistics on:

  • which validators submitted valid block signatures
  • which validators submitted invalid signatures

This data should then be sent to the slasher component for further processing.

Implementation suggestions:

  • Report the statistics via a channel. A single channel can be used for multiple types of statistics, separated by an enum.
  • Do not record the statistics immediately upon reaching 2/3+1 signatures weight. Instead, allow additional time to collect late signatures from validators who may be slightly behind. This prevents the issue where up to 1/3-1 validators are incorrectly marked as "lazy" just because their signatures arrived after consensus was reached. This additional time should be configurable, even 0.
  • The slasher is a separate component and it's task spawned inside Node::run(). It should publish a Sender for the statistics channel, which other components can use to submit data.
  • For the initial version, the slasher can simply export collected statistics to metrics for visualization and monitoring.

Metadata

Metadata

Assignees

Labels

C-collatorCollator moduleC-slasherSlasher moduleP-mediumMedium priorityS-featureSeverity: feature. This is adding a new feature.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions