Skip to content

Commit 39c3a63

Browse files
authored
Add Harbour mainnet config for docker compose (#89)
* Add Harbour mainnet config for docker compose * Fix aws harbour region * Fix harbour mainnet region
1 parent 43a4aa5 commit 39c3a63

File tree

8 files changed

+309
-12
lines changed

8 files changed

+309
-12
lines changed

deploy/gnosis/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ networks:
2424
services:
2525
oracle:
2626
container_name: oracle_gnosis
27-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
27+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
2828
restart: always
2929
entrypoint: ["python"]
3030
command: ["oracle/oracle/main.py"]
@@ -34,7 +34,7 @@ services:
3434

3535
keeper:
3636
container_name: keeper_gnosis
37-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
37+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
3838
restart: always
3939
entrypoint: ["python"]
4040
command: ["oracle/keeper/main.py"]

deploy/goerli/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ networks:
2626
services:
2727
oracle:
2828
container_name: oracle_goerli
29-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
29+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
3030
restart: always
3131
entrypoint: ["python"]
3232
command: ["oracle/oracle/main.py"]
@@ -36,7 +36,7 @@ services:
3636

3737
keeper:
3838
container_name: keeper_goerli
39-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
39+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
4040
restart: always
4141
entrypoint: ["python"]
4242
command: ["oracle/keeper/main.py"]

deploy/harbour_goerli/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ networks:
2626
services:
2727
oracle:
2828
container_name: oracle_harbour_goerli
29-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
29+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
3030
restart: always
3131
entrypoint: ["python"]
3232
command: ["oracle/oracle/main.py"]
@@ -36,7 +36,7 @@ services:
3636

3737
keeper:
3838
container_name: keeper_harbour_goerli
39-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
39+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
4040
restart: always
4141
entrypoint: ["python"]
4242
command: ["oracle/keeper/main.py"]
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
##########
2+
# Oracle #
3+
##########
4+
LOG_LEVEL=INFO
5+
ENABLED_NETWORKS=harbour_mainnet
6+
ENABLE_HEALTH_SERVER=true
7+
HEALTH_SERVER_PORT=8080
8+
HEALTH_SERVER_HOST=0.0.0.0
9+
10+
# Remove ",/dns/ipfs/tcp/5001/http" if you don't use "ipfs" profile
11+
IPFS_PIN_ENDPOINTS=/dns/ipfs.infura.io/tcp/5001/https,/dns/ipfs/tcp/5001/http
12+
13+
# Optionally pin merkle proofs to the pinata service for redundancy
14+
IPFS_PINATA_API_KEY=<pinata_api_key>
15+
IPFS_PINATA_SECRET_KEY=<pinata_secret_key>
16+
17+
# Change https://api.thegraph.com to http://graph-node:8000 if running local graph node
18+
HARBOUR_MAINNET_STAKEWISE_SUBGRAPH_URL=https://api.thegraph.com/subgraphs/name/stakewise/stakewise-harbour-mainnet
19+
HARBOUR_MAINNET_ETHEREUM_SUBGRAPH_URL=https://api.thegraph.com/subgraphs/name/stakewise/ethereum-mainnet
20+
21+
# Ethereum private key
22+
# NB! You must use a different private key for every network
23+
HARBOUR_MAINNET_ORACLE_PRIVATE_KEY=0x<private_key>
24+
25+
# ETH2 (consensus) client endpoint
26+
# Change if running an external ETH2 node
27+
HARBOUR_MAINNET_ETH2_ENDPOINT=http://eth2-node:5052
28+
29+
# AWS bucket to publish oracle votes to
30+
HARBOUR_MAINNET_AWS_ACCESS_KEY_ID=<access_id>
31+
HARBOUR_MAINNET_AWS_SECRET_ACCESS_KEY=<secret_key>
32+
HARBOUR_MAINNET_AWS_BUCKET_NAME=oracle-votes-harbour-mainnet
33+
HARBOUR_MAINNET_AWS_REGION=us-east-1
34+
35+
##########
36+
# Keeper #
37+
##########
38+
# Change if running an external ETH1 node
39+
HARBOUR_MAINNET_KEEPER_ETH1_ENDPOINT=http://eth1-node:8545
40+
# Use https://eth-converter.com/ to calculate
41+
HARBOUR_MAINNET_KEEPER_MIN_BALANCE_WEI=100000000000000000
42+
HARBOUR_MAINNET_KEEPER_MAX_FEE_PER_GAS_GWEI=150
43+
44+
########
45+
# IPFS #
46+
########
47+
IPFS_URL=http://ipfs:5001
48+
IPFS_PROFILE=server
49+
IPFS_FD_MAX=8192
50+
51+
#############
52+
# ETH2 Node #
53+
#############
54+
ETH1_ENDPOINT=http://eth1-node:8545
55+
56+
##############
57+
# Graph Node #
58+
##############
59+
GRAPH_LOG=info
60+
GRAPH_NODE_URL=http://graph-node:8020
61+
# Change if running remote IPFS node
62+
ipfs=ipfs:5001
63+
# Change if running an external ETH1 node
64+
# NB! If syncing graph node from scratch archive node must be used.
65+
# It can be switched to fast-sync node once fully synced.
66+
ethereum=mainnet:http://eth1-node:8545
67+
# Postgres DB settings for graph node
68+
postgres_host=postgres
69+
postgres_user=graph
70+
postgres_pass=strong-password
71+
postgres_db=graph-node
72+
73+
############
74+
# Postgres #
75+
############
76+
# postgres is used by local graph node
77+
POSTGRES_DB=graph-node
78+
POSTGRES_USER=graph
79+
POSTGRES_PASSWORD=strong-password
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
version: "3.9"
2+
3+
volumes:
4+
prometheus:
5+
driver: local
6+
alertmanager:
7+
driver: local
8+
postgres:
9+
driver: local
10+
ipfs:
11+
driver: local
12+
geth:
13+
driver: local
14+
erigon:
15+
driver: local
16+
prysm:
17+
driver: local
18+
lighthouse:
19+
driver: local
20+
21+
networks:
22+
harbour_mainnet:
23+
name: harbour_mainnet
24+
driver: bridge
25+
26+
services:
27+
oracle:
28+
container_name: oracle_harbour_mainnet
29+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
30+
restart: always
31+
entrypoint: ["python"]
32+
command: ["oracle/oracle/main.py"]
33+
env_file: [".env"]
34+
networks:
35+
- harbour_mainnet
36+
37+
keeper:
38+
container_name: keeper_harbour_mainnet
39+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
40+
restart: always
41+
entrypoint: ["python"]
42+
command: ["oracle/keeper/main.py"]
43+
env_file: [".env"]
44+
profiles: ["keeper"]
45+
networks:
46+
- harbour_mainnet
47+
48+
prometheus:
49+
container_name: prometheus_harbour_mainnet
50+
image: bitnami/prometheus:2
51+
restart: always
52+
env_file: [".env"]
53+
volumes:
54+
- prometheus:/opt/bitnami/prometheus/data
55+
- ../configs/prometheus.yml:/opt/bitnami/prometheus/conf/prometheus.yml
56+
- ../configs/rules.yml:/opt/bitnami/prometheus/conf/rules.yml
57+
networks:
58+
- harbour_mainnet
59+
60+
alertmanager:
61+
container_name: alertmanager_harbour_mainnet
62+
image: bitnami/alertmanager:0
63+
restart: always
64+
env_file: [".env"]
65+
volumes:
66+
- alertmanager:/opt/bitnami/alertmanager/data
67+
- ../configs/alertmanager.yml:/opt/bitnami/alertmanager/conf/config.yml
68+
depends_on: ["prometheus"]
69+
networks:
70+
- harbour_mainnet
71+
72+
graph-node:
73+
container_name: graph_node_harbour_mainnet
74+
image: graphprotocol/graph-node:v0.25.2
75+
restart: always
76+
env_file: [".env"]
77+
depends_on: ["postgres","ipfs"]
78+
profiles: ["graph"]
79+
networks:
80+
- harbour_mainnet
81+
82+
postgres:
83+
container_name: postgres_harbour_mainnet
84+
image: postgres:14-alpine
85+
restart: always
86+
command: ["postgres", "-cshared_preload_libraries=pg_stat_statements"]
87+
env_file: [".env"]
88+
volumes: ["postgres:/var/lib/postgresql/data"]
89+
profiles: ["graph"]
90+
networks:
91+
- harbour_mainnet
92+
93+
subgraphs:
94+
container_name: subgraphs_harbour_mainnet
95+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/subgraphs:v1.3.0
96+
command: >
97+
/bin/sh -c "until nc -vz graph-node 8020; do echo 'Waiting graph-node'; sleep 2; done
98+
&& yarn build:harbour_mainnet
99+
&& yarn create:local
100+
&& yarn deploy:local"
101+
env_file: [".env"]
102+
restart: "no"
103+
depends_on: ["graph-node","ipfs"]
104+
profiles: ["graph"]
105+
networks:
106+
- harbour_mainnet
107+
108+
ipfs:
109+
container_name: ipfs_harbour_mainnet
110+
image: ipfs/go-ipfs:v0.12.1
111+
restart: always
112+
env_file: [".env"]
113+
ulimits:
114+
nofile:
115+
soft: 8192
116+
hard: 8192
117+
volumes: ["ipfs:/data/ipfs","../configs/ipfs-entrypoint.sh:/usr/local/bin/start_ipfs"]
118+
profiles: ["ipfs"]
119+
networks:
120+
- harbour_mainnet
121+
122+
geth:
123+
container_name: geth_harbour_mainnet
124+
image: ethereum/client-go:v1.10.16
125+
restart: always
126+
command:
127+
- --mainnet
128+
- --syncmode=full
129+
- --http
130+
- --http.addr=0.0.0.0
131+
- --http.vhosts=*
132+
- --http.api=web3,eth,net
133+
- --datadir=/data/ethereum
134+
- --ethash.dagdir=/data/ethereum/.ethash
135+
- --ipcdisable
136+
volumes: ["geth:/data"]
137+
profiles: ["geth"]
138+
networks:
139+
harbour_mainnet:
140+
aliases:
141+
- eth1-node
142+
143+
erigon:
144+
container_name: erigon_harbour_mainnet
145+
image: thorax/erigon:v2022.03.02
146+
restart: always
147+
command:
148+
- erigon
149+
- --chain=mainnet
150+
- --private.api.addr=0.0.0.0:9090
151+
- --maxpeers=100
152+
- --datadir=/home/erigon/.local/share/erigon
153+
- --batchSize=512M
154+
- --prune.r.before=11184524
155+
- --prune=htc
156+
volumes: ["erigon:/home/erigon/.local/share/erigon"]
157+
profiles: ["erigon"]
158+
networks:
159+
- harbour_mainnet
160+
161+
erigon-rpcdaemon:
162+
container_name: erigon_rpcdaemon_harbour_mainnet
163+
image: thorax/erigon:v2022.03.02
164+
restart: always
165+
command:
166+
- rpcdaemon
167+
- --private.api.addr=erigon:9090
168+
- --http.addr=0.0.0.0
169+
- --http.vhosts=*
170+
- --http.corsdomain=*
171+
- --http.api=eth,erigon,web3,net,txpool
172+
- --ws
173+
depends_on: ["erigon"]
174+
profiles: ["erigon"]
175+
networks:
176+
harbour_mainnet:
177+
aliases:
178+
- eth1-node
179+
180+
prysm:
181+
container_name: prysm_harbour_mainnet
182+
image: gcr.io/prysmaticlabs/prysm/beacon-chain:v2.0.6
183+
restart: always
184+
command:
185+
- --prater
186+
- --genesis-state=/data/genesis.ssz
187+
- --datadir=/data
188+
- --rpc-host=0.0.0.0
189+
- --rpc-port=5052
190+
- --monitoring-host=0.0.0.0
191+
- --http-web3provider=$ETH1_ENDPOINT
192+
- --slots-per-archive-point=64
193+
- --accept-terms-of-use
194+
volumes: ["prysm:/data","../configs/genesis.ssz:/data/gensis.ssz"]
195+
profiles: ["prysm"]
196+
networks:
197+
harbour_mainnet:
198+
aliases:
199+
- eth2-node
200+
201+
lighthouse:
202+
container_name: lighthouse_harbour_mainnet
203+
image: sigp/lighthouse:v2.1.5
204+
restart: always
205+
command:
206+
- lighthouse
207+
- --network
208+
- prater
209+
- beacon
210+
- --http
211+
- --http-address=0.0.0.0
212+
- --http-port=5052
213+
- --eth1-endpoints
214+
- $ETH1_ENDPOINT
215+
volumes: ["lighthouse:/root/.lighthouse"]
216+
profiles: ["lighthouse"]
217+
networks:
218+
harbour_mainnet:
219+
aliases:
220+
- eth2-node

deploy/mainnet/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ networks:
2626
services:
2727
oracle:
2828
container_name: oracle_mainnet
29-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
29+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
3030
restart: always
3131
entrypoint: ["python"]
3232
command: ["oracle/oracle/main.py"]
@@ -36,7 +36,7 @@ services:
3636

3737
keeper:
3838
container_name: keeper_mainnet
39-
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.0
39+
image: europe-west4-docker.pkg.dev/stakewiselabs/public/oracle:v2.5.1
4040
restart: always
4141
entrypoint: ["python"]
4242
command: ["oracle/keeper/main.py"]

oracle/networks.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,7 @@
149149
AWS_BUCKET_NAME=config(
150150
f"{HARBOUR_MAINNET_UPPER}_AWS_BUCKET_NAME", default="oracle-votes-mainnet"
151151
),
152-
AWS_REGION=config(
153-
f"{HARBOUR_MAINNET_UPPER}_AWS_REGION", default="eu-central-1"
154-
),
152+
AWS_REGION=config(f"{HARBOUR_MAINNET_UPPER}_AWS_REGION", default="us-east-1"),
155153
AWS_ACCESS_KEY_ID=config(
156154
f"{HARBOUR_MAINNET_UPPER}_AWS_ACCESS_KEY_ID", default=""
157155
),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "oracle"
3-
version = "2.5.0"
3+
version = "2.5.1"
44
description = "StakeWise Oracles are responsible for submitting off-chain data."
55
authors = ["Dmitri Tsumak <[email protected]>"]
66
license = "AGPL-3.0-only"

0 commit comments

Comments
 (0)