-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
48 lines (41 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
48 lines (41 loc) · 1.79 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
services:
tapp:
configs:
- source: run.sh
target: /root/run.sh
volumes:
- /var/run/tappd.sock:/var/run/tappd.sock
build:
context: .
dockerfile_inline: |
FROM ubuntu:24.04@sha256:b59d21599a2b151e23eea5f6602f4af4d7d31c4e236d22bf0b62b86d2e386b8f
RUN apt-get update && apt install -y curl wget
WORKDIR /root
# Foundry
RUN wget https://github.com/foundry-rs/foundry/releases/download/nightly-c3069a50ba18cccfc4e7d5de9b9b388811d9cc7b/foundry_nightly_linux_amd64.tar.gz
RUN tar -xzf ./foundry_nightly_linux_amd64.tar.gz -C /usr/local/bin
# Helios
RUN curl -L 'https://github.com/a16z/helios/releases/download/0.8.8/helios_linux_amd64.tar.gz' | tar -xzC .
CMD [ "bash", "/root/run.sh" ]
platform: linux/amd64
configs:
run.sh:
content: |
# First run Helios in the background
# Provide a reasonable checkpoint.
(
/root/helios ethereum --network=holesky --checkpoint 0x60409a013161b33c8c68c6183c7753e779ec6c24be2f3c50c6036c30e13b34a6 \
--consensus-rpc http://testing.holesky.beacon-api.nimbus.team --execution-rpc $${ETH_RPC_URL}
) &
# Let it sync #TODO do this smarter
sleep 5
# Then run some queries. This would be a good place to run an api server.
# Cast <-> Helios <-> Untrusted RPCs
cast block --rpc-url=localhost:8545 | tee response.txt
# Fetch the quote
HASH=$$(sha256sum response.txt)
PAYLOAD="{\"report_data\": \"$$(echo -n $$HASH | od -A n -t x1 | tr -d ' \n')\"}"
ATTEST=$$(curl -X POST --unix-socket /var/run/tappd.sock -d "$$PAYLOAD" http://localhost/prpc/Tappd.TdxQuote?json)
# TODO: Fallback to the dummy remote attestation
echo ATTEST=$${ATTEST} >> response.txt
cat response.txt