feat(rpc): implement getBalance RPC method#1212
Draft
prestonsn wants to merge 10 commits intoadamw/implement-getSlot-in-rpcfrom
Draft
feat(rpc): implement getBalance RPC method#1212prestonsn wants to merge 10 commits intoadamw/implement-getSlot-in-rpcfrom
prestonsn wants to merge 10 commits intoadamw/implement-getSlot-in-rpcfrom
Conversation
Contributor
prestonsn
commented
Feb 6, 2026
- Add getBalance handler with commitment level support in AccountsDB
- Add getSlotForCommitment to SlotTracker for commitment-based slot resolution
- Update registerRPCHooks signature to accept slot_tracker and snapshot_slot
- Use snapshot slot as fallback when no live slot tracker is available
b9f7b3e to
a4546e2
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (13.04%) is below the target coverage (85.00%). You can increase the patch coverage or adjust the target coverage.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
cf75dc5 to
e7172e5
Compare
- 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.
Condense nested if statements into single-line conditional return.
…AndHandleNewRoot test
e7172e5 to
0568f9e
Compare
a4546e2 to
9d4321a
Compare
- Add getBalance handler with commitment level support in AccountsDB - Add getSlotForCommitment to SlotTracker for commitment-based slot resolution - Update registerRPCHooks signature to accept slot_tracker and snapshot_slot - Use snapshot slot as fallback when no live slot tracker is available
9d4321a to
25cb22e
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.