-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose-devnet.yaml
174 lines (158 loc) · 5.98 KB
/
docker-compose-devnet.yaml
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
163
164
165
166
167
168
169
170
171
172
173
174
version: "3"
networks:
coprocessor-network:
name: coprocessor-network
driver: bridge
services:
anvil:
build:
context: .
dockerfile: Dockerfile-anvil-latest
container_name: anvil
ports:
- 127.0.0.1:8545:8545
volumes:
- ./env/eigenlayer/anvil/avs-and-eigenlayer-deployed-anvil-state.json:/root/.anvil/state.json
- ./:/cartesi-lambada-coprocessor/
command: /cartesi-lambada-coprocessor/env/eigenlayer/anvil/run-anvil-devnet.sh
healthcheck:
test: bash -c "[ -f /cartesi-lambada-coprocessor/env/eigenlayer/anvil/devnet-operators-ready.flag ]"
interval: 3s
retries: 300
start_period: 15s
networks:
- coprocessor-network
operator:
image: ghcr.io/zippiehq/cartesi-coprocessor-operator:latest
container_name: cartesi-coprocessor-operator
ports:
- 127.0.0.1:3033:3033
- 127.0.0.1:5001:5001
depends_on:
anvil:
condition: service_healthy
setup-operator:
condition: service_completed_successfully
volumes:
- ./operator1-data:/operator-snapshots
environment:
ALWAYS_CONSOLE_PUTCHAR: true
SNAPSHOT_DIR: /operator-snapshots
LLAMA_SERVER: http://llama-server:8080
BLS_PRIVATE_KEY: ${OPERATOR_BLS_KEY:-13219903133444082589215719304558031505888625714969126489655808257015621956774}
IPFS_DAEMON_OFFLINE: ${IPFS_DAEMON_ONLINE-true}
networks:
- coprocessor-network
setup-operator:
image: ghcr.io/zippiehq/cartesi-coprocessor-operator:latest
container_name: cartesi-coprocessor-setup-operator
depends_on:
anvil:
condition: service_healthy
volumes:
- ./contracts/script/output/coprocessor_deployment_output_devnet.json:/operator/contracts/script/output/coprocessor_deployment_output_devnet.json
- ./contracts/script/input/deployment_parameters_devnet.json:/operator/contracts/script/input/deployment_parameters_devnet.json
environment:
OPERATOR_BLS_KEY: ${OPERATOR_BLS_KEY:-13219903133444082589215719304558031505888625714969126489655808257015621956774}
command: bash -c "/operator/setup-operator --operator-private-key 0xc276a0e2815b89e9a3d8b64cb5d745d5b4f6b84531306c97aad82156000a7dd7 --http-endpoint http://anvil:8545 --chain-writer-reader-addresses contracts/script/input/deployment_parameters_devnet.json --avs-registry-writer-addresses contracts/script/output/coprocessor_deployment_output_devnet.json --socket http://operator:3033"
networks:
- coprocessor-network
postgres:
image: postgres:latest
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: user
POSTGRES_DB: db
networks:
- coprocessor-network
solver:
image: ghcr.io/zippiehq/cartesi-coprocessor-solver:latest
container_name: cartesi-coprocessor-solver
ports:
- 127.0.0.1:3034:3034
depends_on:
anvil:
condition: service_healthy
setup-operator:
condition: service_completed_successfully
volumes:
- ./config-devnet.toml:/cartesi-coprocessor-solver/config.toml
environment:
- RUST_LOG=trace
networks:
- coprocessor-network
otterscan:
image: otterscan/otterscan:v2.6.1
ports:
- 127.0.0.1:5100:80
profiles:
- explorer
environment:
ERIGON_URL: http://127.0.0.1:8545
OTTERSCAN_CONFIG: |
{
"erigonURL": "http://127.0.0.1:8545",
"sourcifySources": {
"ipfs": "http://127.0.0.1:5555/repository",
"central_server": "http://127.0.0.1:5555/repository"
}
}
depends_on:
anvil:
condition: service_healthy
setup-operator:
condition: service_completed_successfully
networks:
- coprocessor-network
sourcify:
image: ghcr.io/ethereum/sourcify/server:latest
ports:
- 127.0.0.1:5555:5555
volumes:
- ./sourcify-chains.json:/home/app/services/server/dist/sourcify-chains.json
- ./local.js:/home/app/services/server/dist/config/local.js
environment:
NODE_ENV: production
profiles:
- explorer
depends_on:
anvil:
condition: service_healthy
setup-operator:
condition: service_completed_successfully
networks:
- coprocessor-network
foundry:
image: ghcr.io/foundry-rs/foundry
platform: linux/amd64
profiles:
- explorer
depends_on:
anvil:
condition: service_healthy
setup-operator:
condition: service_completed_successfully
volumes:
- ./contracts:/contracts
entrypoint: sh
command: >
-c "cd contracts && forge verify-contract 0x4c5859f0F772848b2D91F1D83E2Fe57935348029 src/Coprocessor.sol:Coprocessor --constructor-args $(cast abi-encode \"constructor(address)\" \"0xf5059a5D33d5853360D16C683c16e67980206f36\") --verifier sourcify --verifier-url http://sourcify:5555 --rpc-url http://anvil:8545 --chain-id 31337 --num-of-optimizations 200 --compiler-version 0.8.20 --evm-version london
&& forge verify-contract 0x95401dc811bb5740090279Ba06cfA8fcF6113778 lib/eigenlayer-middleware/lib/openzeppelin-contracts/contracts/proxy/transparent/TransparentUpgradeableProxy.sol:TransparentUpgradeableProxy --verifier sourcify --verifier-url http://sourcify:5555 --rpc-url http://anvil:8545 --chain-id 31337 --constructor-args $(cast abi-encode \"constructor(address,address,bytes)\" \"0x9E545E3C0baAB3E08CdfD552C960A1050f373042\" \"0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690\" \"0x\") --num-of-optimizations 200 --compiler-version 0.8.20 --evm-version london"
networks:
- coprocessor-network
llama-server:
hostname: llama-server
container_name: llama-server
image: ghcr.io/ggerganov/llama.cpp:server
profiles:
- llm
volumes:
- ./llama/models:/llama/models
command: -m /llama/models/Phi-3-mini-4k-instruct-q4.gguf -c 2048
healthcheck:
test: ["CMD", "curl", "-f", "http://127.0.0.1:8080/health"]
interval: 10s
retries: 200
start_period: 10s
networks:
- coprocessor-network