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

Simplify transaction checks, add missing coinbase PrevOut check #100

Merged
merged 4 commits into from
Apr 27, 2021

Conversation

teor2345
Copy link

Motivation

In ZcashFoundation#2070, we add Transaction V5 to the existing transaction checks.

But we still need to:

  • quote the consensus rules, and
  • add Orchard TODOs.

We can also:

  • implement the missing "no PrevOuts" coinbase check, added a few days ago in zcash/zips@10710d9, and
  • refactor the code to make it simpler.

Review

@oxarbitrage can review and merge into ZcashFoundation#2070 when he is ready.

Related Issues

Implements part of ZcashFoundation#1981.

Follow Up Work

Do the rest of ZcashFoundation#1981.

…inputs

This is a bugfix on V4 transaction validation. The PrevOut consensus
rule was not explicitly stated in the Zcash spec until April 2021.
(But it was implied by Bitcoin, and partially implemented by Zebra.)

Also do the shielded sapling input check for V5 transactions.
Also make the variable names match the spec.
Move counts or iterators into `Transaction` methods, so we can remove
duplicate code, and make the consensus rule logic clearer.
Copy link
Owner

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome.

@oxarbitrage oxarbitrage merged commit 961de0a into oxarbitrage:issue2047 Apr 27, 2021
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

Successfully merging this pull request may close these issues.

2 participants