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

Regtest mode attempts to sign transactions using the wrong consensus branch id #3534

Closed
bitcartel opened this issue Sep 21, 2018 · 0 comments · May be fixed by CryptoForge/Zero#23
Closed

Regtest mode attempts to sign transactions using the wrong consensus branch id #3534

bitcartel opened this issue Sep 21, 2018 · 0 comments · May be fixed by CryptoForge/Zero#23
Labels
A-rpc-interface Area: RPC interface I-regression This is a regression, i.e. something that previously worked but now does not due to a change we made NU1-sapling Network upgrade: Sapling-specific tasks
Milestone

Comments

@bitcartel
Copy link
Contributor

@LarryRuane wrote a test which set activation heights for overwinter and sapling. The test passed but failed on master, so we bisected to find a problem with 40b9527.

The issue is that regtest mode cannot rely on release height, so the Sapling branch id was being selected instead of Overwinter when signing an Overwinter tx.

chainHeight = 377000
...chainActive.Height() + 1 = 202
...APPROX_RELEASE_HEIGHT = 377000
consensusBranchId = 76b809bb
Assertion failed: expected: <success> but was: <failed>

whereas the expected output is:

chainHeight = 202
...chainActive.Height() + 1 = 202
...APPROX_RELEASE_HEIGHT = 377000
consensusBranchId = 5ba81b19
@bitcartel bitcartel added I-regression This is a regression, i.e. something that previously worked but now does not due to a change we made A-rpc-interface Area: RPC interface NU1-sapling Network upgrade: Sapling-specific tasks labels Sep 21, 2018
@bitcartel bitcartel added this to the v2.0.1 milestone Sep 21, 2018
bitcartel added a commit to bitcartel/zcash that referenced this issue Sep 21, 2018
…branch

id when in regtest mode.

Co-authored-by: Larry Ruane <[email protected]>
zkbot added a commit that referenced this issue Sep 22, 2018
Do not use APPROX_RELEASE_HEIGHT to get consensus branch id in regtest mode.

Closes #3534
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rpc-interface Area: RPC interface I-regression This is a regression, i.e. something that previously worked but now does not due to a change we made NU1-sapling Network upgrade: Sapling-specific tasks
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant