hiero-ledger / hiero-ledger/hiero-consensus-node
Update `OutboundConnectionCreator` & `InboundConnectionHandler`
- Dominant language
- Java
- Stars
- 406
- Forks
- 226
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 210
Description
depends on #11762
`OutboundConnectionCreator` & `InboundConnectionHandler` talk to each other, so they need to be updated in tandem.
For both:
- they should not do version checks, this is done by the handshake protocol
- they should not read/write the public key from/to the stream
- they should read the peers certificate(or certificate chain, depending on what the outcome of #11762 is) from the socket
- the certificate should be put it in the connection, this can be used later validation in the case of the `InboundConnectionHandler`
- the validation should be done in `StaticConnectionManagers.newConnection()`. this class will later be refactored, for now, just add the validation
- the `OutboundConnectionCreator` should immediately check if the peer supplied a valid certificate
For the `OutboundConnectionCreator`:
- There should be 1 instance per peer we are connecting to
- It should not have an AB, only the `PeerInfo` of the peer we are connecting to
- It should check the peer's certificated once the connection is established
Contributor guide
Research direction
Start with OutboundConnectionCreator and InboundConnectionHandler, then inspect StaticConnectionManagers.newConnection() and the outcome of dependency #11762. Trace how the two handlers exchange data over the socket and how connections retain peer certificates. Done means both handlers follow the handshake protocol without version or public-key stream handling, certificate validation occurs in the specified locations, and OutboundConnectionCreator has one peer-specific instance without an AB.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- networking, security
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100