Skip to content

[#985] Create a ZIP Draft to document Regtest mode #986

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

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

pacu
Copy link
Contributor

@pacu pacu commented Feb 26, 2025

closes #985

@pacu pacu force-pushed the regtest-zip-draft branch from 8a33bbb to e4b17fc Compare February 26, 2025 23:03
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: it's difficult to read this on a wide monitor, please hard-wrap lines.

Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partial review; I have not yet reviewed beyond the section Behavior for ZIP-200 Network Upgrade Mechanism.

In general, specification language needs to be somewhat more precise than most of what is presented in this draft. In particular, the affected components and actors should be clearly identified in each portion of the specification, and particular care should be taken with respect to any conditionals. Focus on what has to happen more than the actor in each section.

@pacu pacu requested a review from nuttycom March 18, 2025 17:43
@pacu
Copy link
Contributor Author

pacu commented Mar 18, 2025

Thank you very much for your comments @nuttycom. I've included your feedback and in-line suggestions.

have a consensus node on a local network with a private state that a developer
can control in order to reproduce certain situations deterministically for
testing purposes. Regtest, as it was implemented on Zcashd, is similar to a
“testnet” but without miners and remote peers.
Copy link
Contributor

@zancas zancas Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I recall correctly many of the qa/rpc-tests in zcash acually have more than local "peer".. I wonder whether the "remote-vs-local" distinction here, might be somewhat orthogonal to the purpose of regtest mode, which though frequently used with multiple nodes in the same ip:tcp space, could be used more "remotely" with the same regtest properties.


## Motivation
It is necessary to define Regtest mode so that different implementations of Zcash
Full Nodes provide the same capabilities so that testing infrastructure can be
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Again it seems to me that "regtest" has utility for relatively low-capability "nodes". That is, less than "full".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is a "low-capability" node?

specifically designed to avoid requirement 1 in Testnet and Mainnet
1. Developers MUST specify the activation heights of the different Network
Upgrades on launch via parameters or configuration file.
1. Remote Peer-to-Peer connections MUST NOT be allowed. All peers MUST be local

This comment was marked as resolved.

This comment was marked as resolved.


## Requirements
1. Nodes launched in Regtest mode MUST be able to generate deterministic sequences
of blocks and transactions.
Copy link
Contributor

@zancas zancas Mar 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about:

"Finalizers, launched in regtest mode, MUST be able to efficiently generate deterministic sequences of valid blocks of transactions."

It seems like efficiency is a requirement. I also wonder if "of transactions" might be redundant, or conversely if "blocks of" might be incompatible with future architectures.

@pacu pacu force-pushed the regtest-zip-draft branch from e1f8a48 to d0a2cff Compare April 4, 2025 22:12
@pacu pacu requested a review from zancas May 29, 2025 18:46
```
ZIP: Unassigned
Title: Regtest: Definition of a Local Consensus test mode for Zcash Full-Nodes
Owners: ZIP Editors
Copy link
Collaborator

@daira daira May 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Owners must be specific named people who have each explicitly consented to be an Owner. I haven't, so this can't just be replaced by the current ZIP Editors (nor do the ZIP Editors have time or capacity to be assigned the role of maintaining a ZIP by others). Normally the Owners of the ZIP are the people who wrote it.

Copy link
Collaborator

@daira daira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NACK due to a ZIP 0 violation in the Owners field.

License: MIT
Pull-Request: <https://github.com/zcash/zips/pull/986>
```
# Regtest: Definition of a Local Consensus test mode for Zcash Full-Nodes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this and unindent every other heading by one level.

(I'm aware that semantically, this is the title which is usually at the first heading level in Markdown. However, no other Markdown ZIP uses that convention, and in practice it's necessary to have all heading levels available. The stylesheet is also designed under the assumption that major sections are at the first heading level.)

of blocks and transactions can be generated as defined in requirement 1.
1. Changes on Human-Readable Parts (HRP) of address string encodings (if applicable)
are defined with their respective prefix to signal a regtest variant.
1. Regtest functionality SHOULD allow developers to ensure test coverage of their
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Regtest functionality SHOULD allow developers to ensure test coverage of their
1. Regtest functionality should allow developers to ensure test coverage of their

This is not a conformance requirement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create a ZIP Draft to document Regtest mode on Zcash full-nodes
4 participants