Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how we review mempool behaviour changes after audit #3188

Closed
Tracked by #2311
teor2345 opened this issue Dec 9, 2021 · 2 comments
Closed
Tracked by #2311

Document how we review mempool behaviour changes after audit #3188

teor2345 opened this issue Dec 9, 2021 · 2 comments
Labels
A-docs Area: Documentation C-security Category: Security issues I-usability Zebra is hard to understand or use

Comments

@teor2345
Copy link
Contributor

teor2345 commented Dec 9, 2021

Motivation

We have implemented a mempool in Zebra, but we don't know if it is complete, because Zcash mempools are only partly documented. After we get the mempool audited, we will need to make sure Zebra keeps implementing compatible mempool behaviour.

Mempool behaviour changes can happen due to:

  • ZIP changes
  • spec changes which apply to the mempool (this is usually not documented)
  • Zebra mempool behaviour bugs
  • refactors
  • dependency updates

Scheduling

We should spend an hour or two creating a draft document, then update it later as needed.

This should be part of the consensus rule documentation in #3186.

Process Changes

In general:

  • it's ok if we accept more transactions than zcashd, because they will get filtered out eventually
  • we need to carefully justify rejecting transactions that zcashd accepts, because transaction rejections can be really confusing for Zebra users

So we should document the requirements for new mempool validation, and mempool behaviour updates:

  • quote the mempool rule from a ZIP, Bitcoin docs, or zcashd codebase
  • link to the relevant section in the ZIP, docs, or code
  • explain how Zebra is compatible with the mempool rule
  • test success and failure cases for the mempool rule
  • validate test vectors from zcashd, if available

We should also document how we identify the code that can change mempool behaviour:

  • the function that implements the mempool behaviour
  • all code that it calls, including other Zebra crates, and external dependencies
  • any code that changes the data that's given to the function (for example, any changes to the transaction verifier)

Related Work

@mpguerra
Copy link
Contributor

@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Jan 14, 2022
@teor2345 teor2345 mentioned this issue Jan 27, 2022
40 tasks
@teor2345
Copy link
Contributor Author

teor2345 commented Mar 1, 2022

This isn't needed as a separate task.

@teor2345 teor2345 closed this as completed Mar 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation C-security Category: Security issues I-usability Zebra is hard to understand or use
Projects
None yet
Development

No branches or pull requests

2 participants