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 consensus rules from Zcash spec: 7.1.2 Transaction Consensus Rules #3223

Closed
4 tasks done
Tracked by #3125
mpguerra opened this issue Dec 14, 2021 · 6 comments
Closed
4 tasks done
Tracked by #3125
Assignees

Comments

@mpguerra
Copy link
Contributor

mpguerra commented Dec 14, 2021

TODO

Open a zcash/zips PR to split the spec section into multiple sub-sections. That way, there will be links to each sub-section, and the rules will be easier to find.

Tasks

For each consensus rule:

  • check that the rule is implemented in Zebra
  • make sure the latest version of the rule is quoted in the docs for the code that implements it
  • make sure the code implements the latest version of the rule

Split

Consensus rules

https://zips.z.cash/protocol/protocol.pdf#txnconsensus

Screenshot 2021-12-16 at 16 04 14
Screenshot 2021-12-16 at 16 05 32
Screenshot 2021-12-16 at 16 05 49

Implementation

@mpguerra mpguerra changed the title Document 7.1.2 Transaction Consensus Rules Document consensus rules from Zcash spec: 7.1.2 Transaction Consensus Rules Dec 16, 2021
@teor2345
Copy link
Contributor

teor2345 commented Dec 16, 2021

@mpguerra this is a very large task, so I'd like to split it between multiple people.

We could open a zcash/zips PR to split the spec section into multiple sub-sections?
That way there will be links to the sub-sections.

@mpguerra
Copy link
Contributor Author

@mpguerra this is a very large task, so I'd like to split it between multiple people.

We can possibly split it between the people that worked on the listed issues/PRs. Before we start working on this we should double check that there aren't any other issues/PRs that contributed towards implementing this section of the spec.

@mpguerra
Copy link
Contributor Author

It would also be nice if these issues could be used by the auditors as a reference and so we should make sure the description is as complete and accurate as possible

@teor2345 teor2345 assigned mpguerra and unassigned teor2345 Dec 19, 2021
@teor2345
Copy link
Contributor

teor2345 commented Dec 19, 2021

@mpguerra this is a very large task, so I'd like to split it between multiple people.

We can possibly split it between the people that worked on the listed issues/PRs. Before we start working on this we should double check that there aren't any other issues/PRs that contributed towards implementing this section of the spec.

Thanks, please re-assign me to some of the sub-tasks after you've split this task.

Here is the split I'd suggest, because it matches the structure of Zebra's code (and also the spec):

  • transaction header (including expiry height)
  • transaction size (including item counts)
  • coinbase transactions (including coinbase-specific item counts and values)
  • shielded pools: the rule is specific to a shielded pool (this is different from the network upgrade range of the rule, even if the network upgrade has the same name as a shielded pool)

It would also be nice if these issues could be used by the auditors as a reference and so we should make sure the description is as complete and accurate as possible

This is unusual - I've never seen a project that keeps closed tickets up to date as the code changes. So I assumed that closed tickets are out of scope for the audits. Tickets are based on what we knew at the time they were closed. But we want to audit the current state of the software, so we need something that stays up to date.

So I think we should update the documentation next to the code we're getting audited. That way, we can maintain that documentation as we change the code, so it will be ready for future audits.

I don't know if this is related, but was it confusing to use open tickets to track questions for the auditors?

Let's talk about auditing closed tickets and tracking auditor questions at the Engineering sync.

@mpguerra
Copy link
Contributor Author

It would also be nice if these issues could be used by the auditors as a reference and so we should make sure the description is as complete and accurate as possible

This is unusual - I've never seen a project that keeps closed tickets up to date as the code changes. So I assumed that closed tickets are out of scope for the audits. Tickets are based on what we knew at the time they were closed. But we want to audit the current state of the software, so we need something that stays up to date.

So I think we should update the documentation next to the code we're getting audited. That way, we can maintain that documentation as we change the code, so it will be ready for future audits.

I wasn't suggesting that we update the closed tickets. I think the tickets as they are can contain useful information about how and where a consensus rule was implemented in addition to the documentation within the code. This will obviously only be valid for the NU5 network upgrade and I assume we'll do an audit before any new network upgrade is scheduled.

@teor2345
Copy link
Contributor

All the sub-tickets in this ticket have been completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants