Add `--include-costs` option to `stellar network settings` to filter verbose cost params
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 55/100
Research direction
Start at the implementation of the stellar network settings command and trace how its output is assembled. Compare the default command output with --include-costs; done means both verbose cost parameter arrays are omitted by default and included in full when the flag is supplied.
Written by the indexing model from the issue text.
Description
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 https://github.com/stellar/stellar-rpc/pull/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:
- https://github.com/stellar/stellar-rpc/pull/563#issuecomment-3638982475 (cc @Shaptic)
- https://github.com/stellar/stellar-rpc/pull/563#issuecomment-3634536624
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.
- Dominant language
- Rust
- Stars
- 123
- Forks
- 141
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 17
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from stellar/stellar-cli
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
stellar/stellar-cli#2384 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
stellar/stellar-cli#2347 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
stellar/stellar-cli#2723 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
stellar/stellar-cli#2722 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
stellar/stellar-cli#2703 ·
All issues in stellar/stellar-cli
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
kwakseongjae/auto-hwp#319 ·
-
area:cli bug filter-quality good first issue priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 1/5 Under an hour Newbie friendliness 72/100
bevyengine/bevy#25861 ·
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
enhancement remote
Difficulty 2/5 1-3 hours Newbie friendliness 68/100