Skip to content

Add Deactivate Feature Flag to CLI Local Validator#2872

Merged
acheroncrypto merged 3 commits into
otter-sec:masterfrom
amilz:add-deactivate-feature-to-CLI
Mar 30, 2024
Merged

Add Deactivate Feature Flag to CLI Local Validator#2872
acheroncrypto merged 3 commits into
otter-sec:masterfrom
amilz:add-deactivate-feature-to-CLI

Conversation

@amilz

@amilz amilz commented Mar 30, 2024

Copy link
Copy Markdown
Contributor

Adds support for --deactivate-feature flag to the solana-test-validator config in Anchor.toml. User must pass an array of feature pubkeys.

Example Anchor.toml

[test.validator]
bind_address = "0.0.0.0"
url = "https://api.mainnet-beta.solana.com"
ledger = ".anchor/test-ledger"
rpc_port = 8899
slots_per_epoch = "32"
warp_slot = "18464"
deactivate_feature = ["GDH5TVdbTPUpRnXaRyQqiKUa7uZAbZ28Q2N9bhbKoMLm", "zkiTNuzBKxrCLMKehzuQeKZyLtX2yvFcEKMML8nExU8"]

After local validator is running you can run solana feature status -ul to check that features are deactivated.

Changes

  • add deactivate_feature to Validator struct and relevant impls in CLI config
  • create pubkey validation parsing for deactivate_feature in validator_flags function

Fixes #2871

Ref

- add `deactivate_feature` to Validator struct and relevant impls in CLI config
- create pubkey validation parsing for `deactivate_feature` in `validator_flags` function
@vercel

vercel Bot commented Mar 30, 2024

Copy link
Copy Markdown

@amilz is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks great, and thanks for the explanation!

Before we merge, could you also note this feature in the CHANGELOG?

Comment thread cli/src/config.rs Outdated

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please run cargo fmt to fix the CI error.

@amilz amilz requested a review from acheroncrypto March 30, 2024 15:57

@acheroncrypto acheroncrypto left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you!

@acheroncrypto acheroncrypto merged commit 45c84c5 into otter-sec:master Mar 30, 2024
@amilz amilz deleted the add-deactivate-feature-to-CLI branch March 30, 2024 16:42
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: add deactivate-feature flag to local test validator

2 participants