cli: add --do-not-require-vote-history for startup / set-identity #576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Agave exposes a
--require-towerargument for both startup andset-identitythat enforces the tower file is present before allowing startup. If this argument is not present we populate a defaultTower. We then have logic to pull the latestTowerfrom theVoteAccount. While not perfect this gives us some resilience against operator error resulting in slashable votes.In Alpenglow we no longer have the backup option of pulling the
VoteHistoryfrom aVoteAccount. This method is imperfect anyway. Instead always require that aVoteHistoryfile is present on startup or when callingset-identity.To accomodate for first time startups or
set-identityto an unstaked identity (where voting won't happen anyway), plug in a--do-not-require-vote-historycli flag which creates a defaultVoteHistory. This essentially matches the--require-towerworkflow with the opposite default.Sister PR to update invalidator https://github.com/anza-xyz/infra-invalidator/pull/192