Skip to content

Commit e20ac9b

Browse files
committed
Remove unused v2 functions
2 parents dd9a0d0 + 4ba8efb commit e20ac9b

File tree

133 files changed

+8666
-835
lines changed

Some content is hidden

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

133 files changed

+8666
-835
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,6 @@
4343
[submodule "examples/l2/contracts/lib/forge-std"]
4444
path = examples/l2/contracts/lib/forge-std
4545
url = https://github.com/foundry-rs/forge-std
46+
[submodule "examples/circom/contracts/lib/forge-std"]
47+
path = examples/circom/contracts/lib/forge-std
48+
url = https://github.com/foundry-rs/forge-std

Makefile

Lines changed: 61 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,8 @@ operator_remove_from_whitelist_devnet:
437437
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)
438438

439439
operator_whitelist:
440-
@echo "Whitelisting operator $(OPERATOR_ADDRESS)"
441-
@. contracts/scripts/.env && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
440+
@echo "Whitelisting operator $(OPERATOR_ADDRESS) on $(NETWORK)"
441+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS)
442442

443443
operator_remove_from_whitelist:
444444
@echo "Removing operator $(OPERATOR_ADDRESS)"
@@ -681,6 +681,30 @@ batcher_send_circom_groth16_bn256_burst: crates/target/release/aligned ## Send a
681681
--rpc_url $(RPC_URL) \
682682
--network $(NETWORK)
683683

684+
batcher_send_circom_groth16_bn256_burst: crates/target/release/aligned ## Send a burst of Circom Groth16 BN256 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
685+
@echo "Sending Circom Groth16 BN256 proof to Batcher..."
686+
@cd crates/cli/ && cargo run --release -- submit \
687+
--proving_system CircomGroth16Bn256 \
688+
--proof ../../scripts/test_files/circom_groth16_bn256_script/proof.json \
689+
--public_input ../../scripts/test_files/circom_groth16_bn256_script/public.json \
690+
--vk ../../scripts/test_files/circom_groth16_bn256_script/verification_key.json \
691+
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
692+
--repetitions $(BURST_SIZE) \
693+
--rpc_url $(RPC_URL) \
694+
--network $(NETWORK)
695+
696+
batcher_send_circom_groth16_bn256_no_pub_input_burst: crates/target/release/aligned ## Send a burst of Circom Groth16 BN256 proofs to Batcher. Parameters: RPC_URL, NETWORK, BURST_SIZE
697+
@echo "Sending Circom Groth16 BN256 proof to Batcher..."
698+
@cd crates/cli/ && cargo run --release -- submit \
699+
--proving_system CircomGroth16Bn256 \
700+
--proof ../../scripts/test_files/circom_groth16_bn256_no_pub_input_script/proof.json \
701+
--public_input ../../scripts/test_files/circom_groth16_bn256_no_pub_input_script/public.json \
702+
--vk ../../scripts/test_files/circom_groth16_bn256_no_pub_input_script/verification_key.json \
703+
--proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
704+
--repetitions $(BURST_SIZE) \
705+
--rpc_url $(RPC_URL) \
706+
--network $(NETWORK)
707+
684708
batcher_send_proof_with_random_address: ## Send a proof with a random address to Batcher. Parameters: RPC_URL, NETWORK, PROOF_TYPE, REPETITIONS
685709
@cd crates/cli/ && ./send_proof_with_random_address.sh
686710

@@ -802,10 +826,18 @@ generate_circom_groth16_bn256_setup: ## Run the circom_groth16_bn256_script setu
802826
@echo "Running circom_groth16_bn256 script setup..."
803827
@cd scripts/test_files/circom_groth16_bn256_script && ./generate_setup.sh
804828

829+
generate_circom_groth16_bn256_no_pub_input_proof: ## Run the circom_groth16_bn256_script
830+
@echo "Running circom_groth16_bn256 script..."
831+
@cd scripts/test_files/circom_groth16_bn256_no_pub_input_script && ./generate_proof.sh
832+
833+
generate_circom_groth16_bn256_no_pub_input_setup: ## Run the circom_groth16_bn256_script setup
834+
@echo "Running circom_groth16_bn256_no_pub_input_script setup..."
835+
@cd scripts/test_files/circom_groth16_bn256_no_pub_input_script && ./generate_setup.sh
836+
805837
__CONTRACTS_DEPLOYMENT__: ## ____
806838
deploy_aligned_contracts: ## Deploy Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
807839
@echo "Deploying Aligned Contracts on $(NETWORK) network..."
808-
@. co ntracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh
840+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh
809841

