refactor(p2p): add PublicPeer and PrivatePeer to simplify Peer#1115
Merged
refactor(p2p): add PublicPeer and PrivatePeer to simplify Peer#1115
Conversation
9c218c4 to
255b1d4
Compare
1 task
f74ca68 to
ecf70e9
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1115 +/- ##
==========================================
+ Coverage 84.42% 84.47% +0.04%
==========================================
Files 317 317
Lines 24303 24366 +63
Branches 3698 3705 +7
==========================================
+ Hits 20519 20582 +63
- Misses 3070 3071 +1
+ Partials 714 713 -1 ☔ View full report in Codecov by Sentry. |
255b1d4 to
ada19b8
Compare
ecf70e9 to
f239f23
Compare
|
| Branch | refactor/p2p-peer-types |
| Testbed | ubuntu-22.04 |
Click to view all benchmark results
| Benchmark | Latency | Benchmark Result nanoseconds (ns) (Result Δ%) | Lower Boundary nanoseconds (ns) (Limit %) | Upper Boundary nanoseconds (ns) (Limit %) |
|---|---|---|---|---|
| sync-v2 (up to 20000 blocks) | 📈 view plot 🚷 view threshold | 101,390,226,466.26 (-0.62%) | 91,823,280,390.41 (90.56%) | 112,228,453,810.50 (90.34%) |
msbrogli
previously approved these changes
Aug 26, 2024
msbrogli
reviewed
Aug 26, 2024
f239f23 to
df37668
Compare
df37668 to
8299377
Compare
glevco
reviewed
Sep 4, 2024
4c3bbd0 to
663d965
Compare
663d965 to
e3dd601
Compare
glevco
previously approved these changes
Oct 2, 2024
msbrogli
previously approved these changes
Oct 3, 2024
447cc30 to
0749a20
Compare
glevco
previously approved these changes
Oct 3, 2024
msbrogli
previously approved these changes
Oct 3, 2024
2 tasks
0749a20 to
646878b
Compare
msbrogli
approved these changes
Oct 7, 2024
glevco
approved these changes
Oct 7, 2024
jansegre
added a commit
that referenced
this pull request
Oct 8, 2024
1 task
jansegre
added a commit
that referenced
this pull request
Oct 8, 2024
jansegre
added a commit
that referenced
this pull request
Oct 11, 2024
fix(cli): subcommand quick_test not stopping after #1115
This file contains hidden or 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
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
The
hathor.p2p.peer.Peertype represents multiple types of peers, which makes it needed to check forNoneon its properties and also makes it more cumbersome to check for some invariants.Acceptance Criteria
hathor.p2p.peer.PeerintoPeer,PublicPeerandPrivatePeerPeeris just the base type with no public or private key, it implies that the peer-id cannot be verified because of the lack of a public keyPeeris renamed toUnverifiedPeerPublicPeer(internally has anUnverifiedPeer) has a public-key, which can be used to verify its peer-id, it's implied that we've connected to this peer before and thus we verified its public-keyPrivatePeer(internally has aPublicPeer) has a private-key, in practice it's only used for the node's own peer-idPeerStorageinto aVerifiedPeerStoragethat can only storePublicPeerand aUnverifiedPeerStoragethat only storesUnverifiedPeerChecklist
master, confirm this code is production-ready and can be included in future releases as soon as it gets merged