Skip to content

Commit 33952b5

Browse files
zivkovicmilosseokheejangsw360cabalbttxmazzy89
authored
feat: add test6 genesis (#4093)
## Description This PR adds the initial `test6` `genesis.json`. Genesis balances taken from: gnolang/independence-day#21 Genesis generation instructions and script: https://github.com/gnolang/gno/tree/chain/test6-genesis/misc/deployments/test6.gno.land Leftover: - [x] Populate genesis txs - [x] Populate balances - [x] Populate validators For the initial genesis state, check: https://github.com/gnolang/gno/compare/chain/test6 --------- Co-authored-by: SeokHee <[email protected]> Co-authored-by: Sergio Maria Matone <[email protected]> Co-authored-by: albttx <[email protected]> Co-authored-by: Salvatore Mazzarino <[email protected]>
1 parent 8e27d4f commit 33952b5

File tree

4 files changed

+468
-0
lines changed

4 files changed

+468
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Checklist Test6
2+
3+
- [X] Collect all validators keys for genesis
4+
- [X] Collect all balances for genesis
5+
- [X] Generate Final Genesis File
6+
- [X] Collect list of public peer nodes for configurations
7+
- [X] Generate Release Docker Images of Gnoland for test6
8+
- [X] Change DNS entries
+156
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# Overview
2+
3+
This deployment folder contains minimal information needed to launch a full test6.gno.land validator node.
4+
5+
Below is the information relating to the `genesis.json`, how to download it or generate it independently.
6+
7+
## `genesis.json`
8+
9+
The initial `genesis.json` validator set is consisted of 4 entities (8 validators in total):
10+
11+
- Gno Core - the gno core team (**2 validators**)
12+
- Gno DevX - the gno devX team (**2 validators**)
13+
- AiB - the AiB DevOps team (**2 validators**)
14+
- Onbloc - the [Onbloc](https://onbloc.xyz/) team (**2 validators**)
15+
16+
Subsequent validators will be added through the governance mechanism in govdao.
17+
18+
**The premined genesis balances are for testing purposes only, and in no way reflect the actual premine balances
19+
in future network deployments.**
20+
21+
## `config.toml`
22+
23+
The `config.toml` located in this directory is a **_guideline_**, and not a definitive configuration on how
24+
all nodes should be configured in the network.
25+
26+
### Important params
27+
28+
Some configuration params are required, while others are advised to be set.
29+
30+
- `moniker` - the recognizable identifier of the node.
31+
- `consensus.timeout_commit` - the timeout value after the consensus commit phase. ⚠️ **Required to be `3s`** ⚠️.
32+
- `consensus.peer_gossip_sleep_duration` - the timeout for peer gossip. ⚠️ **Required to be `10ms`** ⚠️.
33+
- `mempool.size` - the maximum number of txs in the mempool. **Advised to be `10000`**.
34+
- `p2p.laddr` - the listen address for P2P traffic, **specific to every node deployment**. It is advised to use a
35+
reverse-proxy, and keep this value at `tcp://0.0.0.0:<port>`.
36+
- `p2p.max_num_outbound_peers` - the max number of outbound peer connections. **Advised to be `40`**.
37+
- `p2p.persistent_peers` - the persistent peers. ⚠️ **Required to be
38+
`g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-01.test6.testnets.gno.land:26656,g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-02.test6.testnets.gno.land:26656`
39+
** ⚠️.
40+
- `p2p.seeds` - the bootnode peers. ⚠️ **Required to be
41+
`g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-01.test6.testnets.gno.land:26656,g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-02.test6.testnets.gno.land:26656`
42+
** ⚠️.
43+
- `p2p.pex` - if using a sentry node architecture, should be `false`. **If not, please set to `true`**.
44+
- `p2p.external_address` - the advertised peer dial address. If empty, will use the same port as the `p2p.laddr`. This
45+
value should be **changed to `{{ your_ip_address }}:26656`**
46+
- `p2p.flush_throttle_timeout` - the timeout for flushing multiplex data. ⚠️ **Required to be `10ms`** ⚠️.
47+
- `rpc.laddr` - the JSON-RPC listen address, **specific to every node deployment**.
48+
- `telemetry.enabled` - flag indicating if telemetry should be turned on. **Advised to be `true`**.
49+
- `telemetry.exporter_endpoint` - endpoint for the otel exported. ⚠️ **Required if `telemetry.enabled=true`** ⚠️.
50+
- `telemetry.service_instance_id` - unique ID of the node telemetry instance, **specific to every node deployment**.
51+
52+
---
53+
54+
## test6 `genesis.json` download
55+
56+
You can download the full `genesis.json` using the following steps:
57+
58+
```shell
59+
wget -O genesis.json https://gno-testnets-genesis.s3.eu-central-1.amazonaws.com/test6/genesis.json
60+
```
61+
62+
The `shasum` hash of the `genesis.json` should be `9a5e21d0b1ed394a0999f04ac5b88776df702a798b326aad70cf1cd2888a238a`.
63+
Verify it by running:
64+
65+
```sh
66+
shasum -a 256 genesis.json
67+
9a5e21d0b1ed394a0999f04ac5b88776df702a798b326aad70cf1cd2888a238a genesis.json
68+
```
69+
70+
**NOTE**: Keep in mind that the generated genesis.json checksum will differ from the downloaded one,
71+
because of a bug in `gnogenesis balances` that doesn't deterministically generate the genesis balance list:
72+
https://github.com/gnolang/gno/issues/4122
73+
74+
---
75+
76+
## Generating the test6 `genesis.json`
77+
78+
To generate the `genesis.json`, you will need the `gnogenesis` tool from this branch.
79+
80+
### Step 1: Install `gnogenesis` globally
81+
82+
From the repo root:
83+
84+
```shell
85+
cd contribs/gnogenesis
86+
make install
87+
```
88+
89+
### Step 2: Run the generation script
90+
91+
The required `genesis.json` generation logic is packaged up in `generate.sh`.
92+
To run it, make sure to adjust correct permissions:
93+
94+
```shell
95+
chmod +x ./generate.sh
96+
```
97+
98+
Run the script, and it should generate a `genesis.json` locally:
99+
100+
```shell
101+
./generate.sh
102+
```
103+
104+
---
105+
106+
### genesis.json Artifacts
107+
108+
The `genesis_balances.txt` can be fetched locally by:
109+
110+
```shell
111+
wget -O genesis_balances.txt https://gno-testnets-genesis.s3.eu-central-1.amazonaws.com/test6/genesis_balances.txt
112+
```
113+
114+
To verify the checksum of the genesis balances sheet:
115+
116+
```shell
117+
shasum -a 256 genesis_balances.txt
118+
3c265896283fa144f6cc5c7db7fd0583d762a075d9ea06ccb98084f73888429d genesis_balances.txt
119+
```
120+
121+
The `genesis_txs.jsonl` can be fetched locally by:
122+
123+
```shell
124+
wget -O genesis_txs.jsonl https://gno-testnets-genesis.s3.eu-central-1.amazonaws.com/test6/genesis_txs.jsonl
125+
```
126+
127+
To verify the checksum of the genesis transaction sheet:
128+
129+
```shell
130+
shasum -a 256 genesis_txs.jsonl
131+
d6eaa5f88f31deacf82accb4beb8ff63b75083d624e1df4136521aa4c672bdc9 genesis_txs.jsonl
132+
```
133+
134+
### Reconstructing the genesis transactions
135+
136+
Test6 genesis transactions are generated from the `chain/test6` branch, and they are exclusively the `examples` deploy
137+
transactions, with the state on that branch.
138+
139+
The deployer account for each test6 genesis transaction is derived from the mnemonic (`index 0`, `account 0`):
140+
141+
```shell
142+
anchor hurt name seed oak spread anchor filter lesson shaft wasp home improve text behind toe segment lamp turn marriage female royal twice wealth
143+
```
144+
145+
You can run the following steps to regenerate the `genesis_txs.jsonl`, from the root of the `chain/test6` branch
146+
147+
```shell
148+
mkdir -p tmp-gnokey
149+
150+
gnokey add --recover Test6Deployer --home tmp-gnokey
151+
gnogenesis generate -chain-id test6 -genesis-time 1744614000
152+
gnogenesis txs add packages ./examples -gno-home tmp-gnokey -key-name Test6Deployer
153+
gnogenesis txs export genesis_txs.jsonl
154+
155+
rm -rf tmp-gnokey
156+
```
+225
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,225 @@
1+
# Mechanism to connect to the ABCI application: socket | grpc
2+
abci = "socket"
3+
4+
# Database backend: goleveldb | boltdb
5+
# * goleveldb (github.com/syndtr/goleveldb - most popular implementation)
6+
# - pure go
7+
# - stable
8+
#* boltdb (uses etcd's fork of bolt - go.etcd.io/bbolt)
9+
# - EXPERIMENTAL
10+
# - may be faster is some use-cases (random reads - indexer)
11+
# - use boltdb build tag (go build -tags boltdb)
12+
db_backend = "goleveldb"
13+
14+
# Database directory
15+
db_dir = "db"
16+
17+
# If this node is many blocks behind the tip of the chain, FastSync
18+
# allows them to catchup quickly by downloading blocks in parallel
19+
# and verifying their commits
20+
fast_sync = true
21+
home = ""
22+
23+
# A custom human readable name for this node
24+
moniker = "artemis.local" # Change me!
25+
26+
# Path to the JSON file containing the private key to use for node authentication in the p2p protocol
27+
node_key_file = "secrets/node_key.json"
28+
29+
# Path to the JSON file containing the private key to use as a validator in the consensus protocol
30+
priv_validator_key_file = "secrets/priv_validator_key.json"
31+
32+
# TCP or UNIX socket address for Tendermint to listen on for
33+
# connections from an external PrivValidator process
34+
priv_validator_laddr = ""
35+
36+
# Path to the JSON file containing the last sign state of a validator
37+
priv_validator_state_file = "secrets/priv_validator_state.json"
38+
39+
# TCP or UNIX socket address for the profiling server to listen on
40+
prof_laddr = ""
41+
42+
# TCP or UNIX socket address of the ABCI application,
43+
# or the name of an ABCI application compiled in with the Tendermint binary
44+
proxy_app = "tcp://127.0.0.1:26658"
45+
46+
##### app settings #####
47+
[application]
48+
49+
# Lowest gas prices accepted by a validator
50+
min_gas_prices = ""
51+
52+
##### consensus configuration options #####
53+
[consensus]
54+
55+
# EmptyBlocks mode and possible interval between empty blocks
56+
create_empty_blocks = true
57+
create_empty_blocks_interval = "0s"
58+
home = ""
59+
60+
# Reactor sleep duration parameters
61+
peer_gossip_sleep_duration = "10ms" # Do NOT change me, leave me at 10ms!
62+
peer_query_maj23_sleep_duration = "2s"
63+
64+
# Make progress as soon as we have all the precommits (as if TimeoutCommit = 0)
65+
skip_timeout_commit = false
66+
timeout_commit = "3s" # Do NOT change me, leave me at 3s!
67+
timeout_precommit = "1s"
68+
timeout_precommit_delta = "500ms"
69+
timeout_prevote = "1s"
70+
timeout_prevote_delta = "500ms"
71+
timeout_propose = "3s"
72+
timeout_propose_delta = "500ms"
73+
wal_file = "wal/cs.wal/wal"
74+
75+
##### mempool configuration options #####
76+
[mempool]
77+
broadcast = true
78+
79+
# Size of the cache (used to filter transactions we saw earlier) in transactions
80+
cache_size = 10000
81+
home = ""
82+
83+
# Limit the total size of all txs in the mempool.
84+
# This only accounts for raw transactions (e.g. given 1MB transactions and
85+
# max_txs_bytes=5MB, mempool will only accept 5 transactions).
86+
max_pending_txs_bytes = 1073741824 # ~1GB
87+
recheck = true
88+
89+
# Maximum number of transactions in the mempool
90+
size = 10000 # Advised value is 10000
91+
wal_dir = ""
92+
93+
##### peer to peer configuration options #####
94+
[p2p]
95+
96+
# Address to advertise to peers for them to dial
97+
# If empty, will use the same port as the laddr,
98+
# and will introspect on the listener or use UPnP
99+
# to figure out the address.
100+
external_address = "" # Change me!
101+
102+
# Time to wait before flushing messages out on the connection
103+
flush_throttle_timeout = "10ms" # Do NOT change me, leave me at 10ms!
104+
home = ""
105+
106+
# Address to listen for incoming connections
107+
laddr = "tcp://0.0.0.0:26656"
108+
109+
# Maximum number of inbound peers
110+
max_num_inbound_peers = 40
111+
112+
# Maximum number of outbound peers to connect to, excluding persistent peers
113+
max_num_outbound_peers = 40 # Advised value is 40
114+
115+
# Maximum size of a message packet payload, in bytes
116+
max_packet_msg_payload_size = 1024
117+
118+
# Comma separated list of nodes to keep persistent connections to
119+
persistent_peers = ""
120+
121+
# Set true to enable the peer-exchange reactor
122+
pex = true
123+
124+
# Comma separated list of peer IDs to keep private (will not be gossiped to other peers)
125+
private_peer_ids = "g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-01.test6.testnets.gno.land:26656,g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-02.test6.testnets.gno.land:26656"
126+
127+
# Rate at which packets can be received, in bytes/second
128+
recv_rate = 5120000
129+
130+
# Comma separated list of seed nodes to connect to
131+
seeds = "g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-01.test6.testnets.gno.land:26656,g16384atcuf6ew3ufpwtvhymwfyl2aw390aq8jtt@gno-core-sen-02.test6.testnets.gno.land:26656"
132+
133+
# Rate at which packets can be sent, in bytes/second
134+
send_rate = 5120000
135+
136+
##### rpc server configuration options #####
137+
[rpc]
138+
139+
# A list of non simple headers the client is allowed to use with cross-domain requests
140+
cors_allowed_headers = ["Origin", "Accept", "Content-Type", "X-Requested-With", "X-Server-Time"]
141+
142+
# A list of methods the client is allowed to use with cross-domain requests
143+
cors_allowed_methods = ["HEAD", "GET", "POST", "OPTIONS"]
144+
145+
# A list of origins a cross-domain request can be executed from
146+
# Default value '[]' disables cors support
147+
# Use '["*"]' to allow any origin
148+
cors_allowed_origins = ["*"]
149+
150+
# TCP or UNIX socket address for the gRPC server to listen on
151+
# NOTE: This server only supports /broadcast_tx_commit
152+
grpc_laddr = ""
153+
154+
# Maximum number of simultaneous connections.
155+
# Does not include RPC (HTTP&WebSocket) connections. See max_open_connections
156+
# If you want to accept a larger number than the default, make sure
157+
# you increase your OS limits.
158+
# 0 - unlimited.
159+
# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
160+
# 1024 - 40 - 10 - 50 = 924 = ~900
161+
grpc_max_open_connections = 900
162+
home = ""
163+
164+
# TCP or UNIX socket address for the RPC server to listen on
165+
laddr = "tcp://0.0.0.0:26657" # Please use a reverse proxy!
166+
167+
# Maximum size of request body, in bytes
168+
max_body_bytes = 1000000
169+
170+
# Maximum size of request header, in bytes
171+
max_header_bytes = 1048576
172+
173+
# Maximum number of simultaneous connections (including WebSocket).
174+
# Does not include gRPC connections. See grpc_max_open_connections
175+
# If you want to accept a larger number than the default, make sure
176+
# you increase your OS limits.
177+
# 0 - unlimited.
178+
# Should be < {ulimit -Sn} - {MaxNumInboundPeers} - {MaxNumOutboundPeers} - {N of wal, db and other open files}
179+
# 1024 - 40 - 10 - 50 = 924 = ~900
180+
max_open_connections = 900
181+
182+
# How long to wait for a tx to be committed during /broadcast_tx_commit.
183+
# WARNING: Using a value larger than 10s will result in increasing the
184+
# global HTTP write timeout, which applies to all connections and endpoints.
185+
# See https://github.com/tendermint/classic/issues/3435
186+
timeout_broadcast_tx_commit = "10s"
187+
188+
# The path to a file containing certificate that is used to create the HTTPS server.
189+
# Might be either absolute path or path related to tendermint's config directory.
190+
# If the certificate is signed by a certificate authority,
191+
# the certFile should be the concatenation of the server's certificate, any intermediates,
192+
# and the CA's certificate.
193+
# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run.
194+
tls_cert_file = ""
195+
196+
# The path to a file containing matching private key that is used to create the HTTPS server.
197+
# Might be either absolute path or path related to tendermint's config directory.
198+
# NOTE: both tls_cert_file and tls_key_file must be present for Tendermint to create HTTPS server. Otherwise, HTTP server is run.
199+
tls_key_file = ""
200+
201+
# Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool
202+
unsafe = false
203+
204+
##### node telemetry #####
205+
[telemetry]
206+
enabled = true # Advised to be `true`
207+
208+
# the endpoint to export metrics to, like a local OpenTelemetry collector
209+
exporter_endpoint = "" # Change me to the OTEL endpoint!
210+
meter_name = "test6.gno.land"
211+
212+
# the ID helps to distinguish instances of the same service that exist at the same time (e.g. instances of a horizontally scaled service), in Prometheus this is transformed into the label 'exported_instance
213+
service_instance_id = "gno-node-1" # Change me!
214+
215+
# in Prometheus this is transformed into the label 'exported_job'
216+
service_name = "gno.land"
217+
218+
##### event store #####
219+
[tx_event_store]
220+
221+
# Type of event store
222+
event_store_type = "none"
223+
224+
# Event store parameters
225+
[tx_event_store.event_store_params]

0 commit comments

Comments
 (0)