-
Notifications
You must be signed in to change notification settings - Fork 0
BAM writer service: BAM writer service #30
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
#### API - Added new endpoint bam_epoch_metrics - Modified the endpoint `validators` to add new fields `jito_pool_eligible`, `jito_pool_directed_stake_target` #### Bam Writer Service - Track total stakes among bam validators each epoch #### Kobe Writer Service - Added new field `jito_pool_eligible`, `jito_pool_directed_stake_target` in validators table
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 (Block Assembly Marketplace) Writer Service to track and calculate BAM delegation metrics according to JIP-28 specifications. It also extends the API with a new endpoint for BAM epoch metrics and enhances the validators endpoint with Jito pool eligibility information.
- Implements BAM writer service with automated epoch tracking and JIP-28 tier-based delegation calculations
- Adds new
bam_epoch_metricAPI endpoint to expose BAM delegation data - Extends validator data model with
jito_pool_eligibleandjito_pool_directed_stake_targetfields
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| bam-writer-service/src/main.rs | Main entry point for BAM writer service with epoch threshold monitoring |
| bam-writer-service/src/lib.rs | Core BAM writer logic for fetching validator data and calculating metrics |
| bam-writer-service/src/bam_delegation_criteria.rs | JIP-28 tier-based delegation calculation implementation with comprehensive tests |
| bam-writer-service/Cargo.toml | Dependencies for the new BAM writer service |
| bam-writer-service/README.md | Documentation for BAM writer service functionality |
| core/src/db_models/bam_epoch_metric.rs | Database model and store for BAM epoch metrics |
| core/src/db_models/validators.rs | Added jito pool eligibility fields to validator model |
| core/src/db_models/mod.rs | Registered new bam_epoch_metric module |
| core/src/fetcher.rs | Added logic to determine jito pool eligibility and directed stake targets |
| core/src/lib.rs | Added Serialize trait to SortOrder enum |
| api/src/schemas/bam_epoch_metric.rs | Response schema for BAM epoch metric endpoint |
| api/src/schemas/validator.rs | Added jito pool fields to validator response schema |
| api/src/schemas/mod.rs | Registered bam_epoch_metric schema module |
| api/src/schemas/stake_pool_stats.rs | Added Serialize/Deserialize traits for consistency |
| api/src/schemas/jitosol_ratio.rs | Added Deserialize trait to response schema |
| api/src/schemas/validator_history.rs | Changed epoch query type from u16 to u64 for larger epoch numbers |
| api/src/resolvers/query_resolver.rs | Implemented BAM epoch metric resolver and added caching |
| api/src/main.rs | Registered new BAM epoch metric endpoint route |
| writer-service/src/stake_pool_manager.rs | Added jito steward configuration parameters |
| writer-service/src/main.rs | Added command-line arguments for steward program and config |
| writer-service/src/lib.rs | Passed steward parameters to stake pool manager |
| writer-service/Cargo.toml | Added solana-pubkey dependency |
| docker-compose.yml | Added mainnet and testnet BAM writer service containers |
| Dockerfile | Added build target for BAM writer service |
| Cargo.toml | Added bam-writer-service workspace member and updated stakenet dependency |
| Cargo.lock | Updated dependencies with new bam-writer-service package |
| .github/workflows/build-container-images.yaml | Added bam-writer-service to build options |
| .github/workflows/test.yaml | Removed trailing newline |
| README.md | Updated architecture diagram and added BAM writer service documentation |
💡 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 28 out of 29 changed files in this pull request and generated 9 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