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

Add a name field to NetworkParameters to be used at the end of the cache dir path #8327

Closed
Tracked by #7119 ...
arya2 opened this issue Feb 26, 2024 · 0 comments · Fixed by #8411
Closed
Tracked by #7119 ...

Add a name field to NetworkParameters to be used at the end of the cache dir path #8327

arya2 opened this issue Feb 26, 2024 · 0 comments · Fixed by #8411
Assignees
Labels
A-network Area: Network protocol updates or fixes A-state Area: State / database changes C-testing Category: These are tests I-usability Zebra is hard to understand or use

Comments

@arya2
Copy link
Contributor

arya2 commented Feb 26, 2024

Motivation

We want to ensure that the cached state matches the consensus rules for a network when adding Regtest or custom testnets.

Some users may want to use part of the Testnet chain for custom testnets, this could be done with the CopyState command:
zebrad copy-state --max-source-height 1200000 --target-config-path path/to/custom-testnet-config. This won't work for Regtest because the db format is different.

Design

  • Add the network name to the cache_dir path to store the Regtest state separately from the Testnet state. The chainstate is stored in a regtest directory in zcashd.
  • Panic with a "reserved network name" message if the value is set to "Mainnet", "Testnet", or "Regtest" for a configured testnet
@arya2 arya2 added I-usability Zebra is hard to understand or use A-network Area: Network protocol updates or fixes NU-6 Network Upgrade: NU6 specific tasks C-testing Category: These are tests A-state Area: State / database changes labels Feb 26, 2024
@github-project-automation github-project-automation bot moved this to New in Zebra Feb 26, 2024
@arya2 arya2 changed the title Make Regtest network parameters ephemeral by default and/or add the network name to the cache_dir path Make Regtest network parameters ephemeral by default or add the network name to the cache_dir path Feb 26, 2024
@mpguerra mpguerra moved this from New to Sprint Backlog in Zebra Mar 6, 2024
@mpguerra mpguerra added this to the Regtest milestone Mar 6, 2024
@arya2 arya2 changed the title Make Regtest network parameters ephemeral by default or add the network name to the cache_dir path Add a cache_dir field to NetworkParameters Mar 20, 2024
@arya2 arya2 changed the title Add a cache_dir field to NetworkParameters Add a name field to NetworkParameters to be used at the end of the cache dir path Mar 20, 2024
@arya2 arya2 self-assigned this Apr 11, 2024
@arya2 arya2 moved this from Sprint Backlog to In progress in Zebra Apr 11, 2024
@arya2 arya2 moved this from In progress to Review/QA in Zebra Apr 18, 2024
@arya2 arya2 linked a pull request Apr 18, 2024 that will close this issue
9 tasks
@mergify mergify bot closed this as completed in #8411 Apr 24, 2024
@github-project-automation github-project-automation bot moved this from Review/QA to Done in Zebra Apr 24, 2024
@mpguerra mpguerra removed the NU-6 Network Upgrade: NU6 specific tasks label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-network Area: Network protocol updates or fixes A-state Area: State / database changes C-testing Category: These are tests I-usability Zebra is hard to understand or use
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants