Skip to content

feat(rpc): start rpc implementation#1179

Draft
ajw221 wants to merge 35 commits intomainfrom
adamw/rpc-v1
Draft

feat(rpc): start rpc implementation#1179
ajw221 wants to merge 35 commits intomainfrom
adamw/rpc-v1

Conversation

@ajw221
Copy link
Contributor

@ajw221 ajw221 commented Jan 25, 2026

No description provided.

Rexicon226 and others added 30 commits January 15, 2026 05:52
…r multiple transitions which will be addressed in a immediate follow up PR
- Add AccountSharedData.fromAccount helper for cleaner conversions
- Remove redundant readRange method in buffer_pool
- Fix errdefer ordering in SlotConstants initialization
- Add stake account validation comments for clarity
- Update epoch transitions tests to use accounts_db.Two
- Use PubkeyMap for node_id_to_vote_accounts consistency
- Follow Zig naming convention (lowercase for constants)
- Remove unused tower_state.zig module
- Replace FullInflationFeatures struct with fullInflationFeaturesEnabled method
- Clone reward_status when creating child slot state
- Remove unused stake.zig module
- Flatten EpochRewardStatus to use optional partitioned_indices
- Remove intermediate types: EpochRewardPhase, StartBlockHeightAndRewards
- Move ValidatorRewards and RewardsForPartitioning to calculation.zig
- Fix memory leak in buildUpdatedStakeReward
- Propagate OutOfMemory errors in builtin program migrations
- Fix slot parameter for stateless builtin feature activation check
- Propagate account reader errors instead of swallowing with catch null
- Handle NoCreditsToRedeem specifically in stake vote rewards
- Add missing defer deinit calls for fetched accounts
- Flatten nested conditionals with early returns
- Remove unnecessary scope blocks
- Add issue links for unimplemented TODOs
…count tests

- Remove intermediate delegated_stakes map by accumulating stakes directly
  into vote accounts during iteration
- Add VoteAccount.equals() method for proper account comparison
- Re-enable previously commented-out test assertions
- Restore compile-time test guard for initRandom
- Use @min/@max instead of nested ternary in getRewardDistributionNumBlocks
- Flatten loop conditionals with early continue pattern
- Fix memory cleanup by using defer instead of errdefer
- Clarify TODO comment about account cloning
- Remove struct, use standalone functions instead
- Rename file to hasher.zig
- Add initial HookContext for future rpc methods
  - Add slot tracking atomics and accounts DB for processed/confirmed/finalized states
- Make Rooted.largest_rooted_slot thread-safe using std.atomic.Value
- Update replay service to update slot states as blocks are processed
- Add initForTests helper for test initialization
- Move advanceReplay, trackNewSlots, freezeCompletedSlots, bypassConsensus into ReplayState as methods
- Add magic_tracker to HookContext for leader schedule lookups
- Add GetSlotLeader parameters and response structs
- Implement getSlotLeader method using magic_tracker
- Add GetSlotLeaders parameters and response structs
- Implement getSlotLeders method in HookContext
- Add genesis hash computation (SHA256 of raw file bytes) to GenesisConfig.init
- Update GensisConfig.init to return InitResult containing both config and computed config hash
- Add getGenesisHash RPC method using precomputed hash
- Add tests verifying mainnet/testnet/devnet genesis hashes
@ajw221 ajw221 self-assigned this Jan 25, 2026
@github-project-automation github-project-automation bot moved this to 🏗 In progress in Sig Jan 25, 2026
@ajw221 ajw221 changed the base branch from main to harnew/epoch-state-tracking January 25, 2026 16:39
- Adjust formatting in replay/service.zig
- Adjust formatting in rpc/methods.zig
- Remove unused builtin import from Rooted.zig
@yewman yewman force-pushed the harnew/epoch-state-tracking branch from c482a6d to 8a050a8 Compare January 26, 2026 16:56
- Add gossip table and shred version to startGossip rpc hooks context
- Add getClusterNodes RPC method to startGossip rpc hooks context
- Add JSON serialization for SocketAddr and ClientVersion
- Use native types instead of strings for RpcContactInfo fields
@yewman yewman force-pushed the harnew/epoch-state-tracking branch 5 times, most recently from 28f730f to f3844f8 Compare January 28, 2026 21:56
@dnut dnut linked an issue Jan 30, 2026 that may be closed by this pull request
@yewman yewman force-pushed the harnew/epoch-state-tracking branch 3 times, most recently from 6bb797e to e250f1f Compare February 9, 2026 05:11
Base automatically changed from harnew/epoch-state-tracking to main February 11, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🏗 In progress

Development

Successfully merging this pull request may close these issues.

feat(rpc): first few methods from gossip and replay

5 participants