-
Notifications
You must be signed in to change notification settings - Fork 100
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
book: add section about private testnet testing #8937
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor typo fixes
Co-authored-by: Pili Guerra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the documentation!
There aren't any blockers, I left a few minor suggestions but they can all be safely ignored.
The objective of a private testnet test is to test testnet activation in an | ||
isolated fashion, before the actual testnet activation. It is usually | ||
done using the current state of the existing testnet. For NU6, it was done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional/Nitpick:
The objective of a private testnet test is to test testnet activation in an | |
isolated fashion, before the actual testnet activation. It is usually | |
done using the current state of the existing testnet. For NU6, it was done | |
The objective of a private Testnet test is to test Testnet activation of an upcoming | |
network upgrade in an isolated fashion, before the actual Testnet activation. | |
It is usually done using the current state of the existing Testnet. For NU6, it was done |
Make a backup of your current testnet state. Rename/copy the `testnet` folder to | ||
`unknowntest` (because that is the name used by Zebra for custom testnets). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Optional/Nitpick:
Make a backup of your current testnet state. Rename/copy the `testnet` folder to | |
`unknowntest` (because that is the name used by Zebra for custom testnets). | |
Make a backup of your current Testnet state. Rename/copy the `testnet` folder in | |
Zebra's state cache directory to the lowercase version of the configured network name, | |
or the default `unknowntestnet` if no network name is explicitly configured. |
### Set Up Lightwalletd Server | ||
|
||
It's a good idea to set up a lightwalletd server connected to your node, and | ||
have a (testnet) wallet connected to your lightwalletd server. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great point!
Optional/Nitpick:
have a (testnet) wallet connected to your lightwalletd server. | |
have a (Testnet) wallet connected to your lightwalletd server. |
|
||
Choose an activation height with the other participants. It should be in | ||
the near future, but with enough time for people to set things up; something | ||
like 30 minutes in the future? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I recall us using ~30-40 blocks too, it might be better to suggest a range and note that we can usually speed up mining on Testnet or stall it altogether if we're using a different network magic.
It might also be easier to test Zebra's behaviour at the network upgrade activation under varying conditions by by restarting it to drop non-finalized blocks if it's a little further from Zebra's finalized tip.
|
||
### Ensure the Activation Height is Set in Code | ||
|
||
While Zebra allows creating a private testnet in the config file, the height is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a good note, I think we forgot to do this in our first attempt and had to set a new activation height. We may want to offer creating a new branch as an example of how to modify Zebra's relevant dependencies, though it does seem like the best way (alternatives could be to use a path or make modifications in the local Cargo registry then use cargo build --offline
).
Optional/Nitpick:
While Zebra allows creating a private testnet in the config file, the height is | |
While Zebra allows creating a private Testnet in the config file, the height is |
|
||
### Getting peers | ||
|
||
It seems Zebra is not very reliable at returning its currently connected peers; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is issue #7893, it seems to affect the cached peer list as well, though it may be desirable to avoid caching inbound connection addresses in that case.
[mining] | ||
debug_like_zcashd = true | ||
miner_address = "t27eWDgjFYJGVXmzrXeVjnb5J3uXDM9xH9v" | ||
# if you want to enable mining |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# if you want to enable mining | |
# if you want to enable mining, which also requires selecting the `internal-miner` compilation feature |
Motivation
We want to document how to do a private testnet testing, so that we can more easily make another one in the future when required.
Specifications & References
Solution
Tests
Follow-up Work
PR Author's Checklist
PR Reviewer's Checklist