Improve error messages returned by TX execution#2958
Merged
tzemanovic merged 24 commits intomainfrom Apr 12, 2024
Merged
Conversation
grarco
reviewed
Mar 26, 2024
| @@ -41,12 +41,13 @@ fn apply_tx(ctx: &mut Ctx, tx: Tx) -> TxResult { | |||
| .map_err(|err| { | |||
| ctx.set_commitment_sentinel(); | |||
Collaborator
There was a problem hiding this comment.
Maybe in a future PR we could also get rid of this other sentinel just like you did for the vps
grarco
reviewed
Mar 26, 2024
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.
tzemanovic
reviewed
Apr 1, 2024
tzemanovic
approved these changes
Apr 1, 2024
tzemanovic
added a commit
that referenced
this pull request
Apr 8, 2024
* 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
tzemanovic
added a commit
that referenced
this pull request
Apr 8, 2024
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. |
tzemanovic
added a commit
that referenced
this pull request
Apr 10, 2024
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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