* ci: only kill containers that are based on the solanalabs/rust* images
* Update .buildkite/hooks/post-checkout
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* Update .buildkite/hooks/post-checkout
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
* fix lint
---------
Co-authored-by: Trent Nelson <trent.a.b.nelson@gmail.com>
The optional args allow reuse by ledger-tool repair roots command Also,
hold cleanup lock for duration of Blockstore::scan_and_fix_roots().
This prevents a scenario where scan_and_fix_roots() could identify a
slot as needing to be marked root, that slot getting cleaned by
LedgerCleanupService, and then scan_and_fix_roots() marking the slot as
root on the now purged slot.
The previous help message was pretty generic as it covered two potential
error scenarios. This change gives a more detailed error message to each
of those errors.
#### Summary of Changes
This PR implements HotAccountMeta's getter functions for accessing
optional fields (e.g. rent_epoch, account_hash, etc) and account data.
#### Test Plan
A new unit test is included in this PR.
#### Summary of Changes
This PR adds several functions to AccountMetaOptionalFields
for obtaining the offset of each optional field.
#### Test Plan
New unit test cases are included in this PR.
* Add epoch rewards sysvar test to program test
* Add a test to check epoch rewards sysvar inside/outisde reward interval
---------
Co-authored-by: HaoranYi <haoran.yi@solana.com>
#### Summary of Changes
This PR adds byte_block::read_type(), an util function that
reads the raw part of the input byte block at the specified offset
as type T. This function will be later used by the hot storage.
#### Test Plan
Modified existing unit tests to use byte_block::read_type()
when the input byte block is properly aligned.
* function docs to focus on the action they perform
* update docs for fee sigma proof
* add link to zk token proof doc
* Apply suggestions from code review
Co-authored-by: Tyera <tyera@solana.com>
---------
Co-authored-by: Tyera <tyera@solana.com>
* When there are too many pubkeys in one slot, kick the one with lowest
stake out.
* Cache last_root to reduce read locks we need.
* Use slots_in_epoch to limit number of slots in the map.
* Fix lint errors.
* Only cache stake and slots per epoch once per epoch.
* Revert "Only cache stake and slots per epoch once per epoch."
This reverts commit 8658aad0083456794b4c4403adaf9c74d1a71d09.
* Vote at the tip of current fork if last vote is outside SlotHash
of the tip and last vote expired.
* Add unittest when last vote is outside slothash, we should vote at the tip
of the current fork.
* Revert "Use slots_in_epoch to limit number of slots in the map."
This reverts commit 93574f57a48d2a70fbbc0f62fa8810d3b6bee0af.
* Revert "Cache last_root to reduce read locks we need."
This reverts commit bb114ec2b62cb9c0207328b19c415f6116be0f1c.
* Revert "When there are too many pubkeys in one slot, kick the one with lowest"
This reverts commit 711e29a6a025fd4f11fbc97dcbbe90e4832be04c.
* Move new vote generation when last vote is outside slothash into the
main path, this actually makes more sense since we don't select where
to vote in two different places, and all the vote generation logic
is seamlessly inherited.
* - Move vote refresh to be behind select vote and do not refresh vote if a new
vote is selected.
- Check whether last vote is inside slothash inside select_vote_and_reset_forks
- rename slot_within_slothash to is_in_slothashes_history
- remove one unittest for now, more tests will be added in a separate CL
* Remove new test, it will be in another file.
* Add is_in_slot_hashes_history test in the new file.
* Add unittest for the case when last vote is outside slot hashes.
* Small improvements and more unittests.
* Fix bad merge.
* Update docs/src/terminology.md
Co-authored-by: mvines <mvines@gmail.com>
* Put SwitchForkDecision::FailedSwitchThreshold logic into separate function.
* Make linter happy.
---------
Co-authored-by: mvines <mvines@gmail.com>
#### Summary of Changes
This PR adds getter functions to the TieredAccountMeta for accessing
optional fields and account data.
#### Test Plan
This PR only adds methods to a trait. More tests will be included in the
follow-up PRs.
Slot::MAX was used to specify that a type of snapshots should not be
created; define a constant to be that value and reference the constant
to have a single point of edit.
* Remove credits_auto_rewind feature logic from stake program
* Obey clean-up orders
* Clippy prefers this match
* Remove credits_auto_rewind feature helpers from Bank
* Comment nit for language, and shrink to fit on one line
#### Summary of Changes
This PR introduces HotAccountMeta, the storage and in-memory struct of
the metadata struct for a hot account.
#### Test Plan
Unit tests are included in this PR.
Tested in mnb w/ the prototype implementation of the tiered account storage (#30626)