ZcashFoundation / zebra

Zcash - Financial Privacy in Rust 🦓
https://zfnd.org/zebra/
Apache License 2.0
413 stars 106 forks source link

change(mempool): Return verification result after attempting to insert transactions in the mempool #8901

Open arya2 opened 1 month ago

arya2 commented 1 month ago

Motivation

We want to return a verification result from the mempool after a transaction has been inserted into its verified set (or has failed some final checks in the mempool).

Solution

Tests

Updates the mempool_responds_to_await_output test to expect the mempool storage to include a transaction immediately after receiving its verification result.

PR Author's Checklist

PR Reviewer's Checklist

mpguerra commented 1 month ago

Is there a related issue for this PR?

arya2 commented 1 month ago

Is there a related issue for this PR?

It's related to https://github.com/ZcashFoundation/zebra/issues/8778.

Zebra began returning errors from the sendrawtransaction RPC method when verifying the transaction fails or was cancelled in https://github.com/ZcashFoundation/zebra/pull/8788, but in one of the tests for https://github.com/ZcashFoundation/zebra/pull/8857, we noticed that it sends the success response too early because:

mpguerra commented 4 days ago

Do we still want to do this one? Otherwise we should just close for now