Skip to content
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

make solana-metrics optional in vote and stake programs #4425

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

kevinheavey
Copy link

@kevinheavey kevinheavey commented Jan 13, 2025

Problem

LiteSVM depends on these crates, and their dependency on solana-metrics harms compile times and portability significantly. The vote program uses metrics directly, while the stake program merely depends on solana-metrics crate via its solana-vote-program dependency.

Summary of Changes

  • Put the one usage of solana-metrics in solana-vote-program behind a feature flag
  • Add a metrics feature to the vote and stake programs, and enable it by default
  • Add default-features = false to the workspace Cargo.toml entries for the vote and stake programs. This is required to allow people to disable default features. This does not actually disable default features for other workspace dependents unless they each individually disable default features. More info here: https://doc.rust-lang.org/edition-guide/rust-2024/cargo-inherited-default-features.html

Copy link

mergify bot commented Jan 13, 2025

The Firedancer team maintains a line-for-line reimplementation of the
native programs, and until native programs are moved to BPF, those
implementations must exactly match their Agave counterparts.
If this PR represents a change to a native program implementation (not
tests), please include a reviewer from the Firedancer team. And please
keep refactors to a minimum.

@kevinheavey kevinheavey requested a review from Lichtso January 13, 2025 14:30
@kevinheavey kevinheavey added the automerge automerge Merge this Pull Request automatically once CI passes label Jan 13, 2025
@mergify mergify bot merged commit 73080ab into anza-xyz:master Jan 13, 2025
59 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge automerge Merge this Pull Request automatically once CI passes need:merge-assist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants