Skip to content

Conversation

@EclesioMeloJunior
Copy link

@EclesioMeloJunior EclesioMeloJunior commented Sep 9, 2025

Description

  • Creates Rewards Statistics Collector subsytem
  • Defines the subsystem messages
/// Messages sent to the Statistics Collector subsystem.
#[derive(Debug)]
pub enum StatisticsCollectorMessage {
	// Approval vote received
	ApprovalVoting(Hash, CandidateHash, (ValidatorIndex, DelayTranche)),

	// Candidate received enough approval and now is approved
	CandidateApproved(CandidateHash, Hash),

	// Set of candidates that has not shared votes in time
	ObservedNoShows(SessionIndex, Vec<ValidatorIndex>),

	// All relay block's candidates are approved, therefore relay block is approved
	RelayBlockApproved(Hash)
}
  • Updated approval-voting to send data to the statistics collector subsystem

Next Steps

  • Collect availability distribution/recovery metrics (upload & downloads)
    • Define subsystem messages
    • Update approval distribution to send messages
  • Publish prometheus metrics
  • Calculate approvals tallies

Deployment Plan

The goal is to release this subsystem under a feature flag to collect approvals tallies (amount of useful approval votes and no-shows happened in a given session per validator), and publish them as prometheus metrics so we can measure the tallies amongst a set of validators.

The next step is to build the flow that publishes the approvals tallies on-chain, so each active validator will have the opportunity to publish its own approvals tally, which them can be used to calculate the approvals rewards (based on the median of each validator's tally).

@cla-bot-2021
Copy link

cla-bot-2021 bot commented Sep 9, 2025

User @EclesioMeloJunior, please sign the CLA here.

Copy link
Contributor

@alexggh alexggh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a first pass, overall looks like it is moving into the right direction, thank you!

Left you some comments of things that I think needs addressing.

@burdges
Copy link
Contributor

burdges commented Sep 17, 2025

ref github.com/polkadot-fellows/RFCs/pull/119

@EclesioMeloJunior EclesioMeloJunior changed the title chore: initial statistics subsystem rewards-statistics-collector subsystem Jan 21, 2026
@alexggh alexggh added T8-polkadot This PR/Issue is related to/affects the Polkadot network. T0-node This PR/Issue is related to the topic “node”. labels Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T0-node This PR/Issue is related to the topic “node”. T8-polkadot This PR/Issue is related to/affects the Polkadot network.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants