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

Make the halving interval configurable for custom networks and regtests #8880

Closed
oxarbitrage opened this issue Sep 19, 2024 · 1 comment · Fixed by #8888
Closed

Make the halving interval configurable for custom networks and regtests #8880

oxarbitrage opened this issue Sep 19, 2024 · 1 comment · Fixed by #8888
Assignees
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules C-testing Category: These are tests

Comments

@oxarbitrage
Copy link
Contributor

There had been a request for making the halving heights configurable in Regtest mode:

https://discordapp.com/channels/809218587167293450/1285973514964439121/1285975294997434369

For the first halving, we have a TODO here to do this: https://github.com/ZcashFoundation/zebra/blob/v1.9.0/zebra-chain/src/parameters/network/subsidy.rs#L394

Also, this feature will be useful if we plan to merge https://github.com/zcash/zcash/blob/v5.10.0/qa/rpc-tests/nuparams.py into the zebra rpc test suite.

@github-project-automation github-project-automation bot moved this to New in Zebra Sep 19, 2024
@oxarbitrage oxarbitrage added C-testing Category: These are tests A-compatibility Area: Compatibility with other nodes or wallets, or standard rules labels Sep 19, 2024
@oxarbitrage
Copy link
Contributor Author

Posted by @arya2 in discord:

I've just realized that the halving interval is much shorter in zcashd's regtest, (see https://github.com/zcash/zcash/blob/master/src/consensus/params.h#L251-L252), we should make the halving interval configurable on custom Testnets too and set it to 144 on Regtest, in Zebra those constants are currently here: https://github.com/ZcashFoundation/zebra/blob/restore-internal-miner/zebra-chain/src/parameters/network/subsidy.rs#L38-L45)

So we could split this ticket in 2 tasks:

  • Use a halving interval of 144 in regtest mode.
  • Make halving interval configurable in custom testnets.

Making the first will unblock porting https://github.com/zcash/zcash/blob/v5.10.0/qa/rpc-tests/nuparams.py into zebra.

@arya2 arya2 changed the title Make halving heights configurable for custom networks and regtests Make the halving interval configurable for custom networks and regtests Sep 23, 2024
@mergify mergify bot closed this as completed in #8888 Oct 10, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Done in Zebra Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules C-testing Category: These are tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant