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

Tracking: Add parameters to Network::Testnet variant #7845

Closed
12 of 14 tasks
arya2 opened this issue Oct 26, 2023 · 6 comments · Fixed by #8524
Closed
12 of 14 tasks

Tracking: Add parameters to Network::Testnet variant #7845

arya2 opened this issue Oct 26, 2023 · 6 comments · Fixed by #8524
Labels
A-consensus Area: Consensus rule updates A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement C-feature Category: New features C-testing Category: These are tests

Comments

@arya2
Copy link
Contributor

arya2 commented Oct 26, 2023

Motivation

Zebra currently hard-codes some consensus parameters that may need to be changed for testing.

Scope

To be discussed in #7967.

Preparatory Refactors:

After these changes are merged, we should decide which parameters we want to add and create more issues like #7970 for each of them.

Adding Parameters:

Possible Design

  • Turn the Testnet variant into:
Testnet(Arc<NetworkParameters { 
   cache_name,
   genesis_hash,
   network_id,
   default_port,
   activation_heights,
   ..
>)
  • Consider adding fields for:
    • slow_start_interval (nSubsidySlowStartInterval)
    • target_difficulty_limit (powLimit)
    • key_prefixes
    • debug_mandatory_checkpoint_height: Option<Height>
    • checkpoints: Path
    • pow_avg_window (update logic to use min(num_blocks_in_cache, 17))
  • Add a new_testnet() method or DEFAULT_TESTNET constant with the existing testnet defaults, to replace literal Testnet variant.
  • Replace matching against Testnet with an is_mainnet() method. (This is only required when we're matching against Testnet, we can change the Mainnet matches gradually.)
@mpguerra mpguerra added this to Zebra Oct 26, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Oct 26, 2023
@arya2 arya2 added A-consensus Area: Consensus rule updates C-enhancement Category: This is an improvement A-network Area: Network protocol updates or fixes I-usability Zebra is hard to understand or use C-testing Category: These are tests P-Medium ⚡ NU-6 Network Upgrade: NU6 specific tasks C-feature Category: New features labels Oct 26, 2023
@mpguerra
Copy link
Contributor

mpguerra commented Nov 6, 2023

Lowering priority as it's not clear that it's a blocker for ZSA testing anymore

@arya2
Copy link
Contributor Author

arya2 commented Nov 7, 2023

Elevating priority so ZSAs can be tested with a new genesis block.

@teor2345
Copy link
Contributor

teor2345 commented Nov 7, 2023

Elevating priority so ZSAs can be tested with a new genesis block.

Mining a new genesis block is out of scope for this ticket. It's an extremely tricky process, let's check what zcashd does, and open another ticket?

(It's possible they just re-use the mainnet or testnet block for all networks.)

@daira
Copy link
Contributor

daira commented Nov 8, 2023

zcashd uses a separate genesis block for testnet, and does not support multiple testnets without modifying code and rebuilding. Is it sufficient to just use that block and upgrade at height 1?

@teor2345
Copy link
Contributor

teor2345 commented Nov 8, 2023

zcashd uses a separate genesis block for testnet, and does not support multiple testnets without modifying code and rebuilding. Is it sufficient to just use that block and upgrade at height 1?

@arya2 let's ask the QEDIT team when we get in touch with them? (Along with everything else, it's not an urgent question.)

@mpguerra mpguerra changed the title Add parameters to Network::Testnet variant Tracking: Add parameters to Network::Testnet variant Nov 20, 2023
@mpguerra
Copy link
Contributor

@arya2 can you split out what we're going to work on from here on Sprint 24?

@mpguerra mpguerra moved this from New to Sprint Backlog in Zebra Mar 6, 2024
@mpguerra mpguerra moved this from Sprint Backlog to Product Backlog in Zebra Mar 18, 2024
@arya2 arya2 removed the I-usability Zebra is hard to understand or use label Mar 19, 2024
@arya2 arya2 assigned arya2 and unassigned arya2 Mar 20, 2024
@mpguerra mpguerra moved this from Product Backlog to In progress in Zebra May 14, 2024
@arya2 arya2 moved this from In progress to Product Backlog in Zebra Jun 24, 2024
@mpguerra mpguerra moved this from Product Backlog to Sprint Backlog in Zebra Jul 5, 2024
@arya2 arya2 closed this as completed Jul 8, 2024
@github-project-automation github-project-automation bot moved this from Sprint Backlog to Done in Zebra Jul 8, 2024
@mpguerra mpguerra removed the NU-6 Network Upgrade: NU6 specific tasks label Jul 25, 2024
@mpguerra mpguerra modified the milestones: NU6, Regtest Network support Jul 25, 2024
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 A-network Area: Network protocol updates or fixes C-enhancement Category: This is an improvement C-feature Category: New features C-testing Category: These are tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants