Skip to content

Commit 57f12a7

Browse files
authored
Merge branch 'staging' into telemetry_ansible
2 parents cfb1b95 + 5a24c5e commit 57f12a7

File tree

154 files changed

+4763
-7367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+4763
-7367
lines changed

.github/workflows/test-go-retries.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Makefile

Lines changed: 43 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ OS := $(shell uname -s)
66
CONFIG_FILE?=config-files/config.yaml
77
AGG_CONFIG_FILE?=config-files/config-aggregator.yaml
88

9-
OPERATOR_VERSION=v0.10.3
9+
OPERATOR_VERSION=v0.12.0
1010

1111
ifeq ($(OS),Linux)
1212
BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -117,6 +117,7 @@ unpause_batcher_payment_service:
117117
get_paused_state_batcher_payments_service:
118118
@echo "Getting paused state of Batcher Payments Service contract..."
119119
. contracts/scripts/get_paused_state_batcher_payments_service.sh
120+
120121
anvil_upgrade_initialize_disable_verifiers:
121122
@echo "Initializing disabled verifiers..."
122123
. contracts/scripts/anvil/upgrade_disabled_verifiers_in_service_manager.sh
@@ -229,19 +230,21 @@ operator_mint_mock_tokens:
229230

230231
operator_whitelist_devnet:
231232
@echo "Whitelisting operator"
232-
$(eval OPERATOR_ADDRESS = $(shell yq -r '.operator.address' $(CONFIG_FILE)))
233233
@echo "Operator address: $(OPERATOR_ADDRESS)"
234-
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS)
234+
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
235235

236-
operator_remove_devnet:
236+
operator_remove_from_whitelist_devnet:
237237
@echo "Removing operator"
238-
$(eval OPERATOR_ADDRESS = $(shell yq -r '.operator.address' $(CONFIG_FILE)))
239238
@echo "Operator address: $(OPERATOR_ADDRESS)"
240-
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/remove_operator.sh $(OPERATOR_ADDRESS)
239+
RPC_URL="http://localhost:8545" PRIVATE_KEY="0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80" OUTPUT_PATH=./script/output/devnet/alignedlayer_deployment_output.json ./contracts/scripts/operator_remove_from_whitelist.sh $(OPERATOR_ADDRESS)
241240

242241
operator_whitelist:
243242
@echo "Whitelisting operator $(OPERATOR_ADDRESS)"
244-
@. contracts/scripts/.env && . contracts/scripts/whitelist_operator.sh $(OPERATOR_ADDRESS)
243+
@. contracts/scripts/.env && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
244+
245+
operator_remove_from_whitelist:
246+
@echo "Removing operator $(OPERATOR_ADDRESS)"
247+
@. contracts/scripts/.env && . contracts/scripts/operator_remove_from_whitelist.sh $(OPERATOR_ADDRESS)
245248

246249
operator_deposit_into_mock_strategy:
247250
@echo "Depositing into mock strategy"
@@ -410,7 +413,7 @@ batcher_send_plonk_bn254_burst: batcher/target/release/aligned
410413
--vk ../../scripts/test_files/gnark_plonk_bn254_script/plonk.vk \
411414
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
412415
--rpc_url $(RPC_URL) \
413-
--repetitions 4 \
416+
--repetitions $(BURST_SIZE) \
414417
--network $(NETWORK)
415418

416419
batcher_send_plonk_bls12_381_task: batcher/target/release/aligned
@@ -563,18 +566,18 @@ run_storage: ## Run storage using storage-docker-compose.yaml
563566
@echo "Running storage..."
564567
@docker compose -f storage-docker-compose.yaml up
565568

566-
__DEPLOYMENT__:
567-
deploy_aligned_contracts: ## Deploy Aligned Contracts
568-
@echo "Deploying Aligned Contracts..."
569-
@. contracts/scripts/.env && . contracts/scripts/deploy_aligned_contracts.sh
569+
__DEPLOYMENT__: ## ____
570+
deploy_aligned_contracts: ## Deploy Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
571+
@echo "Deploying Aligned Contracts on $(NETWORK) network..."
572+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh
570573

571574
deploy_pauser_registry: ## Deploy Pauser Registry
572575
@echo "Deploying Pauser Registry..."
573576
@. contracts/scripts/.env && . contracts/scripts/deploy_pauser_registry.sh
574577

575-
upgrade_aligned_contracts: ## Upgrade Aligned Contracts
576-
@echo "Upgrading Aligned Contracts..."
577-
@. contracts/scripts/.env && . contracts/scripts/upgrade_aligned_contracts.sh
578+
upgrade_aligned_contracts: ## Upgrade Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
579+
@echo "Upgrading Aligned Contracts on $(NETWORK) network..."
580+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_aligned_contracts.sh
578581

579582
upgrade_pauser_aligned_contracts: ## Upgrade Aligned Contracts with Pauser initialization
580583
@echo "Upgrading Aligned Contracts with Pauser initialization..."
@@ -608,13 +611,13 @@ deploy_verify_batch_inclusion_caller:
608611
@echo "Deploying VerifyBatchInclusionCaller contract..."
609612
@. examples/verify/.env && . examples/verify/scripts/deploy_verify_batch_inclusion_caller.sh
610613

