Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
Rexicon226
suggested changes
Feb 4, 2026
yewman
previously approved these changes
Feb 11, 2026
- Add StaticHookContext to provide genesis hash to RPC handlers - Support pointer types in Hooks.set for context registration - Compute genesis config hash from file bytes during deserialization - Add hash verification to genesis config tests for testnet, devnet, and mainnet
- Use readFromSlice instead of fixedBufferStream + reader - Add explicit 100 MB max file size limit
- Change genesis_hash from Base58String to Hash type - Add custom jsonStringify to GetGenesisHash.Response for base58 output - Simplify getGenesisHash method to return wrapped Hash
6f9125b to
4fcb236
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
getGenesisHashRPC methodImplementation
GenesisConfigto store its precomputed hashHooks.setto be able to take a pointer to a valueStaticHookContextfor implementing any future RPC methods containing static dataRamifications
genesis_hashonStaticHookContextcurrently only works if a pointer to the rpc hook is given, otherwise if an owned value for the rpc hook is given, an integer overflow will occur on method call due to the passed in value becoming a dangling slice. Because the lifetime of the value lives for the entire runtime of the RPC server this shouldn't be an issue.Tests
GenesisConfigunit tests around ensuring each precomputed hash matches agave's values.