Skip to content
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

Full archive heartbeat sender + new data pools #5332

Merged

Conversation

sstanculeanu
Copy link
Contributor

Reasoning behind the pull request

  • further integration for the full archive network

Proposed changes

  • update heartbeatV2Components to send the info on the second network

Testing procedure

  • will be tested with the full feature

Pre-requisites

Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:

  • was the PR targeted to the correct branch?
  • if this is a larger feature that probably needs more than one PR, is there a feat branch created?
  • if this is a feat branch merging, do all satellite projects have a proper tag inside go.mod?

@sstanculeanu sstanculeanu changed the title Full archive heartbeat sender Full archive heartbeat sender + new data pools Jun 9, 2023
@codecov
Copy link

codecov bot commented Jun 9, 2023

Codecov Report

Patch coverage: 98.14% and project coverage change: -0.04 ⚠️

Comparison is base (e70f833) 80.29% compared to head (c28cf02) 80.26%.

❗ Current head c28cf02 differs from pull request most recent head c657818. Consider uploading reports for the commit c657818 to get more accurate results

Additional details and impacted files
@@                       Coverage Diff                        @@
##           feat/multiple_p2p_messengers    #5332      +/-   ##
================================================================
- Coverage                         80.29%   80.26%   -0.04%     
================================================================
  Files                               695      695              
  Lines                             90189    90244      +55     
================================================================
+ Hits                              72416    72432      +16     
- Misses                            12595    12631      +36     
- Partials                           5178     5181       +3     
Impacted Files Coverage Δ
factory/network/networkComponentsHandler.go 71.65% <ø> (ø)
...ptorscontainer/baseInterceptorsContainerFactory.go 74.74% <ø> (ø)
factory/heartbeat/heartbeatV2Components.go 96.31% <96.87%> (-2.59%) ⬇️
epochStart/bootstrap/process.go 84.82% <100.00%> (+0.01%) ⬆️
heartbeat/sender/baseSender.go 97.91% <100.00%> (+0.13%) ⬆️
heartbeat/sender/bootstrapSender.go 100.00% <100.00%> (ø)
heartbeat/sender/commonPeerAuthenticationSender.go 90.90% <100.00%> (ø)
heartbeat/sender/heartbeatSender.go 96.96% <100.00%> (+0.04%) ⬆️
heartbeat/sender/heartbeatSenderFactory.go 100.00% <100.00%> (ø)
heartbeat/sender/multikeyHeartbeatSender.go 86.50% <100.00%> (+0.21%) ⬆️
... and 4 more

... and 2 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@iulianpascalau iulianpascalau self-requested a review June 9, 2023 10:32
factory/heartbeat/heartbeatV2Components.go Outdated Show resolved Hide resolved
factory/heartbeat/heartbeatV2Components.go Show resolved Hide resolved
factory/heartbeat/heartbeatV2Components.go Outdated Show resolved Hide resolved
@@ -40,12 +40,12 @@ func (cpas *commonPeerAuthenticationSender) generateMessageBytes(
msg.Payload = payloadBytes

if p2pSkBytes != nil {
msg.PayloadSignature, err = cpas.messenger.SignUsingPrivateKey(p2pSkBytes, payloadBytes)
msg.PayloadSignature, err = cpas.mainMessenger.SignUsingPrivateKey(p2pSkBytes, payloadBytes)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this ok?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, as this message won't be sent on the full archive network anyway.. mainMessenger = the one from main network

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -184,7 +185,8 @@ func (sender *multikeyHeartbeatSender) sendMessageForKey(pkBytes []byte) error {
return err
}

sender.messenger.BroadcastUsingPrivateKey(sender.topic, buff, pid, p2pSk)
sender.mainMessenger.BroadcastUsingPrivateKey(sender.topic, buff, pid, p2pSk)
sender.fullArchiveMessenger.BroadcastUsingPrivateKey(sender.topic, buff, pid, p2pSk)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debatable if we need to send the managed key also on the full archive network. Add a TODO to rethink about this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added

heartbeat/sender/multikeyPeerAuthenticationSender.go Outdated Show resolved Hide resolved
t.Parallel()

argsBase := createMockBaseArgs()
argsBase.fullArchiveMessenger = nil
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the MultikeyPeerAuthenticationSender should not care about the full archive network.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the fullArchiveMessenger is part of the baseSender, used in all heartbeat, multikeyHeartbeat, peerAuthentication, multikeyPeerAuthentication.. nil checks are done as part of the baseSender

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

heartbeat/sender/peerAuthenticationSender.go Outdated Show resolved Hide resolved
@ssd04 ssd04 self-requested a review June 14, 2023 09:16
@sstanculeanu sstanculeanu merged commit a6975f8 into feat/multiple_p2p_messengers Jun 14, 2023
4 checks passed
@sstanculeanu sstanculeanu deleted the full_archive_heartbeat_sender branch June 14, 2023 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants