-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
162 lines (153 loc) · 5.76 KB
/
docker-compose.yml
File metadata and controls
162 lines (153 loc) · 5.76 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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
services:
# Anvil - Local Ethereum testnet
anvil:
image: ghcr.io/nillionnetwork/blacklight-contracts/anvil:sha-dfb9847
container_name: blacklight-anvil
ports:
- "8545:8545"
networks:
- blacklight-network
command: ["--accounts", "15"] # Define the number of accounts to create deployer + keeper + simulator x 2 + erc-8004-simulator + node x 10 = 15
healthcheck:
test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: application/json' --data '{\"jsonrpc\":\"2.0\",\"method\":\"eth_blockNumber\",\"params\":[],\"id\":1}' http://localhost:8545 || exit 1" ]
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
keeper:
build:
context: .
dockerfile: docker/Dockerfile
target: keeper
container_name: blacklight-keeper
depends_on:
anvil:
condition: service_healthy
networks:
- blacklight-network
restart: unless-stopped
environment:
- L2_RPC_URL=http://anvil:8545
- L1_RPC_URL=http://anvil:8545
- PRIVATE_KEY=0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6
- L2_STAKING_OPERATORS_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
- L2_HEARTBEAT_MANAGER_ADDRESS=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
- L2_JAILING_POLICY_ADDRESS=0x0000000000000000000000000000000000000000
- L1_EMISSIONS_CONTROLLER_ADDRESS=0x0000000000000000000000000000000000000000
# ERC-8004 Keeper configuration
- ENABLE_ERC8004_KEEPER=true
- L2_VALIDATION_REGISTRY_ADDRESS=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c
- RUST_LOG=info
# NilCC Simulator - Submits HTXs to the contract
simulator:
build:
context: .
dockerfile: docker/Dockerfile
target: nilcc_simulator
container_name: blacklight-simulator
depends_on:
anvil:
condition: service_healthy
environment:
- RPC_URL=http://anvil:8545
- PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
- PUBLIC_KEY=0x70997970C51812dc3A010C7d01b50e0d17dc79C8
- HTXS_PATH=/app/data/htxs.json
- TOKEN_CONTRACT_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
- STAKING_CONTRACT_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
- MANAGER_CONTRACT_ADDRESS=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
- RUST_LOG=info
networks:
- blacklight-network
restart: unless-stopped
# NilCC Simulator - Submits HTXs to the contract
simulator2:
build:
context: .
dockerfile: docker/Dockerfile
target: nilcc_simulator
container_name: blacklight-simulator-2
depends_on:
anvil:
condition: service_healthy
environment:
- RPC_URL=http://anvil:8545
- PRIVATE_KEY=0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
- PUBLIC_KEY=0xa0Ee7A142d267C1f36714E4a8F75612F20a79720
- HTXS_PATH=/app/data/htxs.json
- TOKEN_CONTRACT_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
- STAKING_CONTRACT_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
- MANAGER_CONTRACT_ADDRESS=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
- RUST_LOG=info
networks:
- blacklight-network
restart: unless-stopped
# ERC-8004 Simulator - Registers agents and submits validation requests
erc-8004-simulator:
build:
context: .
dockerfile: docker/Dockerfile
target: erc_8004_simulator
container_name: erc-8004-simulator
depends_on:
anvil:
condition: service_healthy
environment:
- RPC_URL=http://anvil:8545
- PRIVATE_KEY=0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a
- IDENTITY_REGISTRY_CONTRACT_ADDRESS=0x959922bE3CAee4b8Cd9a407cc3ac1C251C2007B1
- VALIDATION_REGISTRY_CONTRACT_ADDRESS=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c
- VALIDATOR_ADDRESS=0x90F79bf6EB2c4f870365E785982E1f101E93b906
- AGENT_URI=https://api.nilai.nillion.network/v1/health/
- RUST_LOG=info
networks:
- blacklight-network
restart: unless-stopped
# Initialize the mnemonic allocation volume with correct permissions
node-init:
image: busybox:latest
container_name: blacklight-node-init
volumes:
- node-mnemonic-alloc:/alloc/mnemonic
command: ["sh", "-c", "chown -R 1000:1000 /alloc/mnemonic"]
user: root
# blacklight nodes
node:
build:
context: .
dockerfile: docker/Dockerfile
target: blacklight_node_test
depends_on:
anvil:
condition: service_healthy
node-init:
condition: service_completed_successfully
deploy:
replicas: 10 # IMPORTANT: Define the number of accounts to create in the anvil container as 1 for the deployer, 1 for the keeper,3 for the simulators, X for the nodes
environment:
- RUST_LOG=debug
- RPC_URL=http://anvil:8545
- TOKEN_CONTRACT_ADDRESS=0x5FbDB2315678afecb367f032d93F642f64180aa3
- STAKING_CONTRACT_ADDRESS=0xe7f1725E7734CE288F8367e1Bb143E90bb3F0512
- MANAGER_CONTRACT_ADDRESS=0x5FC8d32690cc91D4c39d9d3abcBD16989F875707
# Provide a single mnemonic and scale this service (see docker/README.md)
- MNEMONIC=test test test test test test test test test test test junk
# Shift indices if you want to skip accounts (e.g., keep deployer/simulators on low indices)
- MNEMONIC_BASE_INDEX=${MNEMONIC_BASE_INDEX:-3}
# Shared allocation state so each scaled container gets a unique index (stable across restarts)
- MNEMONIC_ALLOC_ROOT=/alloc/mnemonic
- RUST_LOG=info
volumes:
- node-mnemonic-alloc:/alloc/mnemonic
networks:
- blacklight-network
restart: unless-stopped
networks:
blacklight-network:
driver: bridge
volumes:
node-mnemonic-alloc:
driver: local
driver_opts:
type: tmpfs
device: tmpfs