Skip to content

Commit

Permalink
[network-spec] Hide TODOs from rendered version
Browse files Browse the repository at this point in the history
Closes: diem#8554
  • Loading branch information
gregnazario authored and bors-libra committed Jun 18, 2021
1 parent 958664c commit 0cc6cd6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions specifications/network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,12 @@ fn send_one_msg_and_flush(socket: TcpStream, msg: NetworkMsg) {
}
```

(TODO(philiphayes): describe receiving a message without over complicating...)
<!-- TODO(philiphayes): describe receiving a message without over complicating... -->

### Connection Termination

Peers may crash or drop connections at any time without any warning and compliant implementations must handle these cases.

When closing a connection, peers are may perform a graceful shutdown by first draining their pending outbound messages, then sending a TCP write half-close, and finally draining inbound messages until observing the remote peer's TCP write half-close.

(TODO(philiphayes): expand on graceful shutdown)
<!-- TODO(philiphayes): expand on graceful shutdown -->
2 changes: 1 addition & 1 deletion specifications/network/handshake-v1.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ The `Handshake` protocol is currently symmetric, i.e., we follow the same upgrad
* After receiving the `HandshakeMsg`, both peers MUST pick the highest intersecting `MessagingProtocolVersion` to use for all subsequent communication.
* Peers MUST only use a `ProtocolId` that is supported by the receiver. The receiver MAY respond with an error message of type `ErrorCode::NotSupported` if it receives a message with a `ProtocolId` it did not advertise or does not support.

(TODO(philiphayes): describe and implement hardening: enforce maximum number of entries in supported_protocols map, maximum length of BitVec, no duplicates)
<!-- TODO(philiphayes): describe and implement hardening: enforce maximum number of entries in supported_protocols map, maximum length of BitVec, no duplicates -->
6 changes: 3 additions & 3 deletions specifications/network/network-address.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
protocols, inspired by libp2p's [multiaddr](https://multiformats.io/multiaddr/) format. The primary differences include
using [BCS] to describe the binary format and reducing the set of supported protocols.

(TODO(philiphayes): include `EncNetworkAddress` spec)
<!-- TODO(philiphayes): include `EncNetworkAddress` spec -->

In particular, a `NetworkAddress` is intended to be a fully self-contained description of _how_ to dial a
[DiemNet](README.md) peer, describing both the base transport protocol and all subsequent connection upgrade protocols.
Expand Down Expand Up @@ -53,8 +53,8 @@ pub enum Protocol {
pub struct DnsName(String);
```

(TODO(philiphayes): link to x25519 ser/de spec)
(TODO(philiphayes): hardening to limit NetworkAddress max size)
<!-- TODO(philiphayes): link to x25519 ser/de spec -->
<!-- TODO(philiphayes): hardening to limit NetworkAddress max size -->

## Human-readable Format

Expand Down
2 changes: 1 addition & 1 deletion specifications/network/onchain-discovery.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ The validator inititates a key rotation to a new network identity public key `<p
tx: set_validator_network_addresses(["/ip4/1.2.3.4/tcp/6180/ln-noise-ik/<pubkey2>/ln-handshake/0"])
```

(TODO(philiphayes): link to actual tx?)
<!-- TODO(philiphayes): link to actual tx? -->

When the transaction commits, the validator observes a reconfiguration with its new advertised network address. It will then begin responding to noise handshakes with the new keypair. Likewise, the node will use the new keypair when dialing out to other peers.

Expand Down

0 comments on commit 0cc6cd6

Please sign in to comment.