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

fix(transparent): check coinbase data is at least 2 bytes long #3457

Closed
teor2345 opened this issue Feb 2, 2022 · 1 comment · Fixed by #3542
Closed

fix(transparent): check coinbase data is at least 2 bytes long #3457

teor2345 opened this issue Feb 2, 2022 · 1 comment · Fixed by #3542
Assignees
Labels
A-consensus Area: Consensus rule updates C-bug Category: This is a bug I-consensus Zebra breaks a Zcash consensus rule I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter)

Comments

@teor2345
Copy link
Contributor

teor2345 commented Feb 2, 2022

Motivation

zcashd requires coinbase data that's 2-100 bytes long:
https://github.com/zcash/zcash/blob/d8c818bfa507adb845e527f5beb38345c490b330/src/main.cpp#L1697-L1698

But Zebra accepts coinbase data that's 1-100 bytes long:

if data.len() > MAX_COINBASE_DATA_LEN {

(Some(op_n @ 0x51..=0x60), len) if len >= 1 => Ok((

Specifications

There is an upcoming change to the Zcash specifications:
zcash/zips#589

Related Work

We might want to merge these height changes first, they could cause a merge conflict:

@teor2345 teor2345 added C-bug Category: This is a bug A-consensus Area: Consensus rule updates NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter) S-needs-triage Status: A bug report needs triage P-Medium ⚡ I-consensus Zebra breaks a Zcash consensus rule I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data labels Feb 2, 2022
@ftm1000
Copy link

ftm1000 commented Feb 8, 2022

@ftm1000 ftm1000 removed the S-needs-triage Status: A bug report needs triage label Feb 14, 2022
@mergify mergify bot closed this as completed in #3542 Feb 16, 2022
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 C-bug Category: This is a bug I-consensus Zebra breaks a Zcash consensus rule I-invalid-data Zebra relies on invalid or untrusted data, or sends invalid data NU Sprout Network Upgrade: Sprout specific tasks (before Overwinter)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants