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
Vishal/refactor network #48
Merged
Merged
Changes from 3 commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
55a7328
disconnecting from peers not part of the new topology
vishalchangrani 60cf911
wip
vishalchangrani 9e70c00
wip
vishalchangrani 30f68c2
wip
vishalchangrani 25249d8
using collection topology in test
vishalchangrani e87115b
wip
vishalchangrani 2c14597
creating a new way to create network mocks
vishalchangrani f70458d
wip
vishalchangrani bac1694
wip
vishalchangrani 391ad5c
adding network as protocol event listener in scaffold
vishalchangrani 8be8148
subscribing to dummy topic to trigger discovery via libp2p discovery
vishalchangrani 2723e55
wip
vishalchangrani 88bfe16
reverting dummy topic subscription logic
vishalchangrani 103c95f
Merge branch 'master' into vishal/refactor_network
vishalchangrani 433d305
Update network/gossip/libp2p/test/testUtil.go
vishalchangrani e0704c4
Update network/gossip/libp2p/libp2pNode.go
vishalchangrani 585bdcc
fixing middleware_test
vishalchangrani eac83be
Merge remote-tracking branch 'origin/jordan/2594-broadcast-to-next-ep…
vishalchangrani 8ddeb7b
removing helper.go; listening for EpochSetupPhaseStarted in the netwo…
vishalchangrani 84c097b
lowering libp2p log level
vishalchangrani 722a9d4
changing connection manager log messages
vishalchangrani d347421
add skip to setup of epoch transition tests
vishalchangrani c1828ee
add skip to setup of epoch transition tests
vishalchangrani 70c484e
wip
vishalchangrani 9b6345a
Merge branch 'master' into vishal/refactor_network
vishalchangrani 681e66c
lint
vishalchangrani 4556b19
conditional skip to network epoch test
vishalchangrani 71b1370
Merge branch 'vishal/refactor_network' of github.com:onflow/flow-go i…
vishalchangrani 703d2e9
Merge branch 'master' into vishal/refactor_network
vishalchangrani 34b0c0e
changing how free ports are derived
vishalchangrani 2366b67
Merge branch 'vishal/refactor_network' of github.com:onflow/flow-go i…
vishalchangrani 4d2a5fc
Merge branch 'master' into vishal/refactor_network
vishalchangrani 525a320
Merge branch 'master' into vishal/refactor_network
vishalchangrani b2da736
adding missing return
vishalchangrani bb9f48f
Merge branch 'vishal/refactor_network' of github.com:onflow/flow-go i…
vishalchangrani fe1f949
incorporating review comments
vishalchangrani cc04818
Merge branch 'master' into vishal/refactor_network
vishalchangrani b18fafa
Update network/gossip/libp2p/network.go
vishalchangrani 514e12c
fixing the epoch transition test
vishalchangrani a2d5e47
sepearting epoch consumer to NodeIDRefresher; making conngator concur…
vishalchangrani a2a8747
Merge branch 'master' into vishal/refactor_network
vishalchangrani 64be110
incorporating review comments
vishalchangrani 21a4c7a
Merge branch 'vishal/refactor_network' of github.com:onflow/flow-go i…
vishalchangrani baafb04
Merge branch 'master' into vishal/refactor_network
vishalchangrani 20fa2f8
fixing test flakyness
vishalchangrani a0ff783
Merge branch 'vishal/refactor_network' of github.com:onflow/flow-go i…
vishalchangrani File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,7 +46,16 @@ func (listener *NodeIDRefresher) EpochSetupPhaseStarted(newEpoch uint64, first * | |
} | ||
} | ||
|
||
// IDsFromState returns the identities that the network should be using based on the current epoch phase | ||
// IDsFromState returns the identities that the network should be using based on the current epoch phase as following: | ||
// ---------------------------------------------------------------------------------------------------- | ||
// | Epoch Phase | IDs included | | ||
// |--------------------------------------------------------------------------------------------------- | ||
// | EpochPhaseStaking | All IDs from current epoch are included (TODO: add ids from preivous state) | | ||
// |---------------------------------------------------------------------------------------------------| | ||
// | EpochPhaseSetup | All IDs from current and next epoch are included | | ||
// |---------------------------------------------------------------------------------------------------| | ||
// | EpochPhaseCommitted | All IDs from current and next epoch are included | | ||
// |---------------------------------------------------------------------------------------------------| | ||
func IDsFromState(state protocol.ReadOnlyState) (flow.IdentityList, error) { | ||
|
||
// epoch ids from this epoch | ||
|
@@ -61,6 +70,11 @@ func IDsFromState(state protocol.ReadOnlyState) (flow.IdentityList, error) { | |
return nil, fmt.Errorf("failed to retrieve epoch phase: %w", err) | ||
} | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Eventually we will want something like: if phase == flow.EpochPhaseStaking {
ids = ids.Union(state.Final().EPochs().Previous().InitialIdentities())
} There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated comment on this function to reflect that |
||
//TODO: Add epoch ids from previous phase | ||
//if phase == flow.EpochPhaseStaking { | ||
// ids = ids.Union(state.Final().Epochs().Previous().InitialIdentities()) | ||
//} | ||
|
||
// if node is in epoch setup or epoch committed phase, include the next epoch identities as well | ||
if phase == flow.EpochPhaseSetup || phase == flow.EpochPhaseCommitted { | ||
nextEpochIDs, err := state.Final().Epochs().Next().InitialIdentities() | ||
|
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
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.
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.
👍