810842
deploy_pauser_registry: ## Deploy Pauser Registry
811843
@echo "Deploying Pauser Registry..."
@@ -1150,6 +1182,19 @@ docker_batcher_send_circom_groth16_bn256_burst:
11501182
--rpc_url $(DOCKER_RPC_URL) \
11511183
--max_fee 0.1ether
11521184

1185+
docker_batcher_send_circom_groth16_bn256_no_pub_input_burst:
1186+
@echo "Sending Circom Groth16 BN256 task to Batcher..."
1187+
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1188+
--private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1189+
--proving_system CircomGroth16Bn256 \
1190+
--proof ./scripts/test_files/circom_groth16_bn256_no_pub_input_script/proof.json \
1191+
--public_input ./scripts/test_files/circom_groth16_bn256_no_pub_input_script/public.json \
1192+
--vk ./scripts/test_files/circom_groth16_bn256_no_pub_input_script/verification_key.json \
1193+
--proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1194+
--repetitions $(DOCKER_BURST_SIZE) \
1195+
--rpc_url $(DOCKER_RPC_URL) \
1196+
--max_fee 0.1ether
1197+
11531198
# Update target as new proofs are supported.
11541199
docker_batcher_send_all_proofs_burst:
11551200
@$(MAKE) docker_batcher_send_sp1_burst
@@ -1158,6 +1203,7 @@ docker_batcher_send_all_proofs_burst:
11581203
@$(MAKE) docker_batcher_send_gnark_plonk_bls12_381_burst
11591204
@$(MAKE) docker_batcher_send_gnark_groth16_burst
11601205
@$(MAKE) docker_batcher_send_circom_groth16_bn256_burst
1206+
@$(MAKE) docker_batcher_send_circom_groth16_bn256_no_pub_input_burst
11611207

11621208
docker_batcher_send_infinite_groth16:
11631209
docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
@@ -1195,7 +1241,7 @@ docker_verify_proofs_onchain:
11951241
'
11961242

11971243
DOCKER_PROOFS_WAIT_TIME=60
1198-
DOCKER_SENT_PROOFS=6
1244+
DOCKER_SENT_PROOFS=7
11991245

12001246
docker_verify_proof_submission_success:
12011247
@echo "Verifying proofs were successfully submitted..."
@@ -1349,29 +1395,26 @@ ansible_batcher_create_env: ## Create empty variables files for the Batcher depl
13491395
@echo "Config files for the Batcher created in infra/ansible/playbooks/ini"
13501396
@echo "Please complete the values and run make ansible_batcher_deploy"
13511397

1352-
ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY, KEYSTORE
1353-
@if [ -z "$(INVENTORY)" ] || [ -z "$(KEYSTORE)" ]; then \
1354-
echo "Error: Both INVENTORY and KEYSTORE must be set."; \
1398+
ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY
1399+
@if [ -z "$(INVENTORY)" ]; then \
1400+
echo "Error: INVENTORY must be set."; \
13551401
exit 1; \
13561402
fi
13571403
@ansible-playbook infra/ansible/playbooks/batcher.yaml \
1358-
-i $(INVENTORY) \
1359-
-e "keystore_path=$(KEYSTORE)"
1404+
-i $(INVENTORY)
13601405

13611406
ansible_aggregator_create_env: ## Create empty variables files for the Aggregator deploy
13621407
@cp -n infra/ansible/playbooks/ini/config-aggregator.ini.example infra/ansible/playbooks/ini/config-aggregator.ini
13631408
@echo "Config files for the Aggregator created in infra/ansible/playbooks/ini"
13641409
@echo "Please complete the values and run make ansible_aggregator_deploy"
13651410

13661411
ansible_aggregator_deploy: ## Deploy the Operator. Parameters: INVENTORY
1367-
@if [ -z "$(INVENTORY)" ] || [ -z "$(ECDSA_KEYSTORE)" ] || [ -z "$(BLS_KEYSTORE)" ]; then \
1368-
echo "Error: INVENTORY, ECDSA_KEYSTORE, BLS_KEYSTORE must be set."; \
1412+
@if [ -z "$(INVENTORY)" ]; then \
1413+
echo "Error: INVENTORY must be set."; \
13691414
exit 1; \
13701415
fi
13711416
@ansible-playbook infra/ansible/playbooks/aggregator.yaml \
1372-
-i $(INVENTORY) \
1373-
-e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \
1374-
-e "bls_keystore_path=$(BLS_KEYSTORE)"
1417+
-i $(INVENTORY)
13751418

13761419
ansible_operator_create_env: ## Create empty variables files for the Operator deploy
13771420
@cp -n infra/ansible/playbooks/ini/config-operator.ini.example infra/ansible/playbooks/ini/config-operator.ini
@@ -1380,14 +1423,12 @@ ansible_operator_create_env: ## Create empty variables files for the Operator de
13801423
@echo "Please complete the values and run make ansible_operator_deploy"
13811424

