Skip to content

Conversation

@spalladino
Copy link
Contributor

To support slashInactivityConsecutiveEpochThreshold greater than 1.

To avoid also storing a lot of raw stats, this PR also decouples the history length and proven performance length stored.

To support `slashInactivityConsecutiveEpochThreshold` greater than 1.

To avoid also storing a lot of raw stats, this PR also decouples the
history length and proven performance length stored.

// This should be sorted by epoch, but just in case.
// Since we keep the size small, this is not a big deal.
currentPerformance.sort((a, b) => Number(a.epoch - b.epoch));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not overly familiar with this area of code. But does this PR invalidate the assumption of // Since we keep the size small, this is not a big deal.?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It kinda does, that's why I added the unit test with 2k entries. It runs fast enough, nothing to worry about.

@spalladino spalladino added this pull request to the merge queue Sep 12, 2025
Merged via the queue into next with commit d6cff17 Sep 12, 2025
14 checks passed
@spalladino spalladino deleted the palla/proven-performance-length branch September 12, 2025 12:53
spalladino added a commit that referenced this pull request Sep 12, 2025
To support `slashInactivityConsecutiveEpochThreshold` greater than 1.

To avoid also storing a lot of raw stats, this PR also decouples the
history length and proven performance length stored.
spalladino added a commit that referenced this pull request Sep 12, 2025
To support `slashInactivityConsecutiveEpochThreshold` greater than 1.

To avoid also storing a lot of raw stats, this PR also decouples the
history length and proven performance length stored.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants