Skip to content

Commit ca9735c

Browse files
committed
CAD17 peer operator edits
1 parent 273f71b commit ca9735c

File tree

1 file changed

+47
-11
lines changed

1 file changed

+47
-11
lines changed

docs/cad/017_peerops/README.md

+47-11
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
Operating a peer is an important responsibility in the Convex Network.
66

7-
Anyone can run a peer, and they are responsible for maintaining the Consensus of the Network.
7+
Anyone can run a peer, and they are responsible for maintaining the Consensus of the Network. They must place a minimum stake of 1000 Convex Coins.
88

9-
Most users of the Convex Network do not need to run a peer - they connect to peers via clients software that submits transactions and queries information on their behalf.
9+
Most users of the Convex Network do not need to run a peer - they connect to peers via client software that submits transactions and queries information on their behalf. The peer API is open to client requests by default: Peer operators who wish to restrict this may need to set up additional configuration or infrastructure.
1010

1111
This document primarily contains recommendations for peer operators
1212

@@ -15,32 +15,54 @@ This document primarily contains recommendations for peer operators
1515
Running a Peer requires:
1616

1717
- An Internet-connected Server
18-
- At least 100 MBits/sec continuous bandwidth
18+
- At least 100 MBits/sec continuous network bi-directional bandwidth
1919
- A modern processor with at least 8 dedicated Cores
20-
- At least 8 GB RAM (32 Gb Recommended)
21-
- At least 2 TB fast Storage (NVMe Recommended)
20+
- At least 8 GB RAM (32 GB Recommended)
21+
- At least 1 TB fast Storage (NVMe Recommended)
2222
- A secure modern operating system (Linux recommended) with good support for memory mapped files
2323
- Java 21 or above
2424

2525
The network should be configured with:
26-
- a publicly accessible IP address (IPv4 or IPv6)
26+
- a publicly accessible IP address (IPv4 or IPv6). Dual stack networking support is required in the OS.
2727
- firewall access to the server via TCP on a chosen port (the Convex protocol default `18888` is recommended)
28-
- a trusted DNS entry (e.g. `peer.mycompany.com`)
28+
- a trusted DNS entry (e.g. `peer.mycompany.com`) is recommended
29+
- HTTPS certificates recommended for the HTTPS REST API
2930

3031
The DNS entry is optional, but it will help significantly with discoverability / user access to your peer.
3132

3233
## Configuration
3334

35+
### Accounts
36+
37+
In order to operate a peer you will need a Peer Controller account. This can be any account on the Convex network, e.g. `#1678` with at least 1000 Convex Coins.
38+
3439
### Peer Config
3540

3641
Peers can be configured at launch in various ways.
3742

38-
Peers SHOULD configure the number of concurrent outgoing Peer connections according to their available bandwidth. 20 recommended for Peers with fast connections.
43+
#### Outgoing connections
44+
45+
Peers MAY configure the number of concurrent outgoing Peer connections according to their available bandwidth. 20 (the default) recommended for Peers with sufficient outgoing bandwidth. There are trade-offs here:
46+
- With more outgoing connections, your transactions will reach consensus faster
47+
- You must weight this up against bandwidth costs
48+
- If the number is too low your published blocks may get lost if the destinations do not relay them.
49+
50+
TODO: describe mechanism to set connection count controls
3951

4052

4153

4254
## Startup
4355

56+
## Syncing
57+
58+
Your peer will need to synchronize with teh network by connecting to at least one existing peer.
59+
60+
The following peers are available at time of writing for synchronisation:
61+
```
62+
peer.convex.live:18888
63+
```
64+
65+
TODO: CLI commend top start peer with target host
4466

4567
## Shutdown
4668

@@ -56,7 +78,9 @@ It may occur that a peer becomes temporarily disconnected from the peer network.
5678

5779
Peers are designed to automatically recover from temporary network failure and re-establish connections when possible. Peers with normal configuration SHOULD periodically re-attempt to connect with other peers randomly until connection with the Network is re-established.
5880

59-
Peer Operators SHOULD provide for an alternative way to connect to the main network, if only for the purposes of withrawing the Peer's Stake (Peers are at risk of penalisation if they remain disconnected for too long).
81+
Peer Operators SHOULD provide for an alternative way to connect to the main network, if only for the purposes of withdrawing the Peer's Stake. For example, a peer operator may monitor the connectivity of their peer and use Convex Desktop to de-stake the peer if it loses connections.
82+
83+
TODO: describe best way to monitor this. Perhaps API peer health endpoint?
6084

6185
### Security Breach
6286

@@ -68,22 +92,34 @@ Peer Operators SHOULD attempt to withdraw their Stake immediately, possibly thro
6892

6993
Peers are required to post a Peer Stake to participate in consensus.
7094

95+
### Setting a stake
96+
97+
### Withdrawing stake
98+
99+
### Stake penalties
100+
101+
In Protonet, there is no slashing of stake (i.e. peers are not formally penalised for incorrect behaviour).
102+
103+
In the future peers may be automatically penalised for provably incorrect behaviour.
104+
71105
## Key Management
72106

73107
## Connection Management
74108

75109
A Convex Peer is designed to automatically manage P2P connections to the Network during normal operations. In most cases, assuming good network connectivity, a Peer should require no manual intervention to control connections to other Peers.
76110

111+
112+
77113
### Incoming Connections
78114

79-
Peers treat incoming connections as regular Clients, i.e. they afford no particular special priviledges to incoming connections from other Peers. The purpose of this is to ensure that Bad Peers have no particular ability to influence a Peer that they connect to.
115+
Peers treat incoming connections as regular Clients, i.e. they afford no particular special privileges to incoming connections from other Peers. The purpose of this is to ensure that Bad Peers have no particular ability to influence a Peer that they connect to.
80116

81117
### Outgoing connections
82118

83119
A Peer maintains a managed list of outgoing connections (i.e. connections to which they broadcast their Beliefs).
84120

85121
Outgoing connections follow the following rules:
86-
- **Validated hosts**: Peers MUST only connect to Peers accesible on the network via the host address specified for the destination Peer in the current consensus, **or** if they are explicitly instructed to connect to a specific host address by the Peer Operator (e.g. when joining the Network). This minimises the chance of connecting to Bad Peers.
122+
- **Validated hosts**: Peers MUST only connect to Peers accessible on the network via the host address specified for the destination Peer in the current consensus, **or** if they are explicitly instructed to connect to a specific host address by the Peer Operator (e.g. when joining the Network). This minimises the chance of connecting to Bad Peers.
87123
- **Random elimination**: Peers SHOULD eliminate connections at random for low-staked Peers. This allows the Peer network to stay dynamic, and give an opportunity for new Peers to be connected to
88124
- **Stake-weighted selection** Peers MUST connect to other Peers preferentially according to stake, so that Bad Peers do not have a significant chance of isolating a Peer
89125
- **Target connection count**: Peers should attempt to maintain a number of outgoing connections to Peers as configured by the Peer Operator. This allows Peer Operators to control their bandwidth usage.

0 commit comments

Comments
 (0)