13821425
ansible_operator_deploy: ## Deploy the Operator. Parameters: INVENTORY
1383-
@if [ -z "$(INVENTORY)" ] || [ -z "$(ECDSA_KEYSTORE)" ] || [ -z "$(BLS_KEYSTORE)" ]; then \
1384-
echo "Error: INVENTORY, ECDSA_KEYSTORE, BLS_KEYSTORE must be set."; \
1426+
@if [ -z "$(INVENTORY)" ]; then \
1427+
echo "Error: INVENTORY must be set."; \
13851428
exit 1; \
13861429
fi
13871430
@ansible-playbook infra/ansible/playbooks/operator.yaml \
1388-
-i $(INVENTORY) \
1389-
-e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \
1390-
-e "bls_keystore_path=$(BLS_KEYSTORE)"
1431+
-i $(INVENTORY)
13911432

13921433
ansible_explorer_deploy: ## Deploy the Explorer. Parameters: INVENTORY
13931434
@ansible-playbook infra/ansible/playbooks/explorer.yaml \
@@ -1405,7 +1446,7 @@ ansible_telemetry_deploy: ## Deploy the Telemetry. Parameters: INVENTORY
14051446
__ETHEREUM_PACKAGE__: ## ____
14061447

14071448
ethereum_package_start: ## Starts the ethereum_package environment
1408-
kurtosis run --enclave aligned github.com/ethpandaops/ethereum-package --args-file network_params.yaml
1449+
kurtosis run --enclave aligned github.com/ethpandaops/ethereum-package@5.0.1 --args-file network_params.yaml
14091450

14101451
ethereum_package_inspect: ## Prints detailed information about the net
14111452
kurtosis enclave inspect aligned

aggregator/pkg/subscriber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ func (agg *Aggregator) SubscribeToNewTasks() *chainio.ErrorPair {
2424
}
2525

2626
func (agg *Aggregator) subscribeToNewTasks() *chainio.ErrorPair {
27-
errorPair := agg.avsSubscriber.SubscribeToNewTasksV3(agg.NewBatchChan, agg.taskSubscriber)
27+
errorPair := agg.avsSubscriber.SubscribeToNewTasksV3(agg.NewBatchChan, agg.taskSubscriber, agg.AggregatorConfig.Aggregator.PollLatestBatchInterval)
2828

2929
if errorPair != nil {
3030
agg.AggregatorConfig.BaseConfig.Logger.Info("Failed to create task subscriber", "err", errorPair)

config-files/config-aggregator-docker.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,4 @@ aggregator:
3838
# The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value
3939
# If it is higher, it will default to `gas_bump_percentage_limit`
4040
time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks)
41+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-aggregator-ethereum-package.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ environment: "production"
44
aligned_layer_deployment_config_file_path: "./contracts/script/output/devnet/alignedlayer_deployment_output.json"
55
eigen_layer_deployment_config_file_path: "./contracts/script/output/devnet/eigenlayer_deployment_output.json"
66
eth_rpc_url: "http://localhost:8545"
7-
eth_rpc_url_fallback: "http://localhost:8552"
7+
eth_rpc_url_fallback: "http://localhost:8551"
88
eth_ws_url: "ws://localhost:8546"
9-
eth_ws_url_fallback: "ws://localhost:8553"
9+
eth_ws_url_fallback: "ws://localhost:8552"
1010
eigen_metrics_ip_port_address: "localhost:9090"
1111

1212
## ECDSA Configurations
@@ -34,3 +34,4 @@ aggregator:
3434
gas_base_bump_percentage: 10 # How much to bump gas price when responding to task. Suggested value 10%
3535
gas_bump_incremental_percentage: 2 # An extra percentage to bump every retry i*2 when responding to task. Suggested value 2%
3636
time_to_wait_before_bump: 36s # The time to wait for the receipt when responding to task. Suggested value 36 seconds (3 blocks)
37+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-aggregator.yaml

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,21 +45,4 @@ aggregator:
4545
# The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value
4646
# If it is higher, it will default to `gas_bump_percentage_limit`
4747
time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks)
48-
49-
## Operator Configurations
50-
# operator:
51-
# aggregator_rpc_server_ip_port_address: localhost:8090
52-
# address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
53-
# earnings_receiver_address: '0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266'
54-
# delegation_approver_address: "0x0000000000000000000000000000000000000000"
55-
# staker_opt_out_window_blocks: 0
56-
# metadata_url: "https://yetanotherco.github.io/operator_metadata/metadata.json"
57-
# enable_metrics: true
58-
# metrics_ip_port_address: localhost:9092
59-
# max_batch_size: 268435456 # 256 MiB
60-
# # Operators variables needed for register it in EigenLayer
61-
# el_delegation_manager_address: "0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9"
62-
# private_key_store_path: config-files/anvil.ecdsa.key.json
63-
# bls_private_key_store_path: config-files/anvil.bls.key.json
64-
# signer_type: local_keystore
65-
# chain_id: 31337
48+
poll_latest_batch_interval: 20s # The interval to poll for latest batches. Default: 20s

