CosmWasm / CosmWasm/wasmd

Emit any redacted errors as events

Open
#1,122 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
416
Forks
538
PR merge metrics
No merged PRs in 30d

Description

Since https://github.com/CosmWasm/wasmd/issues/759, any errors from submessages are redacted to avoid issues with non-determinism.

This means that a parent contract only has codespace/code as information to guess what happened and notify the user, which ends up leaving the user in the dark about what actually made their message fail.

A simple solution is to keep track of any errors generated in submessages and emit them as events. This leaves the interaction between contracts unaffected while surfacing the errors to the users (and contract devs in the process of debugging).

This can easily be implemented here: https://github.com/CosmWasm/wasmd/blob/main/x/wasm/keeper/msg_dispatcher.go#L150-L152 (or inside `redactError` if we pass the context)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.