Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(CI): Docker compose for all components #1044

Merged
merged 169 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 161 commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
8757db5
Add Dockerfiles
klaus993 Sep 20, 2024
2612361
Add config files for docker
klaus993 Sep 20, 2024
b874482
Add docker compose manifest with all services but the batcher
klaus993 Sep 20, 2024
41a7218
Add batcher Dockerfile and config files
klaus993 Sep 20, 2024
cff6035
Aggregator config fixes
klaus993 Sep 20, 2024
df68e7c
Fix mit mock tokens command
klaus993 Sep 20, 2024
f40443b
Add localstack
klaus993 Sep 20, 2024
67fe122
Add batcher to docker compose
klaus993 Sep 20, 2024
3d73c1c
Copy all config files for anvil
klaus993 Sep 20, 2024
9e657a1
Send env vars via docker compose instead of cli parameter
klaus993 Sep 21, 2024
e09d3e1
Add ca-certificates package
klaus993 Sep 21, 2024
efee3aa
Add contracts to batcher
klaus993 Sep 21, 2024
d716539
[WIP] make batcher work
klaus993 Sep 21, 2024
035d94f
Fix operator docker config
klaus993 Sep 21, 2024
8c477ab
Use profiles in docker compose with groups of services
klaus993 Sep 21, 2024
abdba53
Remove sleep hack from docker commands
klaus993 Sep 21, 2024
2416df3
Add Makefile targets to run and kill stack with docker compose
klaus993 Sep 21, 2024
ad184f6
Add docker-build Makefile target
klaus993 Sep 23, 2024
6b2d4f7
Add docker compose dummy services
klaus993 Sep 23, 2024
f203e1f
Make base image build in macOS
klaus993 Sep 23, 2024
d918eaf
Configure operator build to use GCC and CGO
klaus993 Sep 23, 2024
54fa33b
Change order of build because of dependencies
klaus993 Sep 23, 2024
bb47484
Remove unnecessary .env files
klaus993 Sep 23, 2024
66d4ad0
Make batcher and operator compile in linux/arm64
klaus993 Sep 23, 2024
5f34065
Send GOARCH env var via command line, according to the host's arch
klaus993 Sep 23, 2024
7b00b2a
Build eigenlayer-cli separately
klaus993 Sep 23, 2024
ddf4ded
Build aligned cli inside batcher
klaus993 Sep 23, 2024
35e850f
Remove commented code
klaus993 Sep 23, 2024
d7794b3
Compile aligned
klaus993 Sep 23, 2024
796d57c
Add Makefile targets to send burst of proofs on docker
klaus993 Sep 23, 2024
490e4da
Add docker build specific targets
klaus993 Sep 24, 2024
baade35
Remove unnecesary sh -c commands
klaus993 Sep 24, 2024
8f9684e
Remove old files
klaus993 Sep 24, 2024
3575572
Replace - for _
klaus993 Sep 24, 2024
7f66fc9
Add dockerignore files
entropidelic Sep 25, 2024
4e2be66
Add docker-compose.yml to dockerignore
klaus993 Sep 25, 2024
ef40668
Remove foundry from base image
klaus993 Sep 26, 2024
f6c6672
Batcher: run cargo install apart from build
klaus993 Sep 26, 2024
292b3a7
Batcher: remove unnecesary files
klaus993 Sep 26, 2024
dec2d18
Use env vars for RPC URL and proof generator address
klaus993 Sep 27, 2024
584d8b3
Add compilation of gnark_groth16_bn254_infinite_script in batcher
klaus993 Sep 27, 2024
280162a
Add Makefile targets to send different proofs with docker
klaus993 Sep 27, 2024
e7c37b7
Add healtcheck to anvil and check for it on docker_up
klaus993 Sep 27, 2024
2d49df7
Remove aggregator from base profile
klaus993 Sep 27, 2024
f08d345
Add Makefile targets to restart aggregator, operator, batcher
klaus993 Sep 27, 2024
78ea5e4
Give a way to attach to foundry container to run cast
klaus993 Sep 27, 2024
002b28e
Add basic readme for docker compose
klaus993 Sep 27, 2024
6f241d0
Add docker logs Makefile targets
klaus993 Sep 30, 2024
1d1bf9e
Test
klaus993 Sep 30, 2024
f6f1e78
Add flags to force recreation and removing orphans
klaus993 Oct 3, 2024
b0ebf50
Add Makefile targets to attach to containers
klaus993 Oct 3, 2024
963a040
Add Makefile target to verify proofs onchain
klaus993 Oct 3, 2024
ef14009
Workflow test
klaus993 Oct 3, 2024
c7805cc
Add sudo
klaus993 Oct 3, 2024
5a375e1
Swap `==` for `=` for sh comparison
klaus993 Oct 3, 2024
7a01390
Fix workflow
klaus993 Oct 3, 2024
c158fb0
Add timeout minutes 30
klaus993 Oct 3, 2024
48ebfa2
Added docker_verify_proof_submission_success make target to check pro…
samoht9277 Oct 4, 2024
d375989
Removed halo2 proofs, fixed minor issues on docker Make targets.
samoht9277 Oct 7, 2024
475a0d8
Use images from our own registry
klaus993 Oct 8, 2024
2ec46d3
Remove logs from workflow
klaus993 Oct 8, 2024
260af08
Added login to GitHub Container Registry
samoht9277 Oct 8, 2024
1c93437
Chenged PAT name.
samoht9277 Oct 8, 2024
f1d9af2
Use docker images from registry in FROM
klaus993 Oct 8, 2024
15c5dc1
Added target to run all proof submit, also tuned the docker_verify_pr…
samoht9277 Oct 8, 2024
a6beeef
Merge branch 'docker-compose' of github.com:yetanotherco/aligned_laye…
samoht9277 Oct 8, 2024
c15265c
Added docker_batcher_send_groth16_burst, and included it to the run a…
samoht9277 Oct 8, 2024
020ebf4
Add permissions to GITHUB_TOKEN built in token
klaus993 Oct 9, 2024
26dc67e
Remove sudo
klaus993 Oct 9, 2024
5d656ee
Add job post cleanup
klaus993 Oct 9, 2024
1838627
Send proofs batches in CI
klaus993 Oct 9, 2024
bbb8298
Verify all sent proofs in CI
klaus993 Oct 9, 2024
1da00ae
Add sleep after docker_up
klaus993 Oct 9, 2024
3a33c9c
Improve naming for the new github workflow
klaus993 Oct 9, 2024
8e1f221
Sleep for 2 minutes
klaus993 Oct 9, 2024
07dbaa3
Make post steps run always
klaus993 Oct 9, 2024
5612619
Add continue-on-error: true
klaus993 Oct 9, 2024
75262f6
Increase wait
klaus993 Oct 9, 2024
3546241
Decrease wait
klaus993 Oct 9, 2024
9d512b8
Rename workflow
klaus993 Oct 9, 2024
ae37b91
Test docker build
klaus993 Oct 9, 2024
daecbac
Parametrize repository name, image to push and branch
klaus993 Oct 10, 2024
66ae8d2
Fix runs-on
klaus993 Oct 10, 2024
2a75a3b
Use staging in FROM
klaus993 Oct 10, 2024
74bd6ff
XXX: Build aligned_base testnet
klaus993 Oct 10, 2024
3ecc375
Swap back to ubuntu-latest
klaus993 Oct 10, 2024
9892398
Added fix to docker build.
samoht9277 Oct 10, 2024
8d24d49
Added `.` to command.
samoht9277 Oct 10, 2024
ad1f7a2
Added `ls` and `pwd` to debug error.
samoht9277 Oct 10, 2024
dc4247e
Revert "XXX: Build aligned_base testnet"
klaus993 Oct 10, 2024
65cc946
Add docker build to CI
klaus993 Oct 10, 2024
398d86b
Change tag to latest
klaus993 Oct 10, 2024
dbf3bd9
Fix runs-on for cleanup
klaus993 Oct 10, 2024
7601527
Clone with submodules outside of docker
klaus993 Oct 10, 2024
3ec413b
Remove timeout-minutes
klaus993 Oct 10, 2024
8dbbc20
Add .github folder to .dockerignore
klaus993 Oct 10, 2024
559e935
Remove unused docker build
klaus993 Oct 10, 2024
68bc379
Reduce repetitions
klaus993 Oct 10, 2024
f391bec
Changed docker pull repo URL where images are located.
samoht9277 Oct 10, 2024
3b3d3ee
Added Makefile to docker.
samoht9277 Oct 10, 2024
abdca92
Fixed bug in COPY instruction.
samoht9277 Oct 10, 2024
5153f73
Added batcher/aligned-sdk into docker.
samoht9277 Oct 10, 2024
1d91338
Replaced lambdaclass with yetanotherco.
samoht9277 Oct 10, 2024
c9c0a6f
Added go lock files.
samoht9277 Oct 10, 2024
2ee0a7d
Added required dependencies on operator dockerfile.
samoht9277 Oct 10, 2024
23df617
Added more required dependencies on operator dockerfile.
samoht9277 Oct 10, 2024
71812b6
Added go.mod and go.sum to batcher in docker.
samoht9277 Oct 10, 2024
8f86e38
Copy batcher and go files
klaus993 Oct 10, 2024
cefd3a6
Copy infinite script to batcher docker image
klaus993 Oct 10, 2024
c23409a
Added aggregator directory in docker.
samoht9277 Oct 10, 2024
0e5330d
Added core and metrics directory in docker.
samoht9277 Oct 10, 2024
f08ee46
Add aggregator build to docker_build target
klaus993 Oct 10, 2024
92b4c63
Added bindings to dockerfile.
samoht9277 Oct 10, 2024
badcd30
Removed COPY from builder.
samoht9277 Oct 10, 2024
8dbccbd
Added yaml.
samoht9277 Oct 10, 2024
a584330
Added output directory.
samoht9277 Oct 10, 2024
bdf14dd
Added contracts directory.
samoht9277 Oct 10, 2024
997d462
Added script directory.
samoht9277 Oct 10, 2024
5f2d171
Added anvil json file.
samoht9277 Oct 10, 2024
d8b6fa9
Added test_files directory.
samoht9277 Oct 10, 2024
8170233
Add pull request trigger and concurrency rules
klaus993 Oct 10, 2024
486285f
Merge branch 'staging' into docker-compose
klaus993 Oct 10, 2024
f320c66
Add BATCHER_PAYMENTS_CONTRACT_ADDRESS
klaus993 Oct 10, 2024
d0c0cb5
Remove deprecated flag
klaus993 Oct 11, 2024
dc7af86
Remove unnecessary env var
klaus993 Oct 11, 2024
c52dc2c
Remove commented configurations
klaus993 Oct 14, 2024
7a3a2e0
Fix actions/checkout version
klaus993 Oct 14, 2024
fedb51f
Add GOARCH to aligned_base image
klaus993 Oct 14, 2024
703f852
Add Makefile target to build base image
klaus993 Oct 14, 2024
ca66532
Add needed parameter
klaus993 Oct 14, 2024
5d8433f
Remove GOARCH env var usage from operator
klaus993 Oct 14, 2024
4c5563b
Added golang support for local machine architecture.
samoht9277 Oct 14, 2024
c30ed61
Remove GO env vars from batcher
klaus993 Oct 14, 2024
6c43f92
Remove GOARCH from aligned_base and from Makefile
klaus993 Oct 14, 2024
d624fdc
Remove unnecessary cargo install
klaus993 Oct 14, 2024
00c4a2c
Add more files to .dockerignore
klaus993 Oct 15, 2024
c8d8d13
Add private key to send bursts to pay for the transactions
klaus993 Oct 15, 2024
96cb5b6
Revert some dockerignore changes
klaus993 Oct 15, 2024
545d266
Add env var to fix potential cargo problem
klaus993 Oct 15, 2024
d6101f2
Revert "Revert some dockerignore changes"
klaus993 Oct 15, 2024
ec5de95
Revert "Add more files to .dockerignore"
klaus993 Oct 15, 2024
f0f35c3
Add mandatory parameter
klaus993 Oct 16, 2024
d99244b
Merge branch 'staging', remote-tracking branch 'origin' into docker-c…
klaus993 Oct 16, 2024
ed02c16
Fix edge case when no proofs are saved into ./aligned_verification_data
klaus993 Oct 17, 2024
b29038a
Merge branch 'staging' into docker-compose
klaus993 Oct 17, 2024
69ffbc2
Add gas price to fund-operator
klaus993 Oct 17, 2024
8ac85e0
Install rust nightly
klaus993 Oct 17, 2024
bf25455
Install stable version also
klaus993 Oct 17, 2024
e6ce928
Try with --no-self-update flag
klaus993 Oct 17, 2024
2f40606
Use rust as base image and install nightly
klaus993 Oct 17, 2024
2b01a92
Merge remote-tracking branch 'origin/staging' into docker-compose
klaus993 Oct 18, 2024
436d505
Add logic to check if all proofs were sent
klaus993 Oct 18, 2024
d09adcc
Merge remote-tracking branch 'origin/staging' into docker-compose
klaus993 Oct 21, 2024
8c4ca3b
Remove unnecessary --batcher_url flag
klaus993 Oct 21, 2024
9f6f61e
Remove unnecessary sleep
klaus993 Oct 21, 2024
7b835f9
Decrease sleep
klaus993 Oct 21, 2024
8723566
Add new aggregator configs
klaus993 Oct 21, 2024
f3a95b9
Add sleep
klaus993 Oct 21, 2024
f03da27
Parametrize sleep time for proofs
klaus993 Oct 21, 2024
1e9fe91
Add md files to dockerignore
klaus993 Oct 21, 2024
11cba23
Merge remote-tracking branch 'origin/staging' into docker-compose
klaus993 Oct 21, 2024
58bb6a9
Add gas price to all cast commands
klaus993 Oct 22, 2024
1a923cb
Add quotes to smart contract function call
klaus993 Oct 22, 2024
ccaa310
Fix race condition for cleanup steps
klaus993 Oct 22, 2024
e54f4dc
Update README.md
klaus993 Oct 22, 2024
3dde0dc
Add paths ignore for md files
klaus993 Oct 22, 2024
a729c81
Fix docker_verify_proofs_onchain
klaus993 Oct 22, 2024
d22965b
Add docker_verify_proofs_onchain to readme
klaus993 Oct 22, 2024
8a45ac2
Remove confusing target from readme
klaus993 Oct 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
docker/*
**/.DS_Store
**/.idea
out
cache
**/build
**/target
**/aligned_verification_data
**/broadcast
volume
nonce_*.bin
docker-compose.yaml
.github/**
**.md
59 changes: 59 additions & 0 deletions .github/workflows/send-proofs-docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "[CI] Send proofs to network"

on:
pull_request:
types: [opened, synchronize]

concurrency:
group: pull_request-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
network-test-docker-compose:
name: "Test network with Docker Compose"
runs-on: aligned-runner-ci
permissions:
contents: read
packages: write
pull-requests: write

steps:
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

- name: Build containers
run: make docker_build

- name: Start containers and initialize network
run: make docker_up && sleep 15

- name: Send proofs batches
run: make docker_batcher_send_all_proofs_burst

- name: Verify all sent proofs
run: make docker_verify_proof_submission_success

post-cleanup:
name: "Cleanup"
runs-on: aligned-runner-ci
if: ${{ always() }}
needs: network-test-docker-compose

steps:
- name: Stop containers
continue-on-error: true
if: always()
run: make docker_down

- name: Delete _work
if: always()
run: sudo rm -rf /home/admin/actions-runner/_work/aligned_layer/
218 changes: 218 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,224 @@ tracker_dump_db:
docker exec -t tracker-postgres-container pg_dumpall -c -U tracker_user > dump.$$(date +\%Y\%m\%d_\%H\%M\%S).sql
@echo "Dumped database successfully to /operator_tracker"

DOCKER_RPC_URL=http://anvil:8545
PROOF_GENERATOR_ADDRESS=0x66f9664f97F2b50F62D13eA064982f936dE76657

docker_build_base_image:
docker compose -f docker-compose.yaml --profile aligned_base build

docker_build_aggregator:
docker compose -f docker-compose.yaml --profile aggregator build

docker_build_operator:
docker compose -f docker-compose.yaml --profile operator build

docker_build_batcher:
docker compose -f docker-compose.yaml --profile batcher build

docker_restart_aggregator:
docker compose -f docker-compose.yaml --profile aggregator down
docker compose -f docker-compose.yaml --profile aggregator up -d --remove-orphans --force-recreate

docker_restart_operator:
docker compose -f docker-compose.yaml --profile operator down
docker compose -f docker-compose.yaml --profile operator up -d --remove-orphans --force-recreate

docker_restart_batcher:
docker compose -f docker-compose.yaml --profile batcher down
docker compose -f docker-compose.yaml --profile batcher up -d --remove-orphans --force-recreate

docker_build:
docker compose -f docker-compose.yaml --profile aligned_base build
docker compose -f docker-compose.yaml --profile eigenlayer-cli build
docker compose -f docker-compose.yaml --profile foundry build
docker compose -f docker-compose.yaml --profile base build
docker compose -f docker-compose.yaml --profile operator build
docker compose -f docker-compose.yaml --profile batcher build
docker compose -f docker-compose.yaml --profile aggregator build

docker_up:
klaus993 marked this conversation as resolved.
Show resolved Hide resolved
docker compose -f docker-compose.yaml --profile base up -d --remove-orphans --force-recreate
@until [ "$$(docker inspect $$(docker ps | grep anvil | awk '{print $$1}') | jq -r '.[0].State.Health.Status')" = "healthy" ]; do sleep .5; done; sleep 2
docker compose -f docker-compose.yaml --profile aggregator up -d --remove-orphans --force-recreate
docker compose -f docker-compose.yaml run --rm fund-operator
docker compose -f docker-compose.yaml run --rm register-operator-eigenlayer
docker compose -f docker-compose.yaml run --rm mint-mock-tokens
docker compose -f docker-compose.yaml run --rm operator-deposit-into-mock-strategy
docker compose -f docker-compose.yaml run --rm operator-whitelist-devnet
docker compose -f docker-compose.yaml run --rm operator-register-with-aligned-layer
docker compose -f docker-compose.yaml --profile operator up -d --remove-orphans --force-recreate
docker compose -f docker-compose.yaml run --rm user-fund-payment-service-devnet
docker compose -f docker-compose.yaml --profile batcher up -d --remove-orphans --force-recreate
@echo "Up and running"

docker_down:
docker compose -f docker-compose.yaml --profile batcher down
docker compose -f docker-compose.yaml --profile operator down
docker compose -f docker-compose.yaml --profile base down
@echo "Everything down"
docker ps

DOCKER_BURST_SIZE=2
DOCKER_PROOFS_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80

docker_batcher_send_sp1_burst:
@echo "Sending SP1 fibonacci task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system SP1 \
--proof ./scripts/test_files/sp1/sp1_fibonacci.proof \
--vm_program ./scripts/test_files/sp1/sp1_fibonacci.elf \
--repetitions $(DOCKER_BURST_SIZE) \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL)

docker_batcher_send_risc0_burst:
@echo "Sending Risc0 fibonacci task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system Risc0 \
--proof ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.proof \
--vm_program ./scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id.bin \
--public_input ./scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci.pub \
--repetitions $(DOCKER_BURST_SIZE) \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL)

docker_batcher_send_plonk_bn254_burst:
@echo "Sending Groth16Bn254 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system GnarkPlonkBn254 \
--proof ./scripts/test_files/gnark_plonk_bn254_script/plonk.proof \
--public_input ./scripts/test_files/gnark_plonk_bn254_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--rpc_url $(DOCKER_RPC_URL) \
--repetitions $(DOCKER_BURST_SIZE)

docker_batcher_send_plonk_bls12_381_burst:
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system GnarkPlonkBls12_381 \
--proof ./scripts/test_files/gnark_plonk_bls12_381_script/plonk.proof \
--public_input ./scripts/test_files/gnark_plonk_bls12_381_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_plonk_bls12_381_script/plonk.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--repetitions $(DOCKER_BURST_SIZE) \
--rpc_url $(DOCKER_RPC_URL)

docker_batcher_send_groth16_burst:
@echo "Sending Groth16 BLS12-381 1!=0 task to Batcher..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
--proving_system Groth16Bn254 \
--proof ./scripts/test_files/gnark_groth16_bn254_script/groth16.proof \
--public_input ./scripts/test_files/gnark_groth16_bn254_script/plonk_pub_input.pub \
--vk ./scripts/test_files/gnark_groth16_bn254_script/groth16.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
--repetitions $(DOCKER_BURST_SIZE) \
--rpc_url $(DOCKER_RPC_URL)

# Update target as new proofs are supported.
docker_batcher_send_all_proofs_burst:
@$(MAKE) docker_batcher_send_sp1_burst
@$(MAKE) docker_batcher_send_risc0_burst
@$(MAKE) docker_batcher_send_plonk_bn254_burst
@$(MAKE) docker_batcher_send_plonk_bls12_381_burst
@$(MAKE) docker_batcher_send_groth16_burst

docker_batcher_send_infinite_groth16:
uri-99 marked this conversation as resolved.
Show resolved Hide resolved
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
sh -c ' \
mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs; \
counter=1; \
timer=3; \
while true; do \
echo "Generating proof $${counter} != 0"; \
gnark_groth16_bn254_infinite_script $${counter}; \
aligned submit \
--rpc_url $(DOCKER_RPC_URL) \
--repetitions $(DOCKER_BURST_SIZE) \
--proving_system Groth16Bn254 \
--proof scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.proof \
--public_input scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.pub \
--vk scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs/ineq_$${counter}_groth16.vk \
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS); \
sleep $${timer}; \
counter=$$((counter + 1)); \
done \
'

docker_verify_proofs_onchain:
@echo "Verifying proofs..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
sh -c ' \
for proof in ./aligned_verification_data/*; do \
echo "Verifying $${proof}"; \
aligned verify-proof-onchain \
--aligned-verification-data $${proof} \
--rpc_url $(DOCKER_RPC_URL); \
done \
'

DOCKER_PROOFS_WAIT_TIME=30

docker_verify_proof_submission_success:
@echo "Verifying proofs were successfully submitted..."
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
sh -c ' \
klaus993 marked this conversation as resolved.
Show resolved Hide resolved
if [ -z "$$(ls -A ./aligned_verification_data)" ]; then echo "ERROR: There are no proofs on aligned_verification_data/ directory" && exit 1; fi; \
echo "Waiting $(DOCKER_PROOFS_WAIT_TIME) seconds before starting proof verification. \n"; \
sleep $(DOCKER_PROOFS_WAIT_TIME); \
for proof in ./aligned_verification_data/*.cbor; do \
echo "Verifying proof $${proof} \n"; \
verification=$$(aligned verify-proof-onchain \
--aligned-verification-data $${proof} \
--rpc_url $$(echo $(DOCKER_RPC_URL)) 2>&1); \
if echo "$$verification" | grep -q not; then \
echo "ERROR: Proof verification failed for $${proof}"; \
exit 1; \
elif echo "$$verification" | grep -q verified; then \
echo "Proof verification succeeded for $${proof}"; \
fi; \
echo "---------------------------------------------------------------------------------------------------"; \
done; \
if [ $$(ls -1 ./aligned_verification_data/*.cbor | wc -l) -ne 10 ]; then \
echo "ERROR: Some proofs were verified successfully, but some proofs are missing in the aligned_verification_data/ directory"; \
exit 1; \
fi; \
echo "All proofs verified successfully!"; \
'

docker_attach_foundry:
docker exec -ti $(shell docker ps | grep anvil | awk '{print $$1}') /bin/bash

docker_attach_anvil:
docker exec -ti $(shell docker ps | grep anvil | awk '{print $$1}') /bin/bash

docker_attach_aggregator:
docker exec -ti $(shell docker ps | grep aggregator | awk '{print $$1}') /bin/bash

docker_attach_operator:
docker exec -ti $(shell docker ps | grep operator | awk '{print $$1}') /bin/bash

docker_attach_batcher:
docker exec -ti $(shell docker ps | grep batcher | awk '{print $$1}') /bin/bash

docker_logs_anvil:
docker compose -f docker-compose.yaml logs anvil -f

docker_logs_aggregator:
docker compose -f docker-compose.yaml logs aggregator -f

docker_logs_operator:
docker compose -f docker-compose.yaml logs operator -f

docker_logs_batcher:
docker compose -f docker-compose.yaml logs batcher -f

__TELEMETRY__:
# Collector, Jaeger and Elixir API
telemetry_full_start: open_telemetry_start telemetry_start
Expand Down
13 changes: 0 additions & 13 deletions anvil.Dockerfile

This file was deleted.

8 changes: 8 additions & 0 deletions batcher/aligned-batcher/.env.docker
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
AWS_SECRET_ACCESS_KEY=test
AWS_REGION=us-east-2
AWS_ACCESS_KEY_ID=test
AWS_BUCKET_NAME=aligned.storage
UPLOAD_ENDPOINT=http://localstack:4566
DOWNLOAD_ENDPOINT=http://localstack:4566/aligned.storage
RUST_LOG=info
RUST_BACKTRACE=1
8 changes: 0 additions & 8 deletions compose.yaml

This file was deleted.

32 changes: 32 additions & 0 deletions config-files/config-aggregator-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Common variables for all the services
# 'production' only prints info and above. 'development' also prints debug
environment: "production"
aligned_layer_deployment_config_file_path: "./contracts/script/output/devnet/alignedlayer_deployment_output.json"
eigen_layer_deployment_config_file_path: "./contracts/script/output/devnet/eigenlayer_deployment_output.json"
eth_rpc_url: "http://anvil:8545"
eth_rpc_url_fallback: "http://anvil:8545"
eth_ws_url: "ws://anvil:8545"
eth_ws_url_fallback: "ws://anvil:8545"
eigen_metrics_ip_port_address: "localhost:9090"

## ECDSA Configurations
ecdsa:
private_key_store_path: "config-files/anvil.aggregator.ecdsa.key.json"
private_key_store_password: ""

## BLS Configurations
bls:
private_key_store_path: "config-files/anvil.aggregator.bls.key.json"
private_key_store_password: ""

## Aggregator Configurations
aggregator:
server_ip_port_address: 0.0.0.0:8090
bls_public_key_compendium_address: 0x322813Fd9A801c5507c9de605d63CEA4f2CE6c44
avs_service_manager_address: 0xc3e53F4d16Ae77Db1c982e75a937B9f60FE63690
enable_metrics: true
metrics_ip_port_address: 0.0.0.0:9091
telemetry_ip_port_address: localhost:4001
garbage_collector_period: 2m #The period of the GC process. Suggested value for Prod: '168h' (7 days)
garbage_collector_tasks_age: 20 #The age of tasks that will be removed by the GC, in blocks. Suggested value for prod: '216000' (30 days)
garbage_collector_tasks_interval: 10 #The interval of queried blocks to get an old batch. Suggested value for prod: '900' (3 hours)
28 changes: 28 additions & 0 deletions config-files/config-batcher-docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Common variables for all the services
# 'production' only prints info and above. 'development' also prints debug
environment: "production"
aligned_layer_deployment_config_file_path: "./contracts/script/output/devnet/alignedlayer_deployment_output.json"
eigen_layer_deployment_config_file_path: "./contracts/script/output/devnet/eigenlayer_deployment_output.json"
eth_rpc_url: "http://anvil:8545"
eth_rpc_url_fallback: "http://anvil:8545"
eth_ws_url: "ws://anvil:8545"
eth_ws_url_fallback: "ws://anvil:8545"
eigen_metrics_ip_port_address: "localhost:9090"

## ECDSA Configurations
ecdsa:
private_key_store_path: "config-files/anvil.batcher.ecdsa.key.json"
private_key_store_password: ""

## Batcher configurations
batcher:
block_interval: 3
batch_size_interval: 10
max_proof_size: 67108864 # 64 MiB
max_batch_size: 268435456 # 256 MiB
eth_ws_reconnects: 99999999999999
pre_verification_is_enabled: true
metrics_port: 9093
non_paying:
address: 0xa0Ee7A142d267C1f36714E4a8F75612F20a79720 # Anvil address 9
replacement_private_key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 # Anvil address 1
Loading
Loading