-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.validator.yml
More file actions
54 lines (53 loc) · 2.58 KB
/
Copy pathdocker-compose.validator.yml
File metadata and controls
54 lines (53 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# CSB institution/partner validator node.
#
# 1. Get the IDs from whoever operates the chain (or `avalanche blockchain
# describe csb`): the SUBNET ID (to track) and the VM ID (build arg).
# 2. Copy .env.validator.example to .env and fill it in.
# 3. docker compose -f docker-compose.validator.yml up -d --build
# 4. Send the node's NodeID + BLS proof of possession
# (curl -s -X POST --data '{"jsonrpc":"2.0","id":1,"method":"info.getNodeID"}' \
# -H 'content-type:application/json' 127.0.0.1:9650/ext/info)
# to the council so it can register the validator through the
# Validator Manager. The node validates once registered.
#
# Ports are parameterized so a Fuji validator and a mainnet validator can share
# one machine (run each from its own clone directory with its own .env and
# distinct VALIDATOR_*_PORT values — volumes are namespaced per directory).
#
# Volumes hold the database and the node's staking/BLS keys — the validator's
# identity. Back the staking directory up (key ceremony); losing it means
# registering a new validator.
services:
validator:
build:
context: .
dockerfile: docker/Dockerfile.validator
args:
AVALANCHEGO_VERSION: ${AVALANCHEGO_VERSION:-v1.14.1}
SUBNET_EVM_VERSION: ${SUBNET_EVM_VERSION:-0.8.0}
VM_ID: ${CSB_VM_ID:-srEXiWaHuhNyGwPUi444Tu47ZEDwxTWrbQiuD7FmgSAQ6X7Dy}
environment:
# fuji for the testnet phase; mainnet when CSB anchors to Avalanche mainnet
AVAGO_NETWORK_ID: ${AVAGO_NETWORK_ID:-fuji}
AVAGO_TRACK_SUBNETS: ${CSB_SUBNET_ID:?set CSB_SUBNET_ID in .env}
AVAGO_HTTP_HOST: 0.0.0.0
AVAGO_HTTP_ALLOWED_HOSTS: "*"
AVAGO_HTTP_PORT: ${VALIDATOR_API_PORT:-9650}
AVAGO_STAKING_PORT: ${VALIDATOR_P2P_PORT:-9651}
# L1-only validators track the P-Chain without validating the Primary
# Network — keeps disk/CPU needs modest. Set to false only for a node
# that must also validate the Primary Network.
AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK: ${AVAGO_PARTIAL_SYNC_PRIMARY_NETWORK:-true}
ports:
# Staking/consensus port — must be publicly reachable by other validators.
- "${VALIDATOR_P2P_PORT:-9651}:${VALIDATOR_P2P_PORT:-9651}"
# Node API/RPC — bound to localhost only; front with the gated app
# server or an authenticated reverse proxy, never expose raw.
- "127.0.0.1:${VALIDATOR_API_PORT:-9650}:${VALIDATOR_API_PORT:-9650}"
volumes:
- avalanchego-db:/root/.avalanchego/db
- avalanchego-staking:/root/.avalanchego/staking
restart: unless-stopped
volumes:
avalanchego-db:
avalanchego-staking: