Page MenuHomePhabricator

[avalanche] Improve the staking reward proof age selection
ClosedPublic

Authored by Fabien on Sep 11 2023, 09:57.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABCdd1ff64bb41d: [avalanche] Improve the staking reward proof age selection
Summary

The current algo filters the proof that are too recent with respect to the actual time the algo is run. This could lead to some jitter in the proof set as the reference point is not common across the network.

This diff improves on that by using the previous block time as a time reference. There is still an edge case that should be addressed: in the event the block time is in the future, we fall back to the current time.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Fabien requested review of this revision.Sep 11 2023, 09:57
Fabien retitled this revision from [avalanche] Improve the staking reward proof age selection tp be more deterministic to [avalanche] Improve the staking reward proof age selection to be more deterministic.Sep 11 2023, 09:57
Fabien retitled this revision from [avalanche] Improve the staking reward proof age selection to be more deterministic to [avalanche] Improve the staking reward proof age selection.
Fabien edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 11 2023, 14:42