zebra icon indicating copy to clipboard operation
zebra copied to clipboard

Support generating V4 coinbase transactions

Open upbqdn opened this issue 10 months ago • 1 comments

Motivation

PR #9627 removed support for V4 coinbase transactions. This PR restores it, and it also replaces #9639.

Solution

Zebra used to decide whether to generate a V4 or V5 coinbase tx based on the debug_like_zcashd config option. If the option was true, Zebra would generate a V4 tx, and V5 otherwise.

With this PR, Zebra determines the version based on the network and height.

Tests

I adjusted affected tests so that the issue outlined in the description of #9639 is of no relevance anymore.

PR Checklist

  • [x] The PR name is suitable for the release notes.
  • [x] The solution is tested.
  • [x] The documentation is up to date.

upbqdn avatar Jun 18 '25 14:06 upbqdn

This has some merge conflicts, and a test is still hanging due to this issue.

arya2 avatar Jun 25 '25 20:06 arya2

I rebased on main and force-pushed.

upbqdn avatar Jun 30 '25 15:06 upbqdn

This functionality is needed for the RPC python framework to work. Otherwise block submission will fail with:

2025-07-07T15:18:43.207974Z  INFO zebra_rpc::methods: submit block failed verification error=Ok(Block { source: Transaction(UnsupportedByNetworkUpgrade(5, Canopy)) }) block_hash=block::Hash("a43857985cd9c050b8063dd1816e17aa02c2416ae7f8d351d4ac3ea0b95c1190") height=Height(1)

oxarbitrage avatar Jul 07 '25 16:07 oxarbitrage

I don’t think we’re fully ready yet, but this test, or at least part of it, could be ported to Zebra to test shielded coinbase functionality.

I’ve opened an issue to track that: https://github.com/ZcashFoundation/zebra/issues/9690

oxarbitrage avatar Jul 08 '25 12:07 oxarbitrage

This pull request has been removed from the queue for the following reason: checks failed.

The merge conditions cannot be satisfied due to failing checks:

You can check the last failing draft PR here: #9696.

You may have to fix your CI before adding the pull request to the queue again. If you update this pull request, to fix the CI, it will automatically be requeued once the queue conditions match again. If you think this was a flaky issue instead, you can requeue the pull request, without updating it, by posting a @mergifyio requeue comment.

mergify[bot] avatar Jul 09 '25 17:07 mergify[bot]

@mergifyio requeue

oxarbitrage avatar Jul 10 '25 11:07 oxarbitrage

requeue

✅ The queue state of this pull request has been cleaned. It can be re-embarked automatically

mergify[bot] avatar Jul 10 '25 11:07 mergify[bot]