611-
deploy_batcher_payment_service:
612-
@echo "Deploying BatcherPayments contract..."
613-
@. contracts/scripts/.env && . contracts/scripts/deploy_batcher_payment_service.sh
614+
deploy_batcher_payment_service: ## Deploy BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia>
615+
@echo "Deploying BatcherPayments contract on $(NETWORK) network..."
616+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_batcher_payment_service.sh
614617

615-
upgrade_batcher_payment_service:
616-
@echo "Upgrading BatcherPayments contract..."
617-
@. contracts/scripts/.env && . contracts/scripts/upgrade_batcher_payment_service.sh
618+
upgrade_batcher_payment_service: ## Upgrade BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia
619+
@echo "Upgrading BatcherPayments Contract on $(NETWORK) network..."
620+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_batcher_payment_service.sh
618621

619622
build_aligned_contracts:
620623
@cd contracts/src/core && forge build
@@ -844,35 +847,6 @@ explorer_create_env:
844847
@cd explorer && \
845848
cp .env.dev .env
846849

847-
__TRACKER__:
848-
849-
tracker_devnet_start: tracker_run_db
850-
@cd operator_tracker/ && \
851-
cargo run -r -- --env-file .env.dev
852-
853-
tracker_install: tracker_build_db
854-
cargo install --path ./operator_tracker
855-
856-
tracker_build_db:
857-
@cd operator_tracker && \
858-
docker build -t tracker-postgres-image .
859-
860-
tracker_run_db: tracker_build_db tracker_remove_db_container
861-
@cd operator_tracker && \
862-
docker run -d --name tracker-postgres-container -p 5433:5432 -v tracker-postgres-data:/var/lib/postgresql/data tracker-postgres-image
863-
864-
tracker_remove_db_container:
865-
docker stop tracker-postgres-container || true && \
866-
docker rm tracker-postgres-container || true
867-
868-
tracker_clean_db: tracker_remove_db_container
869-
docker volume rm tracker-postgres-data || true
870-
871-
tracker_dump_db:
872-
@cd operator_tracker && \
873-
docker exec -t tracker-postgres-container pg_dumpall -c -U tracker_user > dump.$$(date +\%Y\%m\%d_\%H\%M\%S).sql
874-
@echo "Dumped database successfully to /operator_tracker"
875-
876850
DOCKER_RPC_URL=http://anvil:8545
877851
PROOF_GENERATOR_ADDRESS=0x66f9664f97F2b50F62D13eA064982f936dE76657
878852

@@ -1093,7 +1067,7 @@ docker_logs_batcher:
10931067

10941068
__TELEMETRY__:
10951069
# Collector, Jaeger and Elixir API
1096-
telemetry_full_start: open_telemetry_start telemetry_start
1070+
telemetry_full_start: telemetry_compile_bls_verifier open_telemetry_start telemetry_start
10971071

10981072
# Collector and Jaeger
10991073
open_telemetry_start: ## Run open telemetry services using telemetry-docker-compose.yaml
@@ -1137,6 +1111,10 @@ telemetry_create_env:
11371111
@cd telemetry_api && \
11381112
cp .env.dev .env
11391113

1114+
telemetry_compile_bls_verifier:
1115+
@cd telemetry_api/priv && \
1116+
go build ../bls_verifier/bls_verify.go
1117+
11401118
setup_local_aligned_all:
11411119
tmux kill-session -t aligned_layer || true
11421120
tmux new-session -d -s aligned_layer
@@ -1177,6 +1155,20 @@ ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY, KEYSTORE
11771155
-i $(INVENTORY) \
11781156
-e "keystore_path=$(KEYSTORE)"
11791157

1158+
ansible_aggregator_create_env: ## Create empty variables files for the Aggregator deploy
1159+
@cp -n infra/ansible/playbooks/ini/config-aggregator.ini.example infra/ansible/playbooks/ini/config-aggregator.ini
1160+
@echo "Config files for the Aggregator created in infra/ansible/playbooks/ini"
1161+
@echo "Please complete the values and run make ansible_aggregator_deploy"
1162+
1163+
ansible_aggregator_deploy: ## Deploy the Operator. Parameters: INVENTORY
1164+
@if [ -z "$(INVENTORY)" ] || [ -z "$(ECDSA_KEYSTORE)" ] || [ -z "$(BLS_KEYSTORE)" ]; then \
1165+
echo "Error: INVENTORY, ECDSA_KEYSTORE, BLS_KEYSTORE must be set."; \
1166+
exit 1; \
1167+
fi
1168+
@ansible-playbook infra/ansible/playbooks/aggregator.yaml \
1169+
-i $(INVENTORY) \
1170+
-e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \
1171+
-e "bls_keystore_path=$(BLS_KEYSTORE)"
11801172

11811173
ansible_operator_create_env: ## Create empty variables files for the Operator deploy
11821174
@cp -n infra/ansible/playbooks/ini/config-operator.ini.example infra/ansible/playbooks/ini/config-operator.ini

0 commit comments

Comments
 (0)