forked from ZcashFoundation/zebra
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Test disconnection from outdated peers on network upgrade #2
Merged
jvff
merged 12 commits into
disconnect-from-outdated-peers-on-network-upgrade
from
test-disconnect-from-outdated-peers-on-network-upgrade
Dec 9, 2021
Merged
Test disconnection from outdated peers on network upgrade #2
jvff
merged 12 commits into
disconnect-from-outdated-peers-on-network-upgrade
from
test-disconnect-from-outdated-peers-on-network-upgrade
Dec 9, 2021
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
Given an arbitrary best chain tip height, check that the calculated minimum peer protocol version is the expected value.
Apply an arbitrary list of chain tip height updates and check that for each update the minimum peer version is calculated correctly.
Simulate a series of best chain tip height updates, and check for minimum peer version updates at least once between them. Changes should only be reported once.
Used to create and then track a mock `Client` instance.
An extension method useful for tests, that contains some shared boilerplate code.
Give a 50% chance for an arbitrary `Version` to be in the range of previously used values the Zcash network.
Helps with the creation of mocked client services with arbitrary protocol versions.
An auxiliary type to a `PeerSet` instance created for testing. It keeps track of any dummy endpoints of channels created and passed to the `PeerSet` instance.
Helps to reduce the code when preparing a `PeerSet` test instance.
Simulate a set of discovered peers being sent to the `PeerSet`. Ensure that only up-to-date peers are kept by the `PeerSet` and that outdated peers are dropped.
A helper type that allows the creation of arbitrary block height pairs, where one value is before and the other is at or after the activation height of an arbitrary network upgrade.
Simulate a network upgrade, and check that peers that become outdated are dropped by the `PeerSet`.
jvff
deleted the
test-disconnect-from-outdated-peers-on-network-upgrade
branch
December 9, 2021 01:17
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Zebra should disconnect from outdated peers during a network upgrade. This was implemented in ZcashFoundation#3108, and this PR contains some property tests for the implementation.
Specifications
Designs
Solution
Review
Reviewer Checklist
Follow Up Work