-
Notifications
You must be signed in to change notification settings - Fork 87
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
Expose OutboundConnectionState for consensus #4846
Conversation
7ff94b6
to
62f31df
Compare
daa9886
to
2eaba8f
Compare
5910027
to
c0acf44
Compare
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
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.
More can be done by having churn look at the governor's counters.
c0acf44
to
77cb6fe
Compare
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ce5bd2a
to
1451f26
Compare
399e05f
to
07c233b
Compare
ouroboros-network-api/src/Ouroboros/Network/PeerSelection/LocalRootPeers.hs
Outdated
Show resolved
Hide resolved
07c233b
to
b079270
Compare
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
b079270
to
91a88e6
Compare
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
-- | Interfaces required by the peer selection governor, which do not need to | ||
-- be shared with actions and thus are not part of `PeerSelectionActions`. | ||
-- | ||
-- TODO: add other `TVar`s which outbound governor is using. | ||
-- | ||
data PeerSelectionInterfaces m = PeerSelectionInterfaces { | ||
readUseLedgerPeers :: STM m UseLedgerPeers | ||
} |
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.
Nice! Perhaps move peerSharing
, readLocalRootPeers
, readPeerSelectionTargets
, readUseBootstrapPeers
and readLedgerStateJudgement
from PeerSelectionActions
to here since they are not actions as well?
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.
That's what happened in the following commit.
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 noticed the following commit added more things but not the ones I mentioned here.
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.
They are useful in guarded decisions, so I don't think this is the right move. Also, I didn't add readUseLedgerPeers
and the other StrictTVar
s to PeerSelectionActions
because they are unnecessary in guarded decisions.
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor/Types.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/State/LocalRootPeers.hs
Show resolved
Hide resolved
ouroboros-network/sim-tests-lib/Test/Ouroboros/Network/PeerSelection.hs
Outdated
Show resolved
Hide resolved
23a353e
to
b61635a
Compare
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.
more feedback.
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
ouroboros-network/src/Ouroboros/Network/PeerSelection/Governor.hs
Outdated
Show resolved
Hide resolved
8bc5759
to
d710c00
Compare
Include `TVar`s which the outbound governor is writing to.
Most changes in P2P module are imposed by `stylish-haskell`.
* Extended the `GovernorMockEnvironment` with a `TimedScript UseLedgerPeers`. * added `prop_governor_association_mode`
d710c00
to
a38e5a1
Compare
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.
LGTM
Description
This PR subsumes #4836. It provides API for Genesis which allow consensus to
know if the node is connected just to local root peers or has any external
peers. Fixes #4815.
TODO:
Checklist