Author | SHA1 | Message | Date |
---|---|---|---|
Sam Kleinman |
a855f96946
|
p2p: renames for reactors and routing layer internal moves (#6547) | 4 years ago |
Sam Kleinman |
2ceb816721
|
test infra: make memory network test buffers configurable (#6275) | 4 years ago |
Erik Grinaker |
1f39f808e1
|
p2p: tighten up and test Transport API (#6020)
This tightens up the new P2P `Transport` API and infrastructure, fixes a bunch of bugs and inconsistencies, and adds tests. |
4 years ago |
Erik Grinaker |
50b8907581
|
p2p: clean up new Transport infrastructure (#6017)
This revises the new P2P `Transport` interface and does some preliminary code cleanups and simplifications. The major change here is to add `Connection.Handshake()` for performing node handshakes (once the stream transport API is implemented, this can be done entirely independent of the transport). This moves most of the handshaking logic into the `Router`, such as prevention of head-of-line blocking, validation of peer's `NodeInfo`, controlling timeouts, and so on. This significantly simplifies transports, completely removes the need for internal goroutines, and shares common logic across all transports. This also allows varying the handshake `NodeInfo` across peers, e.g. to vary `ListenAddr`. Similarly, connection filtering is also moved into the switch/router so that it can be shared between transports. |
4 years ago |
Erik Grinaker | 8e7d431f6f | p2p: rename ID to NodeID | 4 years ago |
Erik Grinaker |
84ff991387
|
p2p: add MemoryTransport, an in-memory transport for testing (#5827) | 4 years ago |