-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathexternal-node.yml
More file actions
117 lines (113 loc) · 4.2 KB
/
external-node.yml
File metadata and controls
117 lines (113 loc) · 4.2 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
name: "abstract-${NETWORK}-external-node"
services:
prometheus:
image: prom/prometheus:v2.35.0
volumes:
- prometheus-data:/prometheus
- ./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
expose:
- 9090
grafana:
image: grafana/grafana:9.3.6
volumes:
- grafana-data:/var/lib/grafana
- ./grafana/provisioning:/etc/grafana/provisioning
environment:
GF_AUTH_ANONYMOUS_ORG_ROLE: "Admin"
GF_AUTH_ANONYMOUS_ENABLED: "true"
GF_AUTH_DISABLE_LOGIN_FORM: "true"
ports:
- "127.0.0.1:3000:3000"
postgres:
image: "postgres:16"
command: >
postgres
-c max_connections=200
-c log_error_verbosity=terse
-c shared_buffers=2GB
-c effective_cache_size=4GB
-c maintenance_work_mem=1GB
-c checkpoint_completion_target=0.9
-c random_page_cost=1.1
-c effective_io_concurrency=200
-c min_wal_size=4GB
-c max_wal_size=16GB
-c max_worker_processes=16
-c checkpoint_timeout=1800
expose:
- 5430
volumes:
- postgres:/var/lib/postgresql/data
healthcheck:
interval: 1s
timeout: 3s
test:
[
"CMD-SHELL",
'psql -U postgres -c "select exists (select * from pg_stat_activity where datname = ''{{ database_name }}'' and application_name = ''pg_restore'')" | grep -e ".f$$"',
]
environment:
- POSTGRES_PASSWORD=${DB_PASSWORD:-notsecurepassword}
- PGPORT=5430
# Generation of consensus secrets.
# The secrets are generated iff the secrets file doesn't already exist.
generate-secrets:
image: "matterlabs/external-node:${EN_VERSION:-v29.1.1}"
entrypoint:
[
"/configs/generate_secrets.sh",
"/configs/consensus_secrets.yaml",
]
volumes:
- ./configs:/configs
external-node:
image: "matterlabs/external-node:${EN_VERSION:-v29.1.1}"
entrypoint: ["/usr/bin/entrypoint.sh"]
restart: always
depends_on:
postgres:
condition: service_healthy
generate-secrets:
condition: service_completed_successfully
ports:
- "127.0.0.1:${EN_HTTP_PORT:-3060}:${EN_HTTP_PORT:-3060}"
- "127.0.0.1:${EN_WS_PORT:-3061}:${EN_WS_PORT:-3061}"
- "127.0.0.1:${EN_HEALTHCHECK_PORT:-3081}:${EN_HEALTHCHECK_PORT:-3081}"
- "127.0.0.1:${EN_PROMETHEUS_PORT:-3322}:${EN_PROMETHEUS_PORT:-3322}"
# Consensus is currently disabled for Abstract
# - "127.0.0.1:${EN_CONSENSUS_PORT:-3054}:${EN_CONSENSUS_PORT:-3054}"
#- "127.0.0.1:${EN_CONSENSUS_DEBUG_PAGE_PORT:-5000}:${EN_CONSENSUS_DEBUG_PAGE_PORT:-5000}"
volumes:
- rocksdb:/db
- ./configs:/configs
expose:
- 3322
environment:
DATABASE_URL: "postgres://postgres:${DB_PASSWORD:-notsecurepassword}@postgres:5430/abstract_local_ext_node"
DATABASE_POOL_SIZE: 10
EN_HTTP_PORT: ${EN_HTTP_PORT:-3060}
EN_WS_PORT: ${EN_WS_PORT:-3061}
EN_HEALTHCHECK_PORT: ${EN_HEALTHCHECK_PORT:-3081}
EN_PROMETHEUS_PORT: ${EN_PROMETHEUS_PORT:-3322}
EN_ETH_CLIENT_URL: ${EN_ETH_CLIENT_URL:-https://eth.drpc.org}
EN_MAIN_NODE_URL: ${EN_MAIN_NODE_URL:-https://api.mainnet.abs.xyz}
EN_L1_CHAIN_ID: ${EN_L1_CHAIN_ID:-1}
EN_L2_CHAIN_ID: ${EN_L2_CHAIN_ID:-2741}
EN_PRUNING_ENABLED: ${EN_PRUNING_ENABLED:-true}
EN_GAS_PRICE_SCALE_FACTOR: "1.5"
EN_ESTIMATE_GAS_SCALE_FACTOR: "1.3"
EN_ESTIMATE_GAS_ACCEPTABLE_OVERESTIMATION: "5000"
EN_STATE_CACHE_PATH: "./db/ext-node/state_keeper"
EN_MERKLE_TREE_PATH: "./db/ext-node/lightweight"
EN_SNAPSHOTS_RECOVERY_ENABLED: ${EN_SNAPSHOTS_RECOVERY_ENABLED:-true}
EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL: ${EN_SNAPSHOTS_OBJECT_STORE_BUCKET_BASE_URL:-raas-abstract-mainnet-external-node-snapshots}
EN_SNAPSHOTS_OBJECT_STORE_MODE: "GCSAnonymousReadOnly"
RUST_LOG: ${RUST_LOG:-warn,zksync=info,zksync_core::metadata_calculator=debug,zksync_state=debug,zksync_utils=debug,zksync_web3_decl::client=error}
# Consensus is currently disabled for Abstract
#EN_CONSENSUS_CONFIG_PATH: "/configs/consensus_config.yaml"
#EN_CONSENSUS_SECRETS_PATH: "/configs/consensus_secrets.yaml"
volumes:
postgres: {}
rocksdb: {}
prometheus-data: {}
grafana-data: {}