snarkOS
snarkOS copied to clipboard
[Feature] Track reason for failed txs
🚀 Feature
I see two main options to enable this:
- validators track abort and reject reasons, and propagate the error code in blocks.
- all nodes only track reject reasons and store them locally. Because unconfirmed rejected transactions are in a block, clients can replay the rejection reason locally.
Advantages of 1: more comprehensive reporting Advantages of 2: less bandwidth usage
In both cases, data is stored to disk and returned via API. We would benefit from merging the compact blocks feature first, which touches this logic too.
alternative
We could run speculative finalization on broadcasted transactions, but this would give both false positive and false negatives, so is of unclear utility.
Seems quite beneficial, if integrated properly, I can't think of any real downsides to this besides general state bloat.
2 things to consider:
- Design should properly reflect a default error code for the
rejectedandabortedtransactions before this migration - Might be some overlap on potentially adding
EventsorLogsof sorts to the DB