-
Notifications
You must be signed in to change notification settings - Fork 0
BAM writer service: BAM writer service #27
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
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 introduces a new BAM writer service to track BAM validator metrics per epoch and adds support for jito pool eligibility fields in the validators table. Key changes include:
- New BAM writer service that monitors BAM delegations and calculates available delegation stake based on JIP-28 specification
- New API endpoint
/api/v1/bam_epoch_metricfor retrieving BAM epoch metrics - Added
jito_pool_eligibleandjito_pool_directed_stake_targetfields to validators
Reviewed Changes
Copilot reviewed 45 out of 46 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| bam-writer-service/* | New service to track BAM validator metrics including total network stake weight, available delegation stake, and eligible validator count per epoch |
| core/src/db_models/bam_epoch_metric.rs | New database model for storing BAM epoch metrics with CRUD operations |
| core/src/fetcher.rs | Added logic to calculate jito pool eligibility based on voting epochs and stake thresholds, and check directed stake targets |
| core/src/validators_app.rs | Added Localhost cluster variant support |
| api/src/schemas/bam_epoch_metric.rs | New schema for BAM epoch metric API responses |
| api/src/resolvers/query_resolver.rs | Added resolver and endpoint for BAM epoch metrics |
| api/src/schemas/validator.rs | Added jito pool eligibility fields to validator schema |
| writer-service/src/stake_pool_manager.rs | Updated to pass jito steward configuration for pool eligibility checks |
| api-client/* | New Kobe API client library with comprehensive async support |
| Cargo.toml | Updated dependencies including stakenet-sdk revision and reqwest version |
| core/src/rpc_utils.rs | Replaced solana-rpc-client-api with solana-client error types |
| Dockerfile | Added bam-writer-service container image |
💡 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.
Pull Request Overview
Copilot reviewed 48 out of 49 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
API
validatorsto add new fieldsjito_pool_eligible,jito_pool_directed_stake_targetBam Writer Service
Kobe Writer Service
jito_pool_eligible,jito_pool_directed_stake_targetin validators table