config-files/config-batcher-docker.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,10 @@ batcher:
3131
non_paying:
3232
address: '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720' # Anvil address 9
3333
replacement_private_key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 # Anvil address 1
34+
# When validating if the msg covers the minimum max fee
35+
# A batch of how many proofs should it cover
36+
amount_of_proofs_for_min_max_fee: 128
37+
# When replacing the message, how much higher should the max fee in comparison to the original one
38+
# The calculation is replacement_max_fee >= original_max_fee + original_max_fee * min_bump_percentage / 100
39+
min_bump_percentage: 10
40+

config-files/config-batcher-ethereum-package.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ environment: "production"
44
aligned_layer_deployment_config_file_path: "./contracts/script/output/devnet/alignedlayer_deployment_output.json"
55
eigen_layer_deployment_config_file_path: "./contracts/script/output/devnet/eigenlayer_deployment_output.json"
66
eth_rpc_url: "http://localhost:8545"
7-
eth_rpc_url_fallback: "http://localhost:8552"
7+
eth_rpc_url_fallback: "http://localhost:8551"
88
eth_ws_url: "ws://localhost:8546"
9-
eth_ws_url_fallback: "ws://localhost:8553"
9+
eth_ws_url_fallback: "ws://localhost:8552"
1010
eigen_metrics_ip_port_address: "localhost:9090"
1111

1212
## ECDSA Configurations
@@ -29,3 +29,10 @@ batcher:
2929
non_paying:
3030
address: '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720' # Anvil address 9
3131
replacement_private_key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 # Anvil address 1
32+
# When validating if the msg covers the minimum max fee
33+
# A batch of how many proofs should it cover
34+
amount_of_proofs_for_min_max_fee: 128
35+
# When replacing the message, how much higher should the max fee in comparison to the original one
36+
# The calculation is replacement_max_fee >= original_max_fee + original_max_fee * min_bump_percentage / 100
37+
min_bump_percentage: 10
38+

config-files/config-batcher.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ batcher:
3131
non_paying:
3232
address: '0xa0Ee7A142d267C1f36714E4a8F75612F20a79720' # Anvil address 9
3333
replacement_private_key: ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 # Anvil address 1
34+
# When validating if the msg covers the minimum max fee
35+
# A batch of how many proofs should it cover
36+
amount_of_proofs_for_min_max_fee: 128
37+
# When replacing the message, how much higher should the max fee in comparison to the original one
38+
# The calculation is replacement_max_fee >= original_max_fee + original_max_fee * min_bump_percentage / 100
39+
min_bump_percentage: 10

config-files/config-operator-1-ethereum-package.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
environment: 'development'
44
aligned_layer_deployment_config_file_path: './contracts/script/output/devnet/alignedlayer_deployment_output.json'
55
eigen_layer_deployment_config_file_path: './contracts/script/output/devnet/eigenlayer_deployment_output.json'
6-
eth_rpc_url: "http://localhost:8552"
7-
eth_rpc_url_fallback: "http://localhost:8559"
8-
eth_ws_url: "ws://localhost:8553"
9-
eth_ws_url_fallback: "ws://localhost:8560"
6+
eth_rpc_url: "http://localhost:8545"
7+
eth_rpc_url_fallback: "http://localhost:8551"
8+
eth_ws_url: "ws://localhost:8546"
9+
eth_ws_url_fallback: "ws://localhost:8552"
1010
eigen_metrics_ip_port_address: 'localhost:9090'
1111

1212
## ECDSA Configurations
@@ -32,6 +32,7 @@ operator:
3232
metrics_ip_port_address: localhost:9092
3333
max_batch_size: 268435456 # 256 MiB
3434
last_processed_batch_filepath: 'config-files/operator-1.last_processed_batch.json'
35+
poll_latest_batch_interval: 20s # Optional: The interval to poll for latest batches. Default: 20s if not specified
3536

3637
# Operators variables needed for register it in EigenLayer
3738
el_delegation_manager_address: '0xCf7Ed3AccA5a467e9e704C703E8D87F634fB0Fc9'

0 commit comments

Comments
 (0)