-
Notifications
You must be signed in to change notification settings - Fork 992
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
Improve error messages returned by TX execution #2958
Conversation
@@ -41,12 +41,13 @@ fn apply_tx(ctx: &mut Ctx, tx: Tx) -> TxResult { | |||
.map_err(|err| { | |||
ctx.set_commitment_sentinel(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in a future PR we could also get rid of this other sentinel just like you did for the vps
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change permits error messages to be encoded in the `Err` branch of `Result` types, to facilitate debugging in case of software problems, and to improve the user experience in Namada.
* origin/tiago/tx-errs: Changelog for #2958 Charge gas for yielding values form txs/vps Rebuild wasms for tests Return errs from txs Link against tx yielding host fn Remove panics and improve err handling on tx wasms Yield byte array from txs Add yielded value tx host field
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2958 +/- ##
==========================================
- Coverage 53.44% 53.14% -0.30%
==========================================
Files 310 311 +1
Lines 101574 102150 +576
==========================================
+ Hits 54288 54292 +4
- Misses 47286 47858 +572 ☔ View full report in Codecov by Sentry. |
* origin/tiago/tx-errs: Changelog for #2958 Charge gas for yielding values form txs/vps Rebuild wasms for tests Return errs from txs Link against tx yielding host fn Remove panics and improve err handling on tx wasms Yield byte array from txs Add yielded value tx host field # Conflicts: # wasm/wasm_source/src/tx_init_account.rs # wasm/wasm_source/src/tx_resign_steward.rs # wasm/wasm_source/src/tx_transfer.rs # wasm/wasm_source/src/tx_update_steward_commission.rs # wasm_for_tests/tx_fail.wasm # wasm_for_tests/tx_memory_limit.wasm # wasm_for_tests/tx_mint_tokens.wasm # wasm_for_tests/tx_no_op.wasm # wasm_for_tests/tx_proposal_code.wasm # wasm_for_tests/tx_proposal_ibc_token_inflation.wasm # wasm_for_tests/tx_proposal_masp_reward.wasm # wasm_for_tests/tx_read_storage_key.wasm # wasm_for_tests/tx_write.wasm # wasm_for_tests/tx_write_storage_key.wasm # wasm_for_tests/vp_always_false.wasm # wasm_for_tests/vp_always_true.wasm # wasm_for_tests/vp_eval.wasm # wasm_for_tests/vp_memory_limit.wasm # wasm_for_tests/vp_read_storage_key.wasm # wasm_for_tests/wasm_source/src/lib.rs
Describe your changes
Closes #2673.
Return error messages from tx execution, instead of aborting execution with no context.
Indicate on which release or other PRs this topic is based on
#2940
Diff for review: https://github.com/anoma/namada/compare/tiago/wasm-errs-ux..tiago/tx-errs (in PR https://github.com/anoma/namada/pull/2958/files/620d3d8403794b818a03eddd391dc1153244319e..f707ee96ab8f3abdd45d1afac820a7ce53f6cd6a)
Checklist before merging to
draft