Skip to content

Add --include-costs option to stellar network settings to filter verbose cost params #2322

@leighmcculloch

Description

@leighmcculloch

What problem does your feature solve?

The stellar network settings command outputs the full network configuration including contract_cost_params_cpu_instructions and contract_cost_params_memory_bytes arrays. These cost params are extremely verbose (70 entries each) and make the output difficult to work with for most use cases.

This came up in stellar/stellar-rpc#563 where there was discussion about exposing network limits through RPC's getNetwork endpoint. The consensus was to not duplicate this functionality in RPC and instead point users to the CLI command, but the CLI output needs to be more usable by filtering out the verbose cost info by default.

See:

What would you like to see?

Add a new --include-costs flag:

  • By default, exclude cost params from output
  • With --include-costs, include the full cost params arrays

What alternatives are there?

Users can currently filter the output using jq:

stellar network settings --network testnet | jq 'del(.updated_entry[].contract_cost_params_cpu_instructions, .updated_entry[].contract_cost_params_memory_bytes)'

But this is cumbersome and requires knowing the field names to filter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Backlog (Not Ready)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions