-
Notifications
You must be signed in to change notification settings - Fork 0
API, Writer Service: Add directed stake target #34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for Jito directed stake target tracking by introducing a new jito_directed_stake_target boolean field to validator data across the API, database, and writer service.
Key changes:
- Adds
jito_directed_stake_targetfield to validator endpoints and database models - Fetches directed stake metadata from the Steward program using the updated stakenet SDK
- Updates the writer service to accept and use a steward config pubkey parameter
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| api/src/schemas/validator.rs | Adds jito_directed_stake_target field to ValidatorEntry schema |
| api/src/resolvers/query_resolver.rs | Maps new field in validators and jitosol_validators query responses |
| core/src/db_models/validators.rs | Adds jito_directed_stake_target to Validator model and initialization |
| core/src/fetcher.rs | Fetches directed stake metadata and determines target validators, changes RPC client to Arc |
| writer-service/src/main.rs | Adds CLI argument for steward config pubkey |
| writer-service/src/lib.rs | Passes steward config to StakePoolManager |
| writer-service/src/stake_pool_manager.rs | Stores steward config and wraps RPC client in Arc |
| Cargo.toml | Updates stakenet dependencies to rev 6d35e58 |
| Cargo.lock | Updates dependency lockfile with new stakenet revision |
| README.md | Updates example command with steward config parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
we'll need to wait to deploy this unless we refactor the get_directed_stake_meta to keep making progress if the account is not found
API
validators,jitosol_validatorsjito_directed_stake_targetjito_directed_stake_lamportsWriter Service
DicrectedStakeMetajito_directed_stake_targetjito_directed_stake_lamportshttps://github.com/jito-foundation/stakenet/blob/9e56c14b7384954be812f9495e41fe54fe5aa026/programs/steward/src/state/directed_stake.rs#L117