Skip to content

Conversation

@aoikurokawa
Copy link
Collaborator

No description provided.

})
.unwrap_or(false);
.map(|entry| ClientType::from_u8(entry.client_type));
let is_jito_client = matches!(client_type, Some(ClientType::JitoLabs));
Copy link
Collaborator Author

@aoikurokawa aoikurokawa Oct 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There could be a case where both running_jito and running_bam are true. In this case, should we prioritize running_bam?

let running_jito = if matches!(client_type, Some(ClientType::Bam)) {
    false
} else {
    let is_jito_client = matches!(client_type, Some(ClientType::JitoLabs));
    has_tip_account || is_jito_client
}
https://www.validators.app/validators/Ft4ADhkxMVfgxNDQFqA3ymaNGC39rCHdUj6H8KEWQqXy?locale=en&network=testnet
        {
            "vote_account": "AmZs4Pkjs7fXCDfKDfydJnv7xKRk12DgNXynfL3boYty",
            "mev_commission_bps": 1000,
            "mev_rewards": 0,
            "priority_fee_commission_bps": 10000,
            "priority_fee_rewards": 0,
            "running_jito": true,
            "running_bam": true,
            "active_stake": 241668580401242
        },

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something the client-side logic can handle? To me, makes sense for the backend (kobe) to expose the correct values for both fields.

@aoikurokawa aoikurokawa requested a review from Copilot October 28, 2025 23:30
Copy link

Copilot AI left a 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 tracking the BAM validator client type alongside the existing Jito client tracking. It also includes development environment improvements by commenting out MongoDB authentication in docker-compose and updating documentation to reflect unauthenticated MongoDB connections.

Key changes:

  • Added running_bam field to track validators running the BAM client (similar to existing running_jito tracking)
  • Refactored client type detection logic to be more reusable across multiple client types
  • Updated MongoDB configuration to run without authentication for easier local development

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
core/src/client_type.rs Added Bam variant to ClientType enum with value mapping of 6
core/src/fetcher.rs Refactored client type detection and added running_bam field to ChainData
core/src/db_models/validators.rs Added running_bam field to Validator model with documentation
api/src/schemas/validator.rs Added running_bam field to ValidatorEntry schema
api/src/resolvers/query_resolver.rs Populated running_bam field in query responses
docker-compose.yml Commented out MongoDB authentication environment variables
README.md Updated MongoDB connection URI example to remove authentication
.gitignore Removed overly broad .env** pattern
.env.example Added example environment configuration file
Comments suppressed due to low confidence (1)

core/src/client_type.rs:25

  • The documentation comment should be updated to include the new BAM client type mapping (6: BAM) in the list of client type values.
    /// - Other values: Stored as `Other(value)`

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@aoikurokawa aoikurokawa marked this pull request as ready for review October 28, 2025 23:38
@aoikurokawa aoikurokawa requested a review from ebatsell October 29, 2025 00:22
mev_commission_bps,
mev_revenue_lamports,
running_jito,
running_bam: matches!(client_type, Some(ClientType::Bam)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit; would prefer a let is_bam_client ... just like we have let is_jito_client instead of the inline eval here.

@aoikurokawa aoikurokawa merged commit d0df43a into master Oct 29, 2025
5 checks passed
@aoikurokawa aoikurokawa deleted the ak/bam branch October 29, 2025 01:31

credentials/
scripts/keys
*.env**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we keep plain .env here so someone doesn't accidentally commit their own real one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants