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

[Networking] Implements Pluggable Conduit Factory #1986

Merged
merged 24 commits into from Feb 12, 2022

Conversation

yhassanzadeh13
Copy link
Contributor

This PR refactors the networking layer to decouple the creation of Conduits into a stateful ConduitFactory interface, which provides a pluggable Conduit creation functionality for the networking layer. This is a prerequisite decomposition to enable testing our nodes under Byzantine behavior through the Programmable Conduit (PC) framework (see the attached issue for more details).

In a nutshell, a Conduit is the interface that enables an engine push a message to a subset of the remote nodes through the networking layer.

@@ -0,0 +1,53 @@
package 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.

May skip reviewing this file, not a new logic, just organizing into a new file.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can you comment on why the channel logic was moved into a separate file? Is it to allow test channels to be created to simulate BFT attack scenarios?

@yhassanzadeh13 yhassanzadeh13 marked this pull request as ready for review February 11, 2022 00:50
network/network.go Outdated Show resolved Hide resolved
Co-authored-by: Vishal <1117327+vishalchangrani@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Feb 11, 2022

Codecov Report

Merging #1986 (19e3e15) into master (28d3623) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1986      +/-   ##
==========================================
- Coverage   57.61%   57.59%   -0.02%     
==========================================
  Files         631      631              
  Lines       36172    36186      +14     
==========================================
+ Hits        20841    20842       +1     
- Misses      12710    12720      +10     
- Partials     2621     2624       +3     
Flag Coverage Δ
unittests 57.59% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
network/p2p/conduit/conduit.go 0.00% <0.00%> (ø)
network/p2p/network.go 0.00% <0.00%> (ø)
network/test/testUtil.go 93.75% <ø> (ø)
...s/hotstuff/votecollector/staking_vote_processor.go 85.96% <0.00%> (-3.51%) ⬇️
admin/command_runner.go 79.20% <0.00%> (ø)
...sus/approvals/assignment_collector_statemachine.go 50.00% <0.00%> (+2.88%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28d3623...19e3e15. Read the comment docs.

@yhassanzadeh13 yhassanzadeh13 merged commit 9cb2a74 into master Feb 12, 2022
@yhassanzadeh13 yhassanzadeh13 deleted the yahya/6143-programmabl-conduits branch February 12, 2022 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants