Report better transactions errors to lightwalletd #4060
Labels
A-rpc
Area: Remote Procedure Call interfaces
C-enhancement
Category: This is an improvement
I-usability
Zebra is hard to understand or use
lightwalletd
any work associated with lightwalletd
Motivation
When transactions don't validate, we want to provide wallet users with fast and accurate errors, so they can decide if they need to retry the transaction.
Scheduling
This ticket is optional, because the wallet will show a generic error to the user after 10 blocks.
We should only do this ticket if transaction errors are common during wallet testing.
Specifications
Aditya Kulkarni says that ZecWallet expects the following behaviour:
Designs
Here are some possible ways to make this change:
Wait for errors
This quick change should work:
lightwalletd
lightwalletd
, ignoring "duplicate queued transaction" errorsSplit out the quick checks
This is a more complicated alternative:
The quick checks should include branch IDs, and transparent and shielded spend conflicts. They might take some time, because they have to check the state. So we only want to do them for RPCs.
One drawback of this approach is that it slows down inbound transaction handling a bit. Another is potential timing attacks. But we expect that any transactions sent to the mempool are public anyway.
Related Work
The text was updated successfully, but these errors were encountered: