Skip to content

Commit 6aa7102

Browse files
Merge branch 'master' into improve_scripts
2 parents f5a1758 + ee32c01 commit 6aa7102

11 files changed

+234
-20
lines changed

.github/workflows/verify.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- 'go.mod'
4747
- 'go.sum'
4848
src:
49-
- '!((**.md)|(**/*.md)|(.github/**))'
49+
- '!((**.md)|(**/*.md)|(.github/**)|(docs/**)|(vue/**))'
5050
docs:
5151
- '**.md'
5252
- '**/*.md'

README-DEV.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Have a look at [How To](docs/how-to.md) and [transactions](docs/transactions.md)
130130

131131
Start a local pool as described above.
132132

133-
Every node exposes a REST API at `http://<node-host>:1317` (see <https://docs.cosmos.network/master/core/grpc_rest.html>).
133+
Every node exposes a REST API at `http://<node-host>:1317` (see <https://docs.cosmos.network/v0.44/core/grpc_rest.html>).
134134

135135
Have a look at [transactions](docs/transactions.md) for a full list of REST endpoints.
136136

README.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ In order to send write transactions to the ledger you need:
4545
- A network of Tendermint-based validator nodes (Validators and Observers) maintaining the ledger.
4646
- Every validator node (`dcld` binary) runs DC Ledger application code (based on Cosmos SDK) implementing the use cases.
4747
- See the proposed deployment in [deployment](docs/deployment.png) and [deployment-detailed](docs/deployment-detailed.png).
48+
- See recommended design for DCL MainNet deployment on AWS in [aws deployment](./docs/deployment-design-aws.md)
4849

4950
### Node Types
5051

5152
- **Full Node**: contains a full replication of data (ledger, state, etc.):
5253
- **Validator Node (VN)**: a full node participating in consensus protocol (ordering transactions).
5354
- **Sentry Node:** a full nodes that doesn't participate in consensus and wraps the validator node representing it for the rest of the network
5455
as one of the ways for DDoS protection.
55-
- **Private Sentry Node:** connected to other Validators or Sentry nodes only; should not be accessed by clients.
56-
- **Public Sentry Node:** clients and other nodes can access it; basically the same as an Observer node.
57-
- **Observer Node (ON):** a full node that doesn't participate in consensus. Should be used to receive read/write requests from the clients. Technically can be a Public Sentry node.
56+
- **Private Sentry Node:** a full node to connect other Validator or Sentry nodes only; should not be accessed by clients.
57+
- **Public Sentry Node:** a full node to connect other external full nodes (possibly observer nodes).
58+
- **Observer Node (ON):** a full node that doesn't participate in consensus. Should be used to receive read/write requests from the clients.
5859
- **Light Client Proxy Node**: doesn't contain a full replication of data. Can be used as a proxy to untrusted Full nodes for single-value query requests sent via CLI or Tendermint RPC.
5960
It will verify all state proofs automatically.
6061
- **Seed Node**: provides a list of peers which a node can connect to.
@@ -64,6 +65,7 @@ See
6465
- [Deployment](docs/deployment.png)
6566
- [Deployment-detailed](docs/deployment-detailed.png).
6667
- [Deployment Recommendations](https://github.com/zigbee-alliance/distributed-compliance-ledger/wiki/DCL-MainNet-Deployment)
68+
- [Deployment Recommendations for AWS](./docs/deployment-design-aws.md)
6769
- <https://docs.tendermint.com/master/nodes/validators.html>
6870
- [Run Light Client Proxy](docs/running-light-client-proxy.md)
6971

@@ -121,7 +123,7 @@ See [Run Light Client Proxy](docs/running-light-client-proxy.md) for details how
121123

122124
- **There are no state proofs in REST, so REST queries should be sent to trusted Validator or Observer nodes only.**
123125
- OpenAPI specification: <https://zigbee-alliance.github.io/distributed-compliance-ledger/>.
124-
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/master/core/grpc_rest.html>.
126+
- Any running node exposes a REST API at port `1317`. See <https://docs.cosmos.network/v0.44/core/grpc_rest.html>.
125127
- See [transactions](docs/transactions.md) for a full list of endpoints.
126128
- REST HTTP(S) queries can be directly used for read requests.
127129
See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger).
@@ -132,14 +134,14 @@ See [Run Light Client Proxy](docs/running-light-client-proxy.md) for details how
132134
### gRPC
133135

134136
- **There are no state proofs in gRPC, so gRPC queries should be sent to trusted Validator or Observer nodes only.**
135-
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/master/core/grpc_rest.html>.
137+
- Any running node exposes a REST API at port `9090`. See <https://docs.cosmos.network/v0.44/core/grpc_rest.html>.
136138
- A client code can be generated for all popular languages from the proto files [proto](proto), see <https://grpc.io/docs/languages/>.
137139
- The generated client code can be used for read and write requests, i.e. generation and signing of transactions
138140
See [How to read from the Ledger](docs/transactions.md#how-to-read-from-the-ledger) and [How to write to the Ledger](docs/transactions.md#how-to-write-to-the-ledger) for details.
139141

140142
### Tendermint RPC and Light Client
141143

142-
- Tendermint RPC is exposed by every running node at port `26657`. See <https://docs.cosmos.network/master/core/grpc_rest.html#tendermint-rpc>.
144+
- Tendermint RPC is exposed by every running node at port `26657`. See <https://docs.cosmos.network/v0.44/core/grpc_rest.html#tendermint-rpc>.
143145
- Tendermint RPC supports state proofs. Tendermint's Light Client library can be used to verify the state proofs.
144146
So, if Light Client API is used, then it's possible to communicate with non-trusted nodes.
145147
- Please note, that multi-value queries don't have state proofs support and should be sent to trusted nodes only.
@@ -194,7 +196,7 @@ See [Run local pool](README-DEV.md#run-local-pool) section in [README-DEV.md](RE
194196

195197
### Deploy a persistent pool of nodes
196198

197-
A recommended way for deployment and client connection: [diagram](docs/deployment.png) and [diagram-detailed](docs/deployment-detailed.png).
199+
A recommended way for deployment and client connection: [diagram](docs/deployment.png), [diagram-detailed](docs/deployment-detailed.png) and [diagram-aws](docs/deployment-aws.png).
198200

199201
One can either deploy its own network of validator nodes or join one of the persistent DC Ledger Networks.
200202

@@ -237,6 +239,7 @@ See [Pool Upgrade](docs/pool-upgrade.md) and [Pool Upgrade How To](docs/pool-upg
237239
- [Deployment Pattern](docs/deployment.png)
238240
- [Deployment Pattern Detailed](docs/deployment-detailed.png)
239241
- [Deployment Recommendations](https://github.com/zigbee-alliance/distributed-compliance-ledger/wiki/DCL-MainNet-Deployment)
242+
- [Deployment Recommendations for AWS](./docs/deployment-design-aws.md)
240243
- [Running Node in a new network](docs/running-node.md)
241244
- [Running Genesis Validator Node](docs/advanced/running-genesis-node.md)
242245
- [Running Validator Node](docs/advanced/running-validator-node.md)

docs/deployment-aws.png

254 KB
Loading

docs/deployment-design-aws.md

+210
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
# Recommended design for DCL MainNet deployment on AWS
2+
## AWS deployment diagram
3+
![AWS deployment diagram](./deployment-aws.png)
4+
5+
## Recommended IaC structure and frameworks
6+
7+
- [Ansible](https://www.ansible.com) - provision of the following node types:
8+
- `Genesis Validator` - Validator Node created at the beginning of a network
9+
- `Non-genesis Validator` - Validator Node joined a network after a significant time period
10+
- `Private Sentry` - Full Node to connect other(external) Validator Nodes ([Sentry Node Architecture](https://forum.cosmos.network/t/sentry-node-architecture-overview/454))
11+
- `Public Sentry` - Full Node to connect other(external) Full Nodes
12+
- `Observer` - Full Node for serving gRPC / REST / RPC clients
13+
- `Seed` - Full Node for sharing IP addresses of `Public Sentry` Nodes ([Seed Node](https://docs.tendermint.com/master/nodes/#seed-nodes))
14+
15+
> **_Note:_** Most of the nodes should enable `state sync` to avoid catching up with a network from scratch. Refer to [running-node-in-existing-netwrok.md](./running-node-in-existing-network.md) for details.
16+
17+
- [Terraform](https://www.terraform.io) - deploy an AWS infrastructure from one or more of the following modules:
18+
- Validator - `Validator` node instance
19+
- Private Sentries - Cluster of `Private Sentry` node instances
20+
- Public Sentries - Cluster of `Public Sentry` node instances with a collocated `Seed` node
21+
- Observers - Cluster of `Observer` node instances
22+
- Load Balancers - AWS Network Load Balancers for load balancing between `Observer` clusters
23+
24+
25+
## Node specific AWS and DCL configurations
26+
27+
### Validator Node:
28+
- Tendermint:
29+
- [config.toml]
30+
- [p2p]
31+
- `pex` = false
32+
- `persistent_peers` = [`Private Sentry` nodes with private IPs]
33+
- `addr_book_strict` = false
34+
- [statesync] (only for `Non-genesis Validator` nodes)
35+
- `enable` = true
36+
- `rpc_servers` = [existing `Genesis Validator` / `Sentry` nodes' RPC endpoints]
37+
- `trust_height` = trust-height
38+
- `trust_hash` = trust-hash
39+
- [app.toml]
40+
- [state-sync]
41+
- `snapshot-interval` = snapshot-interval
42+
- `snapshot-keep-recent` = snapshot-keep-recent
43+
44+
- AWS:
45+
- Instance type = EC2 instance
46+
- Network:
47+
- Private IPv4 = IPv4 address
48+
- Public IPv4 = not assigned
49+
- Security:
50+
- inbound:
51+
- allow `Tendermint p2p` port from `Private Sentry` Nodes' VPC CIDR
52+
- allow `RPC` port from `Private Sentry` Nodes' VPC CIDR
53+
- outbound:
54+
- all
55+
56+
57+
### Private Sentry Node:
58+
- Tendermint:
59+
- [config.toml]
60+
- [p2p]
61+
- `pex` = true
62+
- `persistent_peers` = [`Validator` node with private IP + other orgs' validator/sentry nodes with public IPs]
63+
- `private_peer_ids` = [`Validator` node id]
64+
- `unconditional_peers` = [`Validator` node id]
65+
- `addr_book_strict` = false
66+
- [statesync]
67+
- `enable` = true
68+
- `rpc_servers` = [`Validator` node's RPC endpoint]
69+
- `trust_height` = trust-height
70+
- `trust_hash` = trust-hash
71+
- [app.toml]
72+
- [state-sync]
73+
- `snapshot-interval` = snapshot-interval
74+
- `snapshot-keep-recent` = snapshot-keep-recent
75+
- AWS:
76+
- Instance type = EC2 instance
77+
- Network:
78+
- Private IPv4 = IPv4 address
79+
- Public IPv4 = Elastic IP
80+
- Security:
81+
- inbound:
82+
- allow `Tendermint p2p` port for whitelist IPs
83+
- allow `RPC` port from `Observer` Nodes' VPC CIDR
84+
- allow `RPC` port from `Public Sentry` Nodes' VPC CIDR
85+
- outbound:
86+
- all
87+
88+
### Observer Node:
89+
- Tendermint:
90+
- [config.toml]
91+
- [p2p]
92+
- `pex` = true
93+
- `persistent_peers` = [`Private Sentry` nodes with private IPs]
94+
- `addr_book_strict` = false
95+
- [statesync]
96+
- `enable` = true
97+
- `rpc_servers` = [`Private Sentry` nodes' RPC endpoints]
98+
- `trust_height` = trust-height
99+
- `trust_hash` = trust-hash
100+
- [app.toml]
101+
- [api]
102+
- `enable` = true
103+
- AWS:
104+
- Instance type = EC2 instance
105+
- Network:
106+
- Private IPv4 = IPv4 address
107+
- Public IPv4 = not assigned
108+
- Security:
109+
- inbound:
110+
- allow gRPC / REST / RPC ports from the same VPC CIDR
111+
- outbound:
112+
- all
113+
114+
### Public Sentry Node:
115+
- Tendermint:
116+
- [config.toml]
117+
- [p2p]
118+
- `pex` = true
119+
- `persistent_peers` = [`Private Sentry` nodes with private IPs]
120+
- [statesync]
121+
- `enable` = true
122+
- `rpc_servers` = [`Private Sentry` nodes' RPC endpoints]
123+
- `trust_height` = trust-height
124+
- `trust_hash` = trust-hash
125+
- [app.toml]
126+
- [state-sync]
127+
- `snapshot-interval` = snapshot-interval
128+
- `snapshot-keep-recent` = snapshot-keep-recent
129+
- AWS:
130+
- Instance type = EC2 instance
131+
- Network:
132+
- Private IPv4 = IPv4 address
133+
- Public IPv4 = Elastic IP
134+
- Security:
135+
- inbound:
136+
- allow `Tendermint p2p` port from anywhere
137+
- allow `Tendermint RPC` port from anywhere
138+
- outbound:
139+
- all
140+
141+
142+
### Seed Node:
143+
- Tendermint:
144+
- [config.toml]
145+
- [p2p]
146+
- `pex` = true
147+
- `seed_mode` = true
148+
- `persistent_peers` = [`Public Sentry` nodes with public IP]
149+
- [statesync]
150+
- `enable` = true
151+
- `rpc_servers` = [`Private Sentry` nodes' RPC endpoints]
152+
- `trust_height` = trust-height
153+
- `trust_hash` = trust-hash
154+
- AWS:
155+
- Instance type = EC2 instance
156+
- Network:
157+
- Private IPv4 = IPv4 address
158+
- Public IPv4 = Elastic IP
159+
- Public DNS = optional
160+
- Security:
161+
- inbound:
162+
- allow `Tendermint p2p` port from everywhere
163+
- outbound:
164+
- all
165+
166+
### Load Balancer:
167+
- AWS:
168+
- Instance type = Elastic Network Load Balancer
169+
- Availability Zones = [availability zones of observer nodes from the same region]
170+
- Network:
171+
- Private IPv4 = IPv4 address
172+
- Public IPv4 = not assigned
173+
- Public DNS = assigned by AWS
174+
175+
- Target groups:
176+
- gRPC
177+
- Registered targets = [observer nodes from all availability zones in the same region]
178+
- Attributes:
179+
- `Preserve client IP addresses` = disabled
180+
- Health checks:
181+
- protocol = TCP
182+
- REST
183+
- Registered targets = [observer nodes from all availability zones in the same region]
184+
- Attributes:
185+
- `Preserve client IP addresses` = disabled
186+
- Health checks:
187+
- protocol = TCP
188+
- RPC
189+
- Registered targets = [observer nodes from all availability zones the same region]
190+
- Attributes:
191+
- `Preserve client IP addresses` = disabled
192+
- Health checks:
193+
- protocol = TCP
194+
195+
- Listeners:
196+
- gRPC
197+
- Protocol = TLS
198+
- Forward to = gRPC target group
199+
- Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06
200+
- Default SSL/TLS certificate = CA signed TLS certificate
201+
- REST
202+
- Protocol = TLS
203+
- Forward to = REST target group
204+
- Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06
205+
- Default SSL/TLS certificate = CA signed TLS certificate
206+
- RPC
207+
- Protocol = TLS
208+
- Forward to = RPC target group
209+
- Security policy = ELBSecurityPolicy-TLS13-1-2-2021-06
210+
- Default SSL/TLS certificate = CA signed TLS certificate

docs/design/benchmarking.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ The following ones makes sense to track:
4242

4343
### Cosmos SDK metrics
4444

45-
Starting from `v0.40.0` Cosmos SDK provides [telemetry](https://docs.cosmos.network/master/core/telemetry.html) package as a server-side support for application performance and behavior explorations.
45+
Starting from `v0.40.0` Cosmos SDK provides [telemetry](https://docs.cosmos.network/v0.44/core/telemetry.html) package as a server-side support for application performance and behavior explorations.
4646

47-
The following [metrics](https://docs.cosmos.network/master/core/telemetry.html#supported-metrics) make sense to track:
47+
The following [metrics](https://docs.cosmos.network/v0.44/core/telemetry.html#supported-metrics) make sense to track:
4848

4949
- `tx_count`: Total number of txs processed via DeliverTx (tx)
5050
- `tx_successful`: Total number of successful txs processed via DeliverTx  (tx)
@@ -67,7 +67,7 @@ Notes:
6767

6868
- For the moment it's not clear enough what production setup will look like, in particular:
6969
- number of validators
70-
- type of external endpoints, options are [Cosmos SDK / Tendermint endpoints](https://docs.cosmos.network/master/core/grpc_rest.html)
70+
- type of external endpoints, options are [Cosmos SDK / Tendermint endpoints](https://docs.cosmos.network/v0.44/core/grpc_rest.html)
7171
- type and number of proxies for validator-validator and client-validator connections
7272

7373
Current assumptions for production:
@@ -94,7 +94,7 @@ Current assumptions for production:
9494

9595
**ToDo** define which client endpoints are considered in production
9696

97-
As long as CosmosSDK (Tendermint) provides multiple client [endpoints](https://docs.cosmos.network/master/core/grpc_rest.html) makes sense to benchmark all of them (separately and in a combination), in particular:
97+
As long as CosmosSDK (Tendermint) provides multiple client [endpoints](https://docs.cosmos.network/v0.44/core/grpc_rest.html) makes sense to benchmark all of them (separately and in a combination), in particular:
9898

9999
- http RPC
100100
- websocket RPC
@@ -114,7 +114,7 @@ As long as CosmosSDK (Tendermint) provides multiple client [endpoints](https://d
114114

115115
## Load Generation Framework
116116

117-
As long as DCledger based on Cosmos SDK and Tendermint which provide standard HTTP/websocket RPC and REST [endpoints](https://docs.cosmos.network/master/core/grpc_rest.html) to perform both read & write txns generic production ready tools like [jMeter](https://jmeter.apache.org/), [Locust](https://locust.io/), [K6](https://k6.io/) may be used.
117+
As long as DCledger based on Cosmos SDK and Tendermint which provide standard HTTP/websocket RPC and REST [endpoints](https://docs.cosmos.network/v0.44/core/grpc_rest.html) to perform both read & write txns generic production ready tools like [jMeter](https://jmeter.apache.org/), [Locust](https://locust.io/), [K6](https://k6.io/) may be used.
118118

119119
[Locust](https://locust.io/) looks like the most easy-to-go option:
120120

0 commit comments

Comments
 (0)