Output actual invocation cost and not just simulation cost
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
Research direction
Start with the verbose soroban contract invoke command and the soroban_cli::log::cost output shown in the issue. Trace where the simulated cost is logged and where submitted transaction metadata becomes available. Done means verbose output clearly labels simulated cost and also reports the network’s actual final cost.
Written by the indexing model from the issue text.
Description
When running commands that simulate and submit a transaction, the verbose logs output the cost that simulation estimates, but not the actual final cost that the network reports.
❯ soroban -v contract invoke --network local --source me --id CCKBGX3XBPEDYWSI7RTYGLUVGITKVYNBQKBQCMXH7IRBUJJRZ2K5AATN -- f
2024-02-27T03:59:47.912590Z DEBUG soroban_cli::log::cost: cost===================== Cost ====================
CPU used: 6104747
Bytes read: 6976
Bytes written: 0
==============================================
...
Looking at the logs can be misleading, because it can look like that is the actual cost incurred, but the cost being outputted is only the simulated cost.
I think two changes would be beneficial:
-
The verbose output should be clear that the cost being outputted is simulated cost.
-
The verbose output should include the actual cost as reported by the transaction meta.
- 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