zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Send committed spent OutPoints & nullifiers to the mempool for rejection

Open mpguerra opened this issue 2 years ago • 4 comments

Motivation

We need to get a list of recently committed spent outpoints & nullifiers from the state service, so we can evict any mempool transactions that also spend/reveal them.

This fixes some subtle bugs:

  1. Transaction 1 spends B and C - it gets in the mempool
  2. Transaction 2 only spends B - it gets mined into the chain, but transaction 1 is not rejected from the mempool
    • this is an optional-priority bug, because we're accepting more transactions than zcashd
  3. Transaction 3 only spends C - it is rejected from the mempool, but it should be accepted
    • this is a low-priority bug, because we're rejecting transactions that zcashd would accept

Constraints

These rejections should persist until a chain reset, because:

  • an outpoint can only be spent once in the chain, and
  • a nullifier can only be revealed once in the chain.

mpguerra avatar Aug 13 '21 13:08 mpguerra

Hey team! Please add your planning poker estimate with ZenHub @conradoplg @dconnolly @jvff @oxarbitrage @teor2345 @upbqdn

mpguerra avatar Aug 26 '21 14:08 mpguerra

Should we close this one? #2694 seems to say that we're not going to follow this design

mpguerra avatar Nov 03 '21 15:11 mpguerra

Should we close this one? #2694 seems to say that we're not going to follow this design

That ticket description is outdated - it was based on the initial mempool scope. Zebra currently rejects spend conflicts in the mempool.

So we should implement this ticket eventually, because it fixes some bugs in our mempool implementation.

teor2345 avatar Nov 04 '21 05:11 teor2345

I also think we should reset the estimate on this ticket, because a lot of the changes we need are already implemented.

teor2345 avatar Nov 04 '21 05:11 teor2345