feat(rpc): implement getVoteAccounts RPC#1208
Open
prestonsn wants to merge 4 commits intoadamw/implement-getSlot-in-rpcfrom
Open
feat(rpc): implement getVoteAccounts RPC#1208prestonsn wants to merge 4 commits intoadamw/implement-getSlot-in-rpcfrom
prestonsn wants to merge 4 commits intoadamw/implement-getSlot-in-rpcfrom
Conversation
- Add SlotTree.tip() to get highest slot among fork leaves (bypass mode) - Update latest_processed_slot inside vote handling to match Agave behavior - Update latest_processed_slot in bypassConsensus() from SlotTree.tip() - Change ForkChoiceProcessedSlot to use store() since slot can decrease Note: Bypass mode uses highest fork tip, while consensus mode matches Agave's semantics where processed slot only updates when voting.
- Add getVoteAccounts handler to RpcHookContext with full parameter support - Wire epoch_tracker to RPC hooks for epoch vote account lookups - Limit epoch credits to last 5 entries (matches Agave MAX_RPC_VOTE_ACCOUNT_INFO_EPOCH_CREDITS_HISTORY) - Support commitment levels, votePubkey filter, keepUnstakedDelinquents, and delinquentSlotDistance - Partition validators into current/delinquent based on last vote slot - Rename SlotHookContext to RpcHookContext for broader RPC method support - Fix typo: delinquintSlotDistance -> delinquentSlotDistance
47bc7a6 to
0654ea6
Compare
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
e7172e5 to
0568f9e
Compare
7d84370 to
8279fe0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Intent
getVoteAccountsRPC methodImplementation
getVoteAccountshandler toRpcHookContextwith full parameter support (commitmentvotePubkeyfilter,keepUnstakedDelinquents,delinquentSlotDistance)MAX_RPC_VOTE_ACCOUNT_INFO_EPOCH_CREDITS_HISTORYSlotHookContexttoRpcHookContextfor broader RPC method supportRamifications
Tests