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

Validate transparent signature operation limits in blocks #3015

Closed
teor2345 opened this issue Nov 4, 2021 · 1 comment · Fixed by #3049
Closed

Validate transparent signature operation limits in blocks #3015

teor2345 opened this issue Nov 4, 2021 · 1 comment · Fixed by #3049
Assignees
Labels
A-consensus Area: Consensus rule updates A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter)
Projects

Comments

@teor2345
Copy link
Contributor

teor2345 commented Nov 4, 2021

Motivation

Zebra needs to check per-block limits on transparent signature operations.

Specification

The Zcash limit is:

MAX_BLOCK_SIGOPS does apply to Zcash; it's hard-coded at 20,000, matching pre-SegWit Bitcoin

This limit is applied to the sum of the sigops in lock (output) and unlock (spend) scripts.

zcash/zips#568

Here are the corresponding Bitcoin rules:
https://en.bitcoin.it/wiki/Protocol_rules#cite_ref-4

Design Notes

We'll need to modify zcash_script to return the number of sigops in lock and unlock scripts.
We'll need to validate lock scripts.

Related Work

This ticket depends on script validation changes in:

@teor2345 teor2345 added C-enhancement Category: This is an improvement S-needs-triage Status: A bug report needs triage labels Nov 4, 2021
@zfnd-bot zfnd-bot bot added this to To Do in 🦓 Nov 4, 2021
@teor2345 teor2345 added this to the 2021 Sprint 23 milestone Nov 4, 2021
@teor2345 teor2345 added A-consensus Area: Consensus rule updates NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) P-Medium S-needs-investigation Status: Needs further investigation S-needs-spec-update Status: Not in the Zcash spec, but it should be A-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code and removed S-needs-spec-update Status: Not in the Zcash spec, but it should be S-needs-investigation Status: Needs further investigation labels Nov 4, 2021
@teor2345 teor2345 changed the title Does MAX_BLOCK_SIGOPS apply to Zcash? Validate transparent signature operation limits in blocks and transactions Nov 4, 2021
@teor2345 teor2345 changed the title Validate transparent signature operation limits in blocks and transactions Validate transparent signature operation limits in blocks Nov 4, 2021
@mpguerra
Copy link
Contributor

mpguerra commented Nov 8, 2021

@teor2345 teor2345 self-assigned this Nov 8, 2021
🦓 automation moved this from To Do to Done Nov 15, 2021
@mpguerra mpguerra removed the S-needs-triage Status: A bug report needs triage label Nov 23, 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-dependencies Area: Dependency file updates A-rust Area: Updates to Rust code C-enhancement Category: This is an improvement NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter)
Projects
No open projects
🦓
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants