diff --git a/Makefile b/Makefile index 18f8e811a..aac5057f5 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ unpause_all_aligned_service_manager: . contracts/scripts/unpause_aligned_service_manager.sh all get_paused_state_aligned_service_manager: - @echo "Getting paused state of all contracts..." + @echo "Getting paused state of Aligned Service Manager contract..." . contracts/scripts/get_paused_state_aligned_service_manager.sh pause_batcher_payment_service: @@ -105,6 +105,10 @@ unpause_batcher_payment_service: @echo "Unpausing BatcherPayments contract..." . contracts/scripts/unpause_batcher_payment_service.sh +get_paused_state_batcher_payments_service: + @echo "Getting paused state of Batcher Payments Service contract..." + . contracts/scripts/get_paused_state_batcher_payments_service.sh + lint_contracts: @cd contracts && npm run lint:sol @@ -697,11 +701,11 @@ open_telemetry_start: ## Run open telemetry services using telemetry-docker-comp telemetry_start: telemetry_run_db telemetry_ecto_migrate ## Run Telemetry API @cd telemetry_api && \ - ./start.sh + ./start.sh telemetry_ecto_migrate: ## @cd telemetry_api && \ - ./ecto_setup_db.sh + ./ecto_setup_db.sh telemetry_build_db: @cd telemetry_api && \ diff --git a/contracts/lib/eigenlayer-middleware b/contracts/lib/eigenlayer-middleware index a1801f07e..1273f59e4 160000 --- a/contracts/lib/eigenlayer-middleware +++ b/contracts/lib/eigenlayer-middleware @@ -1 +1 @@ -Subproject commit a1801f07e15192ef06db86dfec716eb2b6a4fe90 +Subproject commit 1273f59e42c9c4b9be1c33623c4ad6b0771d594a diff --git a/contracts/scripts/get_paused_state_aligned_service_manager.sh b/contracts/scripts/get_paused_state_aligned_service_manager.sh index 1c23e6fad..b58659446 100755 --- a/contracts/scripts/get_paused_state_aligned_service_manager.sh +++ b/contracts/scripts/get_paused_state_aligned_service_manager.sh @@ -5,8 +5,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then exit 1 fi -if [ -z "$PRIVATE_KEY" ]; then - echo "PRIVATE_KEY env var is not set" +if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then + echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set" exit 1 fi diff --git a/contracts/scripts/pause_aligned_service_manager.sh b/contracts/scripts/pause_aligned_service_manager.sh index 0d1abb073..14dd4a4cd 100755 --- a/contracts/scripts/pause_aligned_service_manager.sh +++ b/contracts/scripts/pause_aligned_service_manager.sh @@ -12,8 +12,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then exit 1 fi -if [ -z "$PRIVATE_KEY" ]; then - echo "PRIVATE_KEY env var is not set" +if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then + echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set" exit 1 fi @@ -27,7 +27,7 @@ if [[ "$1" == "all" ]]; then cast send $ALIGNED_SERVICE_MANAGER \ "pauseAll()()" \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY + --private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY exit 0 fi @@ -43,4 +43,4 @@ echo "New pause state: $result" cast send $ALIGNED_SERVICE_MANAGER \ "pause(uint256)()" "$result" \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY + --private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY diff --git a/contracts/scripts/pause_batcher_payment_service.sh b/contracts/scripts/pause_batcher_payment_service.sh index 7138cd090..bd0791c36 100755 --- a/contracts/scripts/pause_batcher_payment_service.sh +++ b/contracts/scripts/pause_batcher_payment_service.sh @@ -5,8 +5,8 @@ if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then exit 1 fi -if [ -z "$PRIVATE_KEY" ]; then - echo "PRIVATE_KEY env var is not set" +if [ -z "$BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY" ]; then + echo "BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY env var is not set" exit 1 fi @@ -19,4 +19,4 @@ echo "Pausing batcher payment contract" cast send $BATCHER_PAYMENT_SERVICE \ "pause()()" \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY + --private-key $BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY diff --git a/contracts/scripts/unpause_aligned_service_manager.sh b/contracts/scripts/unpause_aligned_service_manager.sh index 3a275f57a..a5e04a909 100755 --- a/contracts/scripts/unpause_aligned_service_manager.sh +++ b/contracts/scripts/unpause_aligned_service_manager.sh @@ -12,7 +12,7 @@ if [[ "$1" == "all" ]]; then cast send $ALIGNED_SERVICE_MANAGER \ "unpause(uint256)()" 0 \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY + --private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY return fi @@ -21,8 +21,8 @@ if [ -z "$ALIGNED_SERVICE_MANAGER" ]; then exit 1 fi -if [ -z "$PRIVATE_KEY" ]; then - echo "PRIVATE_KEY env var is not set" +if [ -z "$ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY" ]; then + echo "ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY env var is not set" exit 1 fi @@ -42,6 +42,4 @@ echo "New pause state: $result" cast send $ALIGNED_SERVICE_MANAGER \ "unpause(uint256)()" "$result" \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY - - + --private-key $ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY diff --git a/contracts/scripts/unpause_batcher_payment_service.sh b/contracts/scripts/unpause_batcher_payment_service.sh index d51183732..bdec21272 100755 --- a/contracts/scripts/unpause_batcher_payment_service.sh +++ b/contracts/scripts/unpause_batcher_payment_service.sh @@ -5,8 +5,8 @@ if [ -z "$BATCHER_PAYMENT_SERVICE" ]; then exit 1 fi -if [ -z "$PRIVATE_KEY" ]; then - echo "PRIVATE_KEY env var is not set" +if [ -z "$BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY" ]; then + echo "BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY env var is not set" exit 1 fi @@ -19,4 +19,4 @@ echo "Unpausing batcher payments contract" cast send $BATCHER_PAYMENT_SERVICE \ "unpause()()" \ --rpc-url $RPC_URL \ - --private-key $PRIVATE_KEY + --private-key $BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY diff --git a/docs/0_internal/pausable.md b/docs/0_internal/pausable.md index 617cf9702..8ebd6af2c 100644 --- a/docs/0_internal/pausable.md +++ b/docs/0_internal/pausable.md @@ -5,15 +5,18 @@ To run the make targets specified in this guide, you must first have the relevan ``` export RPC_URL= export ALIGNED_SERVICE_MANAGER= +export ALIGNED_SERVICE_MANAGER_PAUSER_PRIVATE_KEY= export BATCHER_PAYMENT_SERVICE= -export PRIVATE_KEY= +export BATCHER_PAYMENT_SERVICE_PAUSER_PRIVATE_KEY= ``` ## Aligned Service Manager -Aligned Service Manager is granulary pausable, which means you can pause the whole contract, or only specific functions. For this, Aligned uses the Pauser Registry contract provided by Eigenlayer. This contract stores the role of different accounts, so you can have X pausers and Y unpausers. +Aligned Service Manager is granulary pausable, which means you can pause the whole contract, or only specific functions. For this, +Aligned uses the Pauser Registry contract provided by Eigenlayer. This contract stores the role of different accounts, so +you can have X pausers and Y unpausers. -To interact with you you can: +To interact with it you can: - Get current paused state: ``` @@ -33,7 +36,7 @@ For example, if you want to pause functions 0, 2 and 3, you can run ``` contracts/scripts/pause_aligned_service_manager.sh 0 2 3 ``` -Then, if you want to unpause, for example, function 2, you must run +Then, if you want to unpause, for example, function 2, you must run ``` contracts/scripts/unpause_aligned_service_manager.sh 0 3 ``` @@ -49,10 +52,15 @@ Note: the list of pausable functions and their numbers can be seen in the `Align 4. depositToBatcher 5. receive -## BatcherPayments +## BatcherPaymentsService BatcherPayments is also pausable, but without so much detail. You can either pause or unpause the contract running the following: +- Get current paused state: +``` +make get_paused_state_batcher_payments_service +``` + ``` make pause_batcher_payment_service ```