Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions misc/sentry-nodes/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
config/
db/
18 changes: 18 additions & 0 deletions misc/sentry-nodes/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

GNOLAND_GENESIS_DIR="../../../gno.land/genesis/"

all: genesis-txs genesis-balances

genesis.json:
@cp -v genesis.validator.json genesis.json

genesis-balances: genesis.json
gnoland genesis balances add --balance-sheet $(GNOLAND_GENESIS_DIR)/genesis_balances.txt

genesis-txs: genesis.json
gnoland genesis txs add $(GNOLAND_GENESIS_DIR)/genesis_txs.jsonl

clean:
@rm -rf genesis.json

re: clean all
104 changes: 104 additions & 0 deletions misc/sentry-nodes/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
services:
traefik:
image: "traefik:v3.0"
container_name: "traefik"
command:
- "--api.insecure=true"
- "--providers.docker=true"
- "--providers.docker.exposedbydefault=true"
- "--entryPoints.web.address=:80"
ports:
- "80:80"
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock:ro"

gno1:
image: "ghcr.io/gnolang/gno/gnoland:master"
container_name: "gno1"
entrypoint: "/entrypoint.sh"
ports:
- 26657:26657
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./genesis.json:/gnoroot/gnoland-data/genesis.json:ro
- ./gnoland-data-1/secrets:/gnoroot/gnoland-data/secrets
environment:
MONIKER: "gnode1"
SEED_MODE: true
// PERSISTENT_PEERS: "g1ywvkuuryghmwmalmcjjnfp9za3zju62tc7pfdq@gno2:26656,g1gk7jk5wgt8r7wqs89rjk9pvkj525gj00r40zlr@gno3:26656"
labels:
- "traefik.http.routers.gno1.rule=Host(`gno1-rpc.localhost`)"
- "traefik.http.routers.gno1.entrypoints=web"
- "traefik.http.services.gno1.loadbalancer.server.port=26657"

gno2:
image: "ghcr.io/gnolang/gno/gnoland:master"
container_name: "gno2"
entrypoint: "/entrypoint.sh"
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./genesis.json:/gnoroot/gnoland-data/genesis.json:ro
- ./gnoland-data-2/secrets:/gnoroot/gnoland-data/secrets
environment:
MONIKER: "gnode2"
SEEDS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
PERSISTENT_PEERS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
labels:
- "traefik.http.routers.gno2.rule=Host(`gno2-rpc.localhost`)"
- "traefik.http.routers.gno2.entrypoints=web"
- "traefik.http.services.gno2.loadbalancer.server.port=26657"

gno3:
image: "ghcr.io/gnolang/gno/gnoland:master"
container_name: "gno3"
entrypoint: "/entrypoint.sh"
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./genesis.json:/gnoroot/gnoland-data/genesis.json:ro
- ./gnoland-data-3/secrets:/gnoroot/gnoland-data/secrets
environment:
MONIKER: "gnode3"
SEEDS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
PERSISTENT_PEERS: "g1gdv6qnla2q0ry545gukpv90szkd6chkjyvnmes@gno3-sentry-1:26656,g1r5h20zkvpfhqe3rmpzakw39jxq5czh67fu8rlm@gno3-sentry-2:26656"
PEX: "false"
labels:
- "traefik.http.routers.gno3.rule=Host(`gno3-rpc.localhost`)"
- "traefik.http.routers.gno3.entrypoints=web"
- "traefik.http.services.gno3.loadbalancer.server.port=26657"

gno3-sentry-1:
image: "ghcr.io/gnolang/gno/gnoland:master"
container_name: "gno3-sentry-1"
entrypoint: "/entrypoint.sh"
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./genesis.json:/gnoroot/gnoland-data/genesis.json:ro
- ./gnoland-data-3-sentry-1/secrets:/gnoroot/gnoland-data/secrets
environment:
MONIKER: "gnode3-sentry-1"
SEEDS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
PERSISTENT_PEERS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
P2P_PRIVATE_PEER_IDS: "g1gk7jk5wgt8r7wqs89rjk9pvkj525gj00r40zlr"
labels:
- "traefik.http.routers.gno3-sentry-1.rule=Host(`gno3-sentry-1-rpc.localhost`)"
- "traefik.http.routers.gno3-sentry-1.entrypoints=web"
- "traefik.http.services.gno3-sentry-1.loadbalancer.server.port=26657"

