Improve error messages returned by VP evaluation#2940
Conversation
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2940 +/- ##
==========================================
- Coverage 53.44% 53.13% -0.31%
==========================================
Files 310 311 +1
Lines 101574 102095 +521
==========================================
- Hits 54288 54251 -37
- Misses 47286 47844 +558 ☔ View full report in Codecov by Sentry. |
7b18a19 to
883e787
Compare
7df7d49 to
0eaeb5a
Compare
78fff10 to
35b5aee
Compare
|
ah, the |
This was due to the change in host_env fixed in 6cad262 - the tests now have to catch panics instead |
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.
6cad262 to
cf4466d
Compare
cf4466d to
620d3d8
Compare
* tiago/wasm-errs-ux: Changelog for #2940 Generalize VP status codes Add `bitflags` dep Poison tx gas meter on gas overflow Prevent gas overflows from being ignored during VP execution Remove explicit out-of-gas checks during VP execution Rebuild wasms for tests Fix wasm unit tests Return a result of unit from VPs rather than of bools Extend bools and results with new helper methods
* origin/tomas/tx-actions: changelog: add #2934 wasm/vp_implicit+vp_user: re-order to read the main entrypoint first IBC: insert NUT token as verifier in IBC transfer wasm/vp_implicit+vp_user: update using tx action vp_prelude: re-export tx mod multitoken: replace write_log specialization with standard VP rules pgf: add tx actions to check authorization gov: add tx actions to check authorization write_log: skip temp storage keys in changed keys set native_vp/PoS: update to use actions from txs tx_prelude/pos: push tx actions to indicate to VP namada/vm/host_env: add `tx_read_temp` tx,vp_prelude,native_vp: impl tx action Read/Write traits tx: add actions to indicate them from tx to VPs core/address: add `InternalAddress::TempStorage` Changelog for #2940 Remove explicit out-of-gas checks during VP execution Rebuild wasms for tests Return a result of unit from VPs rather than of bools
* origin/tiago/wasm-errs-ux: Changelog for #2940 Generalize VP status codes Add `bitflags` dep Poison tx gas meter on gas overflow Prevent gas overflows from being ignored during VP execution Remove explicit out-of-gas checks during VP execution Rebuild wasms for tests Fix wasm unit tests Return a result of unit from VPs rather than of bools Extend bools and results with new helper methods # Conflicts: # Cargo.lock # crates/apps/src/lib/node/ledger/shell/finalize_block.rs # crates/benches/vps.rs # crates/macros/src/lib.rs # crates/namada/src/ledger/governance/mod.rs # crates/namada/src/ledger/native_vp/ethereum_bridge/vp.rs # crates/namada/src/ledger/native_vp/ibc/mod.rs # crates/namada/src/ledger/native_vp/masp.rs # crates/namada/src/ledger/native_vp/multitoken.rs # crates/namada/src/ledger/protocol/mod.rs # crates/namada/src/ledger/vp_host_fns.rs # crates/namada/src/vm/wasm/run.rs # crates/tests/src/e2e/ledger_tests.rs # crates/tests/src/vm_host_env/ibc.rs # wasm/Cargo.lock # wasm/wasm_source/src/vp_user.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/Cargo.lock
* origin/tomas/tx-actions: changelog: add #2934 wasm/vp_implicit+vp_user: re-order to read the main entrypoint first IBC: insert NUT token as verifier in IBC transfer wasm/vp_implicit+vp_user: update using tx action vp_prelude: re-export tx mod multitoken: replace write_log specialization with standard VP rules pgf: add tx actions to check authorization gov: add tx actions to check authorization write_log: skip temp storage keys in changed keys set native_vp/PoS: update to use actions from txs tx_prelude/pos: push tx actions to indicate to VP namada/vm/host_env: add `tx_read_temp` tx,vp_prelude,native_vp: impl tx action Read/Write traits tx: add actions to indicate them from tx to VPs core/address: add `InternalAddress::TempStorage` Changelog for #2940 Remove explicit out-of-gas checks during VP execution Rebuild wasms for tests Return a result of unit from VPs rather than of bools
* origin/tomas/tx-actions: changelog: add #2934 wasm/vp_implicit+vp_user: re-order to read the main entrypoint first IBC: insert NUT token as verifier in IBC transfer wasm/vp_implicit+vp_user: update using tx action vp_prelude: re-export tx mod multitoken: replace write_log specialization with standard VP rules pgf: add tx actions to check authorization gov: add tx actions to check authorization write_log: skip temp storage keys in changed keys set native_vp/PoS: update to use actions from txs tx_prelude/pos: push tx actions to indicate to VP namada/vm/host_env: add `tx_read_temp` tx,vp_prelude,native_vp: impl tx action Read/Write traits tx: add actions to indicate them from tx to VPs core/address: add `InternalAddress::TempStorage` Changelog for #2940 Remove explicit out-of-gas checks during VP execution Rebuild wasms for tests Return a result of unit from VPs rather than of bools # Conflicts: # crates/benches/native_vps.rs # crates/benches/vps.rs # crates/core/src/validity_predicate.rs # crates/ibc/src/actions.rs # crates/ibc/src/context/token_transfer.rs # crates/ibc/src/context/transfer_mod.rs # crates/ibc/src/lib.rs # crates/macros/src/lib.rs # crates/namada/src/ledger/governance/mod.rs # crates/namada/src/ledger/native_vp/ethereum_bridge/vp.rs # crates/namada/src/ledger/native_vp/ibc/mod.rs # crates/namada/src/ledger/native_vp/masp.rs # crates/namada/src/ledger/native_vp/multitoken.rs # crates/namada/src/ledger/pgf/mod.rs # crates/namada/src/ledger/pos/vp.rs # crates/namada/src/ledger/protocol/mod.rs # crates/namada/src/ledger/vp_host_fns.rs # crates/namada/src/vm/host_env.rs # crates/namada/src/vm/wasm/run.rs # crates/state/src/write_log.rs # crates/tests/src/e2e/ledger_tests.rs # crates/tests/src/vm_host_env/ibc.rs # crates/tests/src/vm_host_env/mod.rs # crates/tx_prelude/src/ibc.rs # wasm/wasm_source/src/tx_resign_steward.rs # wasm/wasm_source/src/tx_update_steward_commission.rs # wasm/wasm_source/src/vp_implicit.rs # wasm/wasm_source/src/vp_user.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
Describe your changes
Closes #2746.
This PR changes the following:
falseorOk(false).Indicate on which release or other PRs this topic is based on
#2852
Diff for review: https://github.com/anoma/namada/compare/tiago/vps-use-storage-err..tiago/wasm-errs-ux
Checklist before merging to
draft