Open bkontur opened 9 months ago
IIRC the original idea was that the message processor can emit events to notify the outside world of why an error happened.
Currently we use a freestanding struct as processor, hence it cannot emit events.
Now there could be a pallet (or using pallet-xcm) that emits an event in the error case. Not sure if this is ideal, but it is easier than trying to have an associated and aggregated error type.
Maybe instead of returning a bool
it could also return an impl ProcessingError
that can be converted to a bool
but also has an ToString
which can then be included in the error event from the MQ pallet. Sounds a bit hacky though since it would use strings.
who is this for? devs or indexers or users? if you just want to be able to debug issues, just add bunch logs
Yeah it was about devs and logs are being added here: https://github.com/paritytech/polkadot-sdk/pull/2799
@xlc @bkchr logs only help in replays (try-runtime, chopsticks), but don't really improve UX for live chains - where users/dapps can see "live" why something fails.
If adding events is unwanted for some reason, maybe we can look at improving/enhancing error types and error messages (right now a lot of failure reasons result in same generic error).
Let me know what you think so we either close it or start working on smth here.
we could have new runtime API to dry run xcm and return detailed errors
RIght now, we can see just
success = false
forMesssageQueue
event in case of failure.Relates to: https://github.com/paritytech/polkadot-sdk/issues/478