Skip to content

Commit 3e5fb2e

Browse files
authored
Merge 1c098b5 into ceb0517
2 parents ceb0517 + 1c098b5 commit 3e5fb2e

File tree

152 files changed

+31659
-12021
lines changed

Some content is hidden

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

152 files changed

+31659
-12021
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ config-files/*.last_processed_batch.json
1616
nonce_*.bin
1717

1818
infra/ansible/playbooks/ini/**.ini
19+
infra/ansible/playbooks/files/**.pem

Makefile

Lines changed: 99 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ ifeq ($(OS),Darwin)
2020
endif
2121

2222
ifeq ($(OS),Linux)
23-
export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
24-
OPERATOR_FFIS=$(CURDIR)/operator/risc_zero_old/lib:$(CURDIR)/operator/risc_zero/lib
23+
export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero/lib
24+
OPERATOR_FFIS=$(CURDIR)/operator/risc_zero/lib
2525
endif
2626

2727
ifeq ($(OS),Linux)
@@ -195,7 +195,7 @@ operator_set_eigen_sdk_go_version_error:
195195

196196
operator_full_registration: operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer
197197

198-
operator_register_and_start: operator_full_registration operator_start
198+
operator_register_and_start: $(GET_SDK_VERSION) operator_full_registration operator_start
199199

200200
build_operator: deps
201201
$(GET_SDK_VERSION)
@@ -325,6 +325,24 @@ verifier_disable:
325325
@echo "Disabling verifier with ID: $(VERIFIER_ID)"
326326
@. contracts/scripts/.env && . contracts/scripts/disable_verifier.sh $(VERIFIER_ID)
327327

328+
strategies_get_weight:
329+
@echo "Getting weight of strategy: $(STRATEGY_INDEX)"
330+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/get_strategy_weight.sh $(STRATEGY_INDEX)
331+
332+
strategies_update_weight:
333+
@echo "Updating strategy weights: "
334+
@echo "STRATEGY_INDICES: $(STRATEGY_INDICES)"
335+
@echo "NEW_MULTIPLIERS: $(NEW_MULTIPLIERS)"
336+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/update_strategy_weight.sh $(STRATEGY_INDICES) $(NEW_MULTIPLIERS)
337+
338+
strategies_remove:
339+
@echo "Removing strategies: $(INDICES_TO_REMOVE)"
340+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/remove_strategy.sh $(INDICES_TO_REMOVE)
341+
342+
strategies_get_addresses:
343+
@echo "Getting strategy addresses"
344+
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/get_restakeable_strategies.sh
345+
328346
__BATCHER__:
329347

330348
BURST_SIZE ?= 5
@@ -521,16 +539,15 @@ task_sender_send_infinite_proofs_devnet:
521539
cargo run --release -- send-infinite-proofs \
522540
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
523541
--eth-rpc-url http://localhost:8545 \
524-
--batcher-url ws://localhost:8080 \
525542
--network devnet \
526543
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
527544
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/devnet
528545

529546
task_sender_test_connections_devnet:
530547
@cd batcher/aligned-task-sender && \
531548
cargo run --release -- test-connections \
532-
--batcher-url ws://localhost:8080 \
533-
--num-senders $(NUM_SENDERS)
549+
--num-senders $(NUM_SENDERS) \
550+
--network devnet
534551

535552
# ===== HOLESKY-STAGE =====
536553
task_sender_generate_and_fund_wallets_holesky_stage:
@@ -549,21 +566,21 @@ task_sender_send_infinite_proofs_holesky_stage:
549566
cargo run --release -- send-infinite-proofs \
550567
--burst-size $(BURST_SIZE) --burst-time-secs $(BURST_TIME_SECS) \
551568
--eth-rpc-url https://ethereum-holesky-rpc.publicnode.com \
552-
--batcher-url wss://stage.batcher.alignedlayer.com \
553569
--network holesky-stage \
554570
--proofs-dirpath $(CURDIR)/scripts/test_files/task_sender/proofs \
555571
--private-keys-filepath $(CURDIR)/batcher/aligned-task-sender/wallets/holesky-stage
556572

557573
task_sender_test_connections_holesky_stage:
558574
@cd batcher/aligned-task-sender && \
559575
cargo run --release -- test-connections \
560-
--batcher-url wss://stage.batcher.alignedlayer.com \
561-
--num-senders $(NUM_SENDERS)
576+
--num-senders $(NUM_SENDERS) \
577+
--network holesky-stage
562578

563579
__UTILS__:
564580
aligned_get_user_balance_devnet:
565581
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
566-
--user_addr $(USER_ADDR)
582+
--user_addr $(USER_ADDR) \
583+
--network devnet
567584

568585
aligned_get_user_balance_holesky:
569586
@cd batcher/aligned/ && cargo run --release -- get-user-balance \
@@ -721,25 +738,6 @@ generate_risc_zero_empty_journal_proof:
721738
@cd scripts/test_files/risc_zero/no_public_inputs && RUST_LOG=info cargo run --release
722739
@echo "Fibonacci proof and ELF with empty journal generated in scripts/test_files/risc_zero/no_public_inputs folder"
723740

724-
build_sp1_macos_old:
725-
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
726-
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.dylib operator/sp1_old/lib/libsp1_verifier_old_ffi.dylib
727-
728-
build_sp1_linux_old:
729-
@cd operator/sp1_old/lib && cargo build $(RELEASE_FLAG)
730-
@cp operator/sp1_old/lib/target/$(TARGET_REL_PATH)/libsp1_verifier_old_ffi.so operator/sp1_old/lib/libsp1_verifier_old_ffi.so
731-
732-
test_sp1_rust_ffi_old:
733-
@echo "Testing SP1 Rust FFI source code..."
734-
@cd operator/sp1_old/lib && RUST_MIN_STACK=83886080 cargo t --release
735-
736-
test_sp1_go_bindings_macos_old: build_sp1_macos_old
737-
@echo "Testing SP1 Go bindings..."
738-
go test ./operator/sp1_old/... -v
739-
740-
test_sp1_go_bindings_linux_old: build_sp1_linux_old
741-
@echo "Testing SP1 Go bindings..."
742-
go test ./operator/sp1_old/... -v
743741

744742
__RISC_ZERO_FFI__: ##
745743
build_risc_zero_macos:
@@ -767,26 +765,6 @@ generate_risc_zero_fibonacci_proof:
767765
RUST_LOG=info cargo run --release && \
768766
echo "Fibonacci proof, pub input and image ID generated in scripts/test_files/risc_zero folder"
769767

770-
build_risc_zero_macos_old:
771-
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
772-
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.dylib operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.dylib
773-
774-
build_risc_zero_linux_old:
775-
@cd operator/risc_zero_old/lib && cargo build $(RELEASE_FLAG)
776-
@cp operator/risc_zero_old/lib/target/$(TARGET_REL_PATH)/librisc_zero_verifier_old_ffi.so operator/risc_zero_old/lib/librisc_zero_verifier_old_ffi.so
777-
778-
test_risc_zero_rust_ffi_old:
779-
@echo "Testing RISC Zero Rust FFI source code..."
780-
@cd operator/risc_zero_old/lib && cargo test --release
781-
782-
test_risc_zero_go_bindings_macos_old: build_risc_zero_macos_old
783-
@echo "Testing RISC Zero Go bindings..."
784-
go test ./operator/risc_zero_old/... -v
785-
786-
test_risc_zero_go_bindings_linux_old: build_risc_zero_linux_old
787-
@echo "Testing RISC Zero Go bindings..."
788-
go test ./operator/risc_zero_old/... -v
789-
790768

791769
__MERKLE_TREE_FFI__: ##
792770
build_merkle_tree_macos:
@@ -811,11 +789,6 @@ test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
811789
@echo "Testing Merkle Tree Go bindings..."
812790
go test ./operator/merkle_tree/... -v
813791

814-
test_merkle_tree_old_go_bindings_macos: build_merkle_tree_macos_old
815-
@echo "Testing Old Merkle Tree Go bindings..."
816-
go test ./operator/merkle_tree_old/... -v
817-
818-
819792
__BUILD_ALL_FFI__:
820793

821794
build_all_ffi: ## Build all FFIs
@@ -826,17 +799,13 @@ build_all_ffi_macos: ## Build all FFIs for macOS
826799
@echo "Building all FFIs for macOS..."
827800
@$(MAKE) build_sp1_macos
828801
@$(MAKE) build_risc_zero_macos
829-
@$(MAKE) build_sp1_macos_old
830-
@$(MAKE) build_risc_zero_macos_old
831802
@$(MAKE) build_merkle_tree_macos
832803
@echo "All macOS FFIs built successfully."
833804

834805
build_all_ffi_linux: ## Build all FFIs for Linux
835806
@echo "Building all FFIs for Linux..."
836807
@$(MAKE) build_sp1_linux
837808
@$(MAKE) build_risc_zero_linux
838-
@$(MAKE) build_sp1_linux_old
839-
@$(MAKE) build_risc_zero_linux_old
840809
@$(MAKE) build_merkle_tree_linux
841810
@echo "All Linux FFIs built successfully."
842811

@@ -1250,3 +1219,75 @@ ansible_operator_deploy: ## Deploy the Operator. Parameters: INVENTORY
12501219
-i $(INVENTORY) \
12511220
-e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \
12521221
-e "bls_keystore_path=$(BLS_KEYSTORE)"
1222+
1223+
ansible_explorer_deploy:
1224+
@ansible-playbook infra/ansible/playbooks/explorer.yaml \
1225+
-i $(INVENTORY)
1226+
1227+
ansible_telemetry_create_env:
1228+
@cp -n infra/ansible/playbooks/ini/config-telemetry.ini.example infra/ansible/playbooks/ini/config-telemetry.ini
1229+
@echo "Config files for Telemetry created in infra/ansible/playbooks/ini"
1230+
@echo "Please complete the values and run make ansible_telemetry_deploy"
1231+
1232+
ansible_telemetry_deploy:
1233+
@ansible-playbook infra/ansible/playbooks/telemetry.yaml \
1234+
-i $(INVENTORY)
1235+
1236+
__ETHEREUM_PACKAGE__: ## ____
1237+
1238+
ethereum_package_start: ## Starts the ethereum_package environment
1239+
kurtosis run --enclave aligned github.com/ethpandaops/ethereum-package --args-file network_params.yaml
1240+
1241+
ethereum_package_inspect: ## Prints detailed information about the net
1242+
kurtosis enclave inspect aligned
1243+
1244+
ethereum_package_rm: ## Stops and removes the ethereum_package environment and used resources
1245+
kurtosis enclave rm aligned -f
1246+
1247+
batcher_start_ethereum_package: user_fund_payment_service
1248+
@echo "Starting Batcher..."
1249+
@$(MAKE) run_storage &
1250+
@cargo run --manifest-path ./batcher/aligned-batcher/Cargo.toml --release -- --config ./config-files/config-batcher-ethereum-package.yaml --env-file ./batcher/aligned-batcher/.env.dev
1251+
1252+
aggregator_start_ethereum_package:
1253+
$(MAKE) aggregator_start AGG_CONFIG_FILE=config-files/config-aggregator-ethereum-package.yaml
1254+
1255+
operator_start_ethereum_package:
1256+
$(MAKE) operator_start OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
1257+
1258+
operator_register_start_ethereum_package:
1259+
$(MAKE) operator_full_registration OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml \
1260+
$(MAKE) operator_start OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
1261+
1262+
1263+
install_spamoor: ## Instal spamoor to spam transactions
1264+
@echo "Installing spamoor..."
1265+
@git clone https://github.com/ethpandaops/spamoor.git
1266+
@cd spamoor && make
1267+
@mv spamoor/bin/spamoor $(HOME)/.local/bin
1268+
@rm -rf spamoor
1269+
@echo "======================================================================="
1270+
@echo "Installation complete! Run 'spamoor --help' to verify the installation."
1271+
@echo "If 'spamoor' is not recognized, make sure it's in your PATH by adding the following line to your shell configuration:"
1272+
@echo "export PATH=\$$PATH:\$$HOME/.local/bin"
1273+
@echo "======================================================================="
1274+
1275+
# Spamoor funding wallet
1276+
SPAMOOR_PRIVATE_KEY?=dbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97
1277+
NUM_WALLETS?=1000
1278+
TX_PER_BLOCK?=250
1279+
# Similar to a swap
1280+
TX_CONSUMES_GAS?=150000
1281+
1282+
spamoor_send_transactions: ## Sends normal transactions and also replacement transactions
1283+
spamoor gasburnertx -p $(SPAMOOR_PRIVATE_KEY) -c $(COUNT) \
1284+
--gas-units-to-burn $(TX_CONSUMES_GAS) \
1285+
--max-wallets $(NUM_WALLETS) --max-pending $(TX_PER_BLOCK) \
1286+
-t $(TX_PER_BLOCK) -h http://127.0.0.1:8545/ -h http://127.0.0.1:8550/ -h http://127.0.0.1:8555/ -h http://127.0.0.1:8565/ \
1287+
--refill-amount 5 --refill-balance 2 --tipfee $(TIP_FEE) --basefee 100 \
1288+
2>&1 | grep -v 'checked child wallets (no funding needed)'
1289+
1290+
__NODE_EXPORTER_: ##__
1291+
1292+
install_node_exporter:
1293+
@./scripts/install_node_exporter.sh

alerts/.env.devnet

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
# Variables for sender_with_alert.sh
2525
REPETITIONS=8
2626
SENDER_ADDRESS=0x14dC79964da2C08b23698B3D3cc7Ca32193d9955
27-
BATCHER_URL=ws://localhost:8080
2827
RPC_URL=http://localhost:8545
2928
EXPLORER_URL=http://localhost:3000
3029
NETWORK=devnet

alerts/.env.example

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ NETWORK=<MAINNET|HOLESKY|STAGE>
2626
# Variables for sender_with_alert.sh
2727
REPETITIONS=<REPETITIONS>
2828
SENDER_ADDRESS=<YOUR_SENDER_ADDRESS>
29-
BATCHER_URL=<BATCHER_URL>
3029
RPC_URL=<RPC_BASE_URL>
3130
EXPLORER_URL=<EXPLORER_BASE_URL>
3231
NETWORK=<NETWORK>

alerts/sender_with_alert.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
# - REPETITIONS
55
# - EXPLORER_URL
66
# - SENDER_ADDRESS
7-
# - BATCHER_URL
87
# - RPC_URL
98
# - EXPLORER_URL
109
# - NETWORK
@@ -92,7 +91,7 @@ do
9291
mkdir -p ./scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
9392

9493
## Generate Proof
95-
nonce=$(aligned get-user-nonce --batcher_url $BATCHER_URL --user_addr $SENDER_ADDRESS 2>&1 | awk '{print $9}')
94+
nonce=$(aligned get-user-nonce --network $NETWORK --user_addr $SENDER_ADDRESS 2>&1 | awk '{print $9}')
9695
echo $nonce
9796
if ! [[ "$nonce" =~ ^[0-9]+$ ]]; then
9897
echo "Failed getting user nonce, retrying in 10 seconds"
@@ -115,7 +114,6 @@ do
115114
--proof_generator_addr $SENDER_ADDRESS \
116115
--private_key $PRIVATE_KEY \
117116
--rpc_url $RPC_URL \
118-
--batcher_url $BATCHER_URL \
119117
--network $NETWORK \
120118
--max_fee 0.004ether \
121119
2>&1)
@@ -140,7 +138,7 @@ do
140138
sleep 60
141139
continue
142140
fi
143-
141+
144142
echo "Waiting $VERIFICATION_WAIT_TIME seconds for verification"
145143
sleep $VERIFICATION_WAIT_TIME
146144

0 commit comments

Comments
 (0)