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

Add --policy-config argument to create-genesis-config #3414

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ndr-ds
Copy link
Contributor

@ndr-ds ndr-ds commented Feb 25, 2025

Motivation

Right now we pass everything manually, but there's already a config that can make this easier

Proposal

User the policy config instead

Test Plan

CI

Release Plan

  • Nothing to do / These changes follow the usual release cycle.

Copy link
Contributor Author

ndr-ds commented Feb 25, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@ndr-ds ndr-ds force-pushed the 02-25-add_--policy-config_argument_to_create-genesis-config branch from cc46027 to 975a240 Compare February 25, 2025 22:01
@ndr-ds ndr-ds marked this pull request as ready for review February 25, 2025 22:44
Copy link
Contributor

@afck afck left a comment

Choose a reason for hiding this comment

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

Great idea! 👍


Default value: `0`
* `--read-operation-price <READ_OPERATION_PRICE>` — Set the price per read operation
Possible values: `default`, `only-fuel`, `fuel-and-block`, `all-categories`, `devnet`
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure we need all these, and I don't think the names should be user-visible like this. I think we should only have two user-visible ones:

  • testnet (renamed from devnet), and
  • no-fees (renamed from default, where everything is zero and limits are MAX).

The other two are, I think, only used in tests, and should be feature-gated?

/// Set the base price for creating a block.
#[arg(long, default_value = "0")]
block_price: Amount,
#[arg(long)]
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there's an option in clap to mark arguments mutually exclusive - i.e. that one doesn't have to be provided if another one is (here path to the config file).

Unless we want to allow for overwriting the config file with CLI args but if we do I'd suggest adding that explicitly in the comments.

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.

3 participants