Fix the bugs described in #8744. Note that zcashd stores transactions in orphaned blocks and responds to queries requesting such transactions with height to -1. Since Zebra doesn't keep orphaned blocks below the rollback limit, it now returns the error "No such mempool or blockchain transaction". If we wanted to match zcashd, we'd need to start storing orphaned blocks.
Fix the error codes for getrawtransaction and some other RPCs.
Related cleanups:
Refactor the error handling for RPCs.
Add references to the original error codes.
Use HexData instead of Strings in getrawtransaction.
Simplify prop tests and run them with arbitrary Networks.
Motivation
Close #8945.
Specifications & References
Solution
zcashd
stores transactions in orphaned blocks and responds to queries requesting such transactions withheight
to -1. Since Zebra doesn't keep orphaned blocks below the rollback limit, it now returns the error "No such mempool or blockchain transaction". If we wanted to matchzcashd
, we'd need to start storing orphaned blocks.getrawtransaction
and some other RPCs.HexData
instead ofString
s ingetrawtransaction
.Network
s.Tests
Update and add
to check the new error codes.
Follow-up Work
PR Author's Checklist
PR Reviewer's Checklist