-
Notifications
You must be signed in to change notification settings - Fork 205
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
Integrate elrond-go-p2p #4485
Integrate elrond-go-p2p #4485
Conversation
Codecov ReportBase: 73.42% // Head: 73.06% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.4.0 #4485 +/- ##
=============================================
- Coverage 73.42% 73.06% -0.36%
=============================================
Files 655 616 -39
Lines 85369 82742 -2627
=============================================
- Hits 62682 60456 -2226
+ Misses 17842 17531 -311
+ Partials 4845 4755 -90
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
@@ -11,11 +11,10 @@ require ( | |||
github.com/ElrondNetwork/elrond-go-core v1.1.19 | |||
github.com/ElrondNetwork/elrond-go-crypto v1.0.1 | |||
github.com/ElrondNetwork/elrond-go-logger v1.0.7 | |||
github.com/ElrondNetwork/elrond-go-p2p v0.0.0-20220919155246-aaae1065ad8b |
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.
we need a proper release for this
@@ -2513,14 +2513,14 @@ func (tpn *TestProcessorNode) GetShardHeader(nonce uint64) (data.HeaderHandler, | |||
|
|||
headerObjects, _, err := tpn.DataPool.Headers().GetHeadersByNonceAndShardId(nonce, tpn.ShardCoordinator.SelfId()) | |||
if err != nil { | |||
return nil, errors.New(fmt.Sprintf("no headers found for nonce %d and shard id %d %s", nonce, tpn.ShardCoordinator.SelfId(), err.Error())) | |||
return nil, fmt.Errorf("%w no headers found for nonce %d and shard id %d", err, nonce, tpn.ShardCoordinator.SelfId()) |
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.
👍
p2p/libp2p/constants.go
Outdated
"github.com/ElrondNetwork/elrond-go-p2p/libp2p" | ||
) | ||
|
||
// ListenAddrWithIp4AndTcp defines the listening address with ip v.4 and TCP |
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.
we can move all these outside the libp2p package to be directly in elrond-go/p2p because the p2p package will no hold only the adapter funcs/structs/consts/errors and so on
p2p/libp2p/libp2p.go
Outdated
// NewMockMessenger creates a new sandbox testable instance of libP2P messenger | ||
// It should not open ports on current machine | ||
// Should be used only in testing! | ||
func NewMockMessenger( |
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 only used in tests, I think we can remove it
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.
as discussed, added todo for next PR
p2p/message/message.go
Outdated
func (m *Message) Timestamp() int64 { | ||
return m.TimestampField | ||
} | ||
type Message = message.Message |
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.
we can move this directly in p2p package
p2p/rating/rating.go
Outdated
type ArgPeersRatingHandler = rating.ArgPeersRatingHandler | ||
|
||
// NewPeersRatingHandler returns a new peers rating handler | ||
func NewPeersRatingHandler(args ArgPeersRatingHandler) (p2p.PeersRatingHandler, error) { |
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.
also this, we can move it directly in p2p
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.
System test passed.
…-go-p2p # Conflicts: # go.mod
23cc3c7
// SyncTimer represent an entity able to tell the current time | ||
type SyncTimer interface { |
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 think we don't need to define this interface here also, it's being used in factory only, so there i think that the interface from ntp package can be used; but can be done later on
Description of the reasoning behind the pull request (what feature was missing / how the problem was manifesting itself / what was the motive behind the refactoring)
Proposed Changes
Testing procedure