-
Notifications
You must be signed in to change notification settings - Fork 21
initiator mode on incoming connections #660
Copy link
Copy link
Open
Labels
.EFFORT.Medium1–2 weeks1–2 weeks.RISK.LowWell-understood task, mostly mechanicalWell-understood task, mostly mechanical.VALUE.MediumImproves reliability, performance, or developer experienceImproves reliability, performance, or developer experienceTOPIC.ConsensusMostly related to amaru-consensus / amaru-ouroborosMostly related to amaru-consensus / amaru-ouroboros
Milestone
Metadata
Metadata
Assignees
Labels
.EFFORT.Medium1–2 weeks1–2 weeks.RISK.LowWell-understood task, mostly mechanicalWell-understood task, mostly mechanical.VALUE.MediumImproves reliability, performance, or developer experienceImproves reliability, performance, or developer experienceTOPIC.ConsensusMostly related to amaru-consensus / amaru-ouroborosMostly related to amaru-consensus / amaru-ouroboros
Type
Projects
Status
No status
Abstract
We add the ability to promote a downstream connection to use both responder and initiator roles if the peer permits this. This corresponds to the transition Warm → Hot in the Haskell implementation
Why?
Downstream connections are a source of potential upstream peers which we need to harness, just like the Haskell node does. The connecting peer tells us as part of the handshake protocol whether it expects us to ask for headers or blocks, so this is part of the expected behaviour of a Cardano node.
How?
The Connection stage is extended to support the transition from Responder mode to FullDuplex mode, which is then exposed as a command that can be sent to the Manager stage. The peer selection stage (#659) will be extended to send this command to the manager when appropriate.
The Initiator mode of the Connection stage is also extended to offer the responder role for the keepalive, chainsync, blockfetch, tx_submission protocols. The handshake protocol implementation adds a configuration option to advertise full duplex capability by setting InitiatorOnlyMode=False.
Testing Strategy / Acceptance Criteria
We create an integration test (see #657) with a downstream peer that has a longer chain than the upstream and accepts responder mode on its outgoing connection. The upstream peer will have more transactions than the downstream. At the end of the test, the chain has flowed upstream and the transactions downstream.
Discussion points
No response
Dependencies & Related Tasks
depends on #659
Checklist