-
Notifications
You must be signed in to change notification settings - Fork 107
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(chain): Adds a network_name
field to testnet::Parameters
#8411
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…pdates production code.
…rts` and `transparent::Address`
…orkKind` as zebra_network::Config::network field type, and converts 'Network' to `NetworkKind` before serializing
…l for zcash_primitives::consensus::Network
Co-authored-by: Marek <mail@marek.onl>
…red configs can be parsed, adds an intermediate representation of activation heights
…rk where there were conversions
…serde(default)] - Panics if a non-zero activation height is provided for the `Genesis` network upgrade - Always sets the `Genesis` and `BeforeOverwinter` network upgrade activation heights to 0 and 1, `BeforeOverwinter` could be overwritten by a later network upgrade - Makes the `activation_heights` field on `Parameters` private, adds/uses an accessor method instead, and adds a builder struct and `build()` method
… the next NetworkUpgrade if it doesn't find the activation height of `&self`
… assertion message
…r how activation heights can be configured
…s test, moves struct with activation heights outside deserialization impl and accepts it in `ParametersBuilder::activation_heights()` instead of a Vec
github-actions
bot
added
the
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
label
Apr 18, 2024
Co-authored-by: Marek <mail@marek.onl>
…t in the `Display` impl for `Network`
…rameterBuilder setter methods
arya2
force-pushed
the
params-network-name
branch
from
April 18, 2024 18:06
736572c
to
a842c12
Compare
Merged
9 tasks
@oxarbitrage Looks like I didn't find "invalid quick check" in the logs, and |
upbqdn
approved these changes
Apr 24, 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
C-trivial
Category: A trivial change that is not worth mentioning in the CHANGELOG
I-usability
Zebra is hard to understand or use
NU-6
Network Upgrade: NU6 specific tasks
P-Medium ⚡
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
We want to allow for configuring the network name so that cached chain states for different networks are stored separately and configured network names can be displayed in Zebra's logs or elsewhere.
Closes #8327.
Depends-On: #8383.
PR Author Checklist
Check before marking the PR as ready for review:
For significant changes:
If a checkbox isn't relevant to the PR, mark it as done.
Solution
network_name
fields totestnet::Parameters
andParametersBuilder
Testnet
and default configured Testnet name toUnknownTestnet
testnet::Parameters
_
(because the lowercase form will be part of the cache directory path)testnet::Parameters
instead of hard-coded values inDisplay
trait impl forNetwork
Related cleanups:
ParametersBuilder::activation_heights()
towith_activation_heights()
.filter()
inParametersBuilder::with_activation_heights()
Testing
Adds a test to check that:
Network
is displayed correctly forMainnet
and the defaultTestnet
Review
Anyone can review.
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work
Add a
new_regtest()
constructor method totestnet::Parameters
andNetwork
(#7839)