soroban-cli: outputting long noisy host events without verbose mode enabled
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 38/100
Research direction
Reproduce the issue with the shown soroban contract invoke command and inspect the soroban-cli::log::host_event entry point mentioned in the output. The change is done when the command prints only 3 without verbose mode, while the diagnostic host events remain available when verbose output is enabled.
Written by the indexing model from the issue text.
Description
What version are you using?
- stellar/soroban-tools@b1519a4d90502ce3155960541b2a98c88f3dd043 (rpc and cli)
- stellar/stellar-core@22b9bb38416e5ce058eb9c1fadfdd414a4661833
- stellar/rs-soroban-env@eb5a9ba053a7b64a8eff605db625525378f7bea0
What did you do?
❯ soroban contract invoke --wasm ../rs-soroban-sdk/target/wasm32-unknown-unknown/release/test_add_u64.wasm --id 1 -- add --a 1 --b 2
What did you expect to see?
3
What did you see instead?
2023-09-01T19:54:56.041234Z INFO soroban_cli::log::host_event: 0: HostEvent {
event: ContractEvent {
ext: V0,
contract_id: None,
type_: Diagnostic,
body: V0(
ContractEventV0 {
topics: VecM(
[
Symbol(
ScSymbol(
StringM(fn_call),
),
),
Bytes(
ScBytes(
BytesM(0000000000000000000000000000000000000000000000000000000000000001),
),
),
Symbol(
ScSymbol(
StringM(add),
),
),
],
),
data: Vec(
Some(
ScVec(
VecM(
[
U64(
1,
),
U64(
2,
),
],
),
),
),
),
},
),
},
failed_call: false,
}
2023-09-01T19:54:56.041429Z INFO soroban_cli::log::host_event: 1: HostEvent {
event: ContractEvent {
ext: V0,
contract_id: Some(
Hash(0000000000000000000000000000000000000000000000000000000000000001),
),
type_: Diagnostic,
body: V0(
ContractEventV0 {
topics: VecM(
[
Symbol(
ScSymbol(
StringM(fn_return),
),
),
Symbol(
ScSymbol(
StringM(add),
),
),
],
),
data: U64(
3,
),
},
),
},
failed_call: false,
}
3
Discussion
This seems like possibly a bug, such as we're logging something at the wrong level, or not distinguishing between contract events vs host events when deciding to log at the info level.
However, this might also not be a bug and it might be working as intended. I'm not sure.
- 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