gno3-sentry-2:
image: "ghcr.io/gnolang/gno/gnoland:master"
container_name: "gno3-sentry-2"
entrypoint: "/entrypoint.sh"
volumes:
- ./entrypoint.sh:/entrypoint.sh
- ./genesis.json:/gnoroot/gnoland-data/genesis.json:ro
- ./gnoland-data-3-sentry-2/secrets:/gnoroot/gnoland-data/secrets
environment:
MONIKER: "gnode3-sentry-2"
SEEDS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
PERSISTENT_PEERS: "g1f2v3rf5c36z54kchnat2vdg0sf9kszuc74l75u@gno1:26656"
P2P_PRIVATE_PEER_IDS: "g1gk7jk5wgt8r7wqs89rjk9pvkj525gj00r40zlr"
labels:
- "traefik.http.routers.gno3-sentry-2.rule=Host(`gno3-sentry-2-rpc.localhost`)"
- "traefik.http.routers.gno3-sentry-2.entrypoints=web"
- "traefik.http.services.gno3-sentry-2.loadbalancer.server.port=26657"
36 changes: 36 additions & 0 deletions misc/sentry-nodes/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env sh

LOG_LEVEL=${LOG_LEVEL:-"error"}

MONIKER=${MONIKER:-"gnode"}
P2P_LADDR=${P2P_LADDR:-"tcp://0.0.0.0:26656"}
RPC_LADDR=${RPC_LADDR:-"tcp://0.0.0.0:26657"}

P2P_PEX=${P2P_PEX:-"true"}
P2P_PRIVATE_PEER_IDS=${P2P_PRIVATE_PEER_IDS:-""}
SEED_MODE=${SEED_MODE:-"false"}

CHAIN_ID=${CHAIN_ID:-"dev"}

SEEDS=${SEEDS:-""}
PERSISTENT_PEERS=${PERSISTENT_PEERS:-""}

echo '{}' > gnoland-data/secrets/priv_validator_state.json

gnoland config init

# Set the config values

gnoland config set moniker "${MONIKER}"
gnoland config set rpc.laddr "${RPC_LADDR}"
gnoland config set p2p.laddr "${P2P_LADDR}"

gnoland config set p2p.pex "${P2P_PEX}"
gnoland config set p2p.private_peer_ids "${P2P_PRIVATE_PEER_IDS}"

gnoland config set p2p.seed_mode "${SEED_MODE}"

gnoland config set p2p.seeds "${SEEDS}"
gnoland config set p2p.persistent_peers "${PERSISTENT_PEERS}"

exec gnoland start --genesis="./gnoland-data/genesis.json" --log-level=${LOG_LEVEL}
1 change: 1 addition & 0 deletions misc/sentry-nodes/gnoland-data-1/secrets/node_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"priv_key":{"@type":"/tm.PrivKeyEd25519","value":"rtTjod0D4UnQkJqZid1l2Dg6pF/b5QQw5EXKeh42PQMl0k0u2yN6ohcOlCceR+k2KHKVIZ2BAqzJFP3emtlgnA=="}}
11 changes: 11 additions & 0 deletions misc/sentry-nodes/gnoland-data-1/secrets/priv_validator_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"address": "g1pceak6gsuh6eaadaenctl05evvvlrdvpzwm5ek",
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "Vk3qD5KDDYWkv2i0biipLyiM6FJt20UFsFu8oyCi7rs="
},
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "BU+pJU2/icZwvpIXO98IMXeRDUT7gFSCgqCmFBuwxgxWTeoPkoMNhaS/aLRuKKkvKIzoUm3bRQWwW7yjIKLuuw=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"height": "1",
"round": "0",
"step": 2,
"signature": "L6kKWnOOK7PmVAn4NAISlWEG64OEVu6ImZPAjO/QOUDP8o2k1k1w7XpoeLYSwtuPRmGhmwKzgS2irCzMWMkOAA==",
"signbytes": "aAgBEQEAAAAAAAAAIkgKILst0CA+YqO1VhGKrvatBKMYLr/mqEYnxYjhY/V+S+BQEiQKIOyS09q3EAq+GOxVrvfoNGpHXRhtmvVduvw1qoEg1m+WEAIqDAj47euzBhCB/aGFAjIDZGV2"
}
1 change: 1 addition & 0 deletions misc/sentry-nodes/gnoland-data-2/secrets/node_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"priv_key":{"@type":"/tm.PrivKeyEd25519","value":"Qj/hGTETzEWEpC5uRZBLUHLPFwvdwkHMxczb55NeVWSyZvAyXpKio2q5scBBSRYN8DxEx5fQNHxjIzwBHsxEkg=="}}
11 changes: 11 additions & 0 deletions misc/sentry-nodes/gnoland-data-2/secrets/priv_validator_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"address": "g1y65ggnvy8cfgypvyf7quhgpl958n6sgu8kua84",
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "gfbtiiXzgm9qvxmE1+V5g6j6jupL33fM5MxS/IiuUOs="
},
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "tq30n/d0szV+5rC+eQnDXslLUM+xoFSOTLDZQFUAbwaB9u2KJfOCb2q/GYTX5XmDqPqO6kvfd8zkzFL8iK5Q6w=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"height": "1",
"round": "0",
"step": 2,
"signature": "MYrV1vnnX94sdEJ+ZkvsczqKwQJx/gCmLjlCOUcQc4ND75CciPg6T/HJgFtlENOXDyaAOJoD4XVj9RVxuKGMBA==",
"signbytes": "aAgBEQEAAAAAAAAAIkgKILst0CA+YqO1VhGKrvatBKMYLr/mqEYnxYjhY/V+S+BQEiQKIOyS09q3EAq+GOxVrvfoNGpHXRhtmvVduvw1qoEg1m+WEAIqDAj47euzBhD92dezAjIDZGV2"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "0yTLRp4pPnI9LbngshCrON4WqCWNXcfHB+tKKG3St+rC+Fkvj2MsfLPae/9x6Pw02ULe2pkiyhjncI0KvP7Aaw=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"address": "g1gy4aruy0xvpnafm3s00qft5sw855vta5kl4zts",
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "N0B657fglcvjRXmTABt46doP9ZOpj+6rMl9ZRYt1G3w="
},
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "YdQlDbdGq/Y7Ntt+ohtyAcjMLzW3tr3kDPjj1n7ao3s3QHrnt+CVy+NFeZMAG3jp2g/1k6mP7qsyX1lFi3UbfA=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "ksvzctOyEQFsGH3cQJMz3gc0kRZHxq6v3yTrDDAxNbxlPrYbqDGsUzlo/g0zvCmMkUmBZY/MxTdVslrOB4SOYw=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"address": "g1lvfad5epkrp00hrmvz7fmwh7a0mrs82jsha827",
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "WWIvkTLmjeIjktbwMI18Abe/tGEEO0A0c3nVfei3hmA="
},
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "Ls1SemZAqTd9nflcN5ksAybtYqa5oV7RuUKq+bP1+IJZYi+RMuaN4iOS1vAwjXwBt7+0YQQ7QDRzedV96LeGYA=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
1 change: 1 addition & 0 deletions misc/sentry-nodes/gnoland-data-3/secrets/node_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"priv_key":{"@type":"/tm.PrivKeyEd25519","value":"w8PhCWwLT5PMuAW7H2cq7qbDozXzulXRhpDqAG94mC5UZ+YIwSmwHK8pVwfvPkFIl6eU0pw09UZ/CGpkAybibg=="}}
11 changes: 11 additions & 0 deletions misc/sentry-nodes/gnoland-data-3/secrets/priv_validator_key.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"address": "g1zq4rlvtxjzs97fw04n2agg80l43rrqp0a440lp",
"pub_key": {
"@type": "/tm.PubKeyEd25519",
"value": "2pbV+Z+EJkH0P1xmuqZ/WnlaiGaTz6CPJRTJWcSw/P4="
},
"priv_key": {
"@type": "/tm.PrivKeyEd25519",
"value": "tJHdgTfDV6HML93GQndbg2mweJ1+Q9MCjWIlcXTwEzjaltX5n4QmQfQ/XGa6pn9aeVqIZpPPoI8lFMlZxLD8/g=="
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}