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

ZIP-213: Validate Shielded Coinbase Outputs like other shielded outputs #608

Closed
1 task done
teor2345 opened this issue Jul 7, 2020 · 0 comments · Fixed by #2382
Closed
1 task done

ZIP-213: Validate Shielded Coinbase Outputs like other shielded outputs #608

teor2345 opened this issue Jul 7, 2020 · 0 comments · Fixed by #2382
Labels
A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU-3 Heartwood Network Upgrade: Heartwood specific tasks

Comments

@teor2345
Copy link
Contributor

teor2345 commented Jul 7, 2020

Dependencies

This ticket depends on some parts of pre-Heartwood transaction validation, see #801.

Motivation

When we implement transaction validation, we should make sure we implement the Shielded Coinbase rules from Heartwood ZIP-213:
https://zips.z.cash/zip-0213#specification

Solution

Make sure Zebra verifies the ZIP-213 consensus rules:

  • The consensus rules applied to valueBalance, vShieldedOutput, and bindingSig in non-coinbase transactions MUST also be applied to coinbase transactions.
    • Note: this rule originally applied to Sapling, but we assume it also applies to Orchard

The following consensus rules are implemented in coinbase_tx_no_prevout_joinsplit_spend:

  • A coinbase transaction MUST NOT have any transparent inputs, JoinSplit descriptions, or Spend descriptions.
  • In a version 5 coinbase transaction, the enableSpendsOrchard flag MUST be 0.

The Sapling and Orchard note consensus rules will be implemented in #2362.

The following consensus rule will be implemented in #1970:

  • Only transparent outputs in coinbase transactions are subject to the existing restrictions on spending coinbase funds

Existing Work

The draft implementation PR is:
#1190

@teor2345 teor2345 added Poll::Ready A-consensus Area: Consensus rule updates labels Jul 7, 2020
@teor2345 teor2345 added this to the Validate transactions. milestone Jul 7, 2020
@teor2345 teor2345 added the NU-3 Heartwood Network Upgrade: Heartwood specific tasks label Aug 27, 2020
@mpguerra mpguerra removed this from the Transaction Validation milestone Jan 5, 2021
@mpguerra mpguerra removed the E-easy label Mar 23, 2021
@teor2345 teor2345 changed the title Implement Coinbase rules from Heartwood ZIP-213 ZIP-213: Shielded Coinbase rules for Heartwood Mar 31, 2021
@teor2345 teor2345 added this to the 2021 Sprint 8 milestone Mar 31, 2021
@teor2345 teor2345 changed the title ZIP-213: Shielded Coinbase rules for Heartwood ZIP-213: Validate Shielded Coinbase Outputs Jun 17, 2021
@teor2345 teor2345 added A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement P-Medium labels Jun 17, 2021
@teor2345 teor2345 changed the title ZIP-213: Validate Shielded Coinbase Outputs ZIP-213: Validate Shielded Coinbase Outputs like other shielded outputs Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-consensus Area: Consensus rule updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU-3 Heartwood Network Upgrade: Heartwood specific tasks
Projects
None yet
3 participants