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
Branch
stakingreward_deterministic_timepoint
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 24986
Build 49560: Build Diffbuild-diff · build-without-wallet · build-debug · build-clang · lint-circular-dependencies · build-clang-tidy
Build 49559: arc lint + arc unit

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