Skip to content

Commit

Permalink
Merge branch 'staging' into fix/remove_ecdsa_usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Oppen authored Nov 26, 2024
2 parents 6cfc594 + bb152df commit 5ffab8e
Show file tree
Hide file tree
Showing 57 changed files with 910 additions and 206 deletions.
32 changes: 18 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -563,18 +563,18 @@ run_storage: ## Run storage using storage-docker-compose.yaml
@echo "Running storage..."
@docker compose -f storage-docker-compose.yaml up

__DEPLOYMENT__:
deploy_aligned_contracts: ## Deploy Aligned Contracts
@echo "Deploying Aligned Contracts..."
@. contracts/scripts/.env && . contracts/scripts/deploy_aligned_contracts.sh
__DEPLOYMENT__: ## ____
deploy_aligned_contracts: ## Deploy Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Deploying Aligned Contracts on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh

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

upgrade_aligned_contracts: ## Upgrade Aligned Contracts
@echo "Upgrading Aligned Contracts..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_aligned_contracts.sh
upgrade_aligned_contracts: ## Upgrade Aligned Contracts. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Upgrading Aligned Contracts on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_aligned_contracts.sh

upgrade_pauser_aligned_contracts: ## Upgrade Aligned Contracts with Pauser initialization
@echo "Upgrading Aligned Contracts with Pauser initialization..."
Expand Down Expand Up @@ -608,13 +608,13 @@ deploy_verify_batch_inclusion_caller:
@echo "Deploying VerifyBatchInclusionCaller contract..."
@. examples/verify/.env && . examples/verify/scripts/deploy_verify_batch_inclusion_caller.sh

deploy_batcher_payment_service:
@echo "Deploying BatcherPayments contract..."
@. contracts/scripts/.env && . contracts/scripts/deploy_batcher_payment_service.sh
deploy_batcher_payment_service: ## Deploy BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia>
@echo "Deploying BatcherPayments contract on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_batcher_payment_service.sh

upgrade_batcher_payment_service:
@echo "Upgrading BatcherPayments contract..."
@. contracts/scripts/.env && . contracts/scripts/upgrade_batcher_payment_service.sh
upgrade_batcher_payment_service: ## Upgrade BatcherPayments contract. Parameters: NETWORK=<mainnet|holesky|sepolia
@echo "Upgrading BatcherPayments Contract on $(NETWORK) network..."
@. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/upgrade_batcher_payment_service.sh

build_aligned_contracts:
@cd contracts/src/core && forge build
Expand Down Expand Up @@ -1064,7 +1064,7 @@ docker_logs_batcher:

__TELEMETRY__:
# Collector, Jaeger and Elixir API
telemetry_full_start: open_telemetry_start telemetry_start
telemetry_full_start: telemetry_compile_bls_verifier open_telemetry_start telemetry_start

# Collector and Jaeger
open_telemetry_start: ## Run open telemetry services using telemetry-docker-compose.yaml
Expand Down Expand Up @@ -1108,6 +1108,10 @@ telemetry_create_env:
@cd telemetry_api && \
cp .env.dev .env

telemetry_compile_bls_verifier:
@cd telemetry_api/priv && \
go build ../bls_verifier/bls_verify.go

setup_local_aligned_all:
tmux kill-session -t aligned_layer || true
tmux new-session -d -s aligned_layer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
"chainId": 17000
},
"permissions" : {
"aggregator": "<aggregator_address>",
"deployer": "<deployer_address>",
"owner": "<owner_address>",
"aggregator": "<aggregator_address>",
"upgrader": "<upgrader_address>",
"churner": "<churner_address>",
"ejector": "<ejector_address>",
"deployer": "<deployer_address>",
"pauser": "<pauser_address>",
"initalPausedStatus": 0
},
Expand Down
34 changes: 34 additions & 0 deletions contracts/script/deploy/config/mainnet/aligned.mainnet.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"chainInfo": {
"chainId": 17000
},
"permissions" : {
"aggregator": "<aggregator_address>",
"deployer": "<deployer_address>",
"owner": "<owner_address>",
"upgrader": "<upgrader_address>",
"churner": "<churner_address>",
"ejector": "<ejector_address>",
"pauser": "<pauser_address>",
"initalPausedStatus": 0
},
"minimumStakes": [
1
],
"strategyWeights": [
[
{
"0_strategy": "TBD",
"1_multiplier": 1e+18
}
]
],
"operatorSetParams": [
{
"0_maxOperatorCount": 200,
"1_kickBIPsOfOperatorStake": 11000,
"2_kickBIPsOfTotalStake": 50
}
],
"uri": ""
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"address": {
"batcherWallet": "<batcher_wallet_address>",
"alignedLayerServiceManager": "<aligned_layer_service_manager_address"
},
"amounts": {
"gasForAggregator": "300000",
"gasPerProof": "21000"
},
"permissions": {
"owner": "<owner_address>"
},
"eip712": {
"noncedVerificationDataTypeHash": "0x41817b5c5b0c3dcda70ccb43ba175fdcd7e586f9e0484422a2c6bba678fdf4a3"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
"chainId": 11155111
},
"permissions" : {
"aggregator": "<aggregator_address>",
"deployer": "<deployer_address>",
"owner": "<owner_address>",
"aggregator": "<aggregator_address>",
"upgrader": "<upgrader_address>",
"churner": "<churner_address>",
"ejector": "<ejector_address>",
"deployer": "<deployer_address>",
"pauser": "<pauser_address>",
"initalPausedStatus": 0
},
"minimumStakes": [
Expand Down
45 changes: 23 additions & 22 deletions contracts/script/output/sepolia/alignedlayer_deployment_output.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,32 @@
{
"addresses": {
"alignedLayerProxyAdmin": "0x9c50f5054784d6c5523C79c3aFA82E3184430CaC",
"alignedLayerServiceManager": "0xD0fAb108d175765f70Dd2e929b74ec107db6E0e8",
"alignedLayerServiceManagerImplementation": "0xbC86427A646540cF78c92F6C7432716460b97a06",
"blsApkRegistry": "0x9A5B215027F85319957a3a92205BFc18529d9309",
"blsApkRegistryImplementation": "0xEAE702d667bD851C9cAa59e71b23765Bea04A5aF",
"indexRegistry": "0xD316A01F902d0fDF169a53AB22daB38c06c6E60E",
"indexRegistryImplementation": "0x8009D6A252a41bc8fb648F71F3aa78d08231221d",
"operatorStateRetriever": "0xc24023c7e43Dc6A407b1B961A6602ee6d5408A75",
"registryCoordinator": "0x9C04afc13D57608a867E61BD91a10d8689B24ff8",
"registryCoordinatorImplementation": "0xFc326289eF3d5ba5E525e27530329727831E834B",
"serviceManagerRouter": "0x074c28d7ff24c06ab747e08772ed582c3b7C887e",
"stakeRegistry": "0x1888568D57Cf6834d74ef62A78e7EF1ADbd55582",
"stakeRegistryImplementation": "0x05671b5B23d16B2e198729b9Ce94696780d384b9",
"batcherPaymentService": "0x4a40a9F0D29B62a2852ed893B18fAD9CfEcB14FA",
"batcherPaymentServiceImplementation": "0xc40562950D62e3DbFf881149cf07833Cd0A425A9"
"alignedLayerProxyAdmin": "0x6b0E241bFf4A1596E0E826E55Cc285D7E2E7A45D",
"alignedLayerServiceManager": "0xc3F9c9f9CABdCe9679F5Aa184b02369f1c2A4E16",
"alignedLayerServiceManagerImplementation": "0xEB59ae25809b5B20db43371f0ca7f135b862647E",
"blsApkRegistry": "0xBDdBd0869b10079c5B00B8Da9B6e22A2C4a99040",
"blsApkRegistryImplementation": "0xAf33669eb4c062c1cdc756d96a43a1e734d9BC35",
"indexRegistry": "0x77042702606eC5A3c9d49a550dEE400681691c08",
"indexRegistryImplementation": "0x4A89A4986c4cfeFb9e59DB0923851824E1C66013",
"operatorStateRetriever": "0xfe8009EfD51FCD1BCf09712C9719e6EB3796546a",
"pauserRegistry": "0x42a3879a99Ddfd56a763415a3a33529bd1699112",
"registryCoordinator": "0xFfe833f349bE163EFa2fAa39f0dA2Ac37dB04857",
"registryCoordinatorImplementation": "0xf0A6F3d339bE498d04fE00cD328D0B4f3b475409",
"serviceManagerRouter": "0x73D68e630b4aAa35f01c4735914c55c5c3181672",
"stakeRegistry": "0xB57FA20C97235dA95Cf8e83a15865a3eb659B24a",
"stakeRegistryImplementation": "0x809D99a4357667203cC06fBc7046C236085be843",
"batcherPaymentService": "0x206BfD26d368Fa6f4C8F9b1269bEA4A824286a5c",
"batcherPaymentServiceImplementation": "0x872102bA2030C0AB26427Be24de86E0dD7622C67"
},
"chainInfo": {
"chainId": 11155111,
"deploymentBlock": 6833988
"deploymentBlock": 7111030
},
"permissions": {
"alignedLayerAggregator": "0x1380D03142156d8D9950b001A566dc5cc439dE81",
"alignedLayerChurner": "0x1380D03142156d8D9950b001A566dc5cc439dE81",
"alignedLayerEjector": "0x1380D03142156d8D9950b001A566dc5cc439dE81",
"alignedLayerOwner": "0x1380D03142156d8D9950b001A566dc5cc439dE81",
"alignedLayerUpgrader": "0x1380D03142156d8D9950b001A566dc5cc439dE81",
"pauserRegistry": "0xC2316E03d0871f667e75C62181089988Eb4DB7Db"
"alignedLayerAggregator": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0",
"alignedLayerChurner": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0",
"alignedLayerEjector": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0",
"alignedLayerOwner": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0",
"alignedLayerPauser": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0",
"alignedLayerUpgrader": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0"
}
}
8 changes: 8 additions & 0 deletions contracts/scripts/.env.holesky
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
RPC_URL=https://ethereum-holesky-rpc.publicnode.com
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/holesky/eigenlayer_deployment_output.json
DEPLOY_CONFIG_PATH=./script/deploy/config/holesky/aligned.holesky.config.json
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/holesky/batcher-payment-service.holesky.config.json
OUTPUT_PATH=./script/output/holesky/alignedlayer_deployment_output.json
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
MULTISIG=false
8 changes: 8 additions & 0 deletions contracts/scripts/.env.mainnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
RPC_URL=https://ethereum-rpc.publicnode.com
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/mainnet/eigenlayer_deployment_output.json
DEPLOY_CONFIG_PATH=./script/deploy/config/mainnet/aligned.mainnet.config.json
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/mainnet/batcher-payment-service.mainnet.config.json
OUTPUT_PATH=./script/output/mainnet/alignedlayer_deployment_output.json
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
MULTISIG=false
8 changes: 8 additions & 0 deletions contracts/scripts/.env.sepolia
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
PRIVATE_KEY=<YOUR_PRIVATE_KEY>
EXISTING_DEPLOYMENT_INFO_PATH=./script/output/sepolia/eigenlayer_deployment_output.json
DEPLOY_CONFIG_PATH=./script/deploy/config/sepolia/aligned.sepolia.config.json
BATCHER_PAYMENT_SERVICE_CONFIG_PATH=./script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json
OUTPUT_PATH=./script/output/sepolia/alignedlayer_deployment_output.json
ETHERSCAN_API_KEY=<YOUR_ETHERSCAN_API_KEY>
MULTISIG=false
2 changes: 2 additions & 0 deletions contracts/scripts/upgrade_aligned_contracts.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ mv "script/output/holesky/alignedlayer_deployment_output.temp.json" $OUTPUT_PATH

data=$(cast calldata "upgrade(address, address)" $aligned_layer_service_manager $new_aligned_layer_service_manager_implementation)

echo "The new AlignedLayerServiceManager Implementation is $new_aligned_layer_service_manager_implementation"

if [ "$MULTISIG" = false ]; then
echo "Executing upgrade transaction"
proxy_admin=$(jq -r '.addresses.alignedLayerProxyAdmin' $OUTPUT_PATH)
Expand Down
2 changes: 2 additions & 0 deletions contracts/scripts/upgrade_batcher_payment_service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ rm -f "$OUTPUT_PATH.temp"

data=$(cast calldata "upgradeTo(address)" $batcher_payment_service_implementation)

echo "The new Batcher Payment Service Implementation is $batcher_payment_service_implementation"

if [ "$MULTISIG" = false ]; then
echo "Executing upgrade transaction"
cast send $batcher_payment_service_proxy $data \
Expand Down
2 changes: 2 additions & 0 deletions contracts/scripts/upgrade_registry_coordinator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ rm -f "script/output/holesky/alignedlayer_deployment_output.temp.json"

data=$(cast calldata "upgrade(address, address)" $registry_coordinator $new_registry_coordinator_implementation)

echo "The new RegistryCoordinator Implementation is $new_registry_coordinator_implementation"

if [ "$MULTISIG" = false ]; then
echo "Executing upgrade transaction"
proxy_admin=$(jq -r '.addresses.alignedLayerProxyAdmin' $OUTPUT_PATH)
Expand Down
20 changes: 20 additions & 0 deletions docs/0_internal/0_guides.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Deployment of Aligned Contracts

This guide will walk you through the deployment of the Aligned Layer contracts.


## Setup

1. If you want to manage AlignedLayer contracts (like upgrades or pauses) using a Multisig wallet, you can follow the [Multisig Wallet Creation Guide](./1_multisig_creation.md).

After finishing the setup of the multisig, you will have a multisig address.

2. To deploy the contracts, you can follow the [Deployment Guide](./2_deploy_contracts.md).

After finishing the deployment, you will have the deployed contract addresses.

3. Once you have deployed the Aligned contracts, you can perform upgrades on them.

a. If you are not using a Multisig wallet, you can follow the [Upgrade Guide](./3_a_upgrade_contracts.md).

b. If you are using a Multisig wallet, you can follow the [Upgrade Guide with Multisig](./3_b_upgrade_contracts_with_multisig.md).
48 changes: 48 additions & 0 deletions docs/0_internal/1_multisig_creation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Create a Multisig Wallet using SAFE

> [!WARNING]
> Safe Multisig Wallet is not currently supported in Holesky Testnet.
> [!WARNING]
> You need at least one wallet with funds to deploy the Multisig.

You can create a Multisig wallet using [Safe](https://safe.global/).

1. Go to [Safe](https://app.safe.global/welcome/accounts).

2. Click on `Create Account`.

![Create Account](images/1_multisig_2.png)

3. Connect your wallet.

![Connect Wallet](images/1_multisig_1.png)

4. Set a name for your Multisig (it is just a local name) and choose a network where you want to deploy it. Then click on `Next`.

![Name and Network](images/1_multisig_3.png)

For `Ethereum Sepolia` network set `Sepolia`.

For `Ethereum Mainnet` network set `Ethereum`.

In this tutorial, we are using `Sepolia` network.

5. Add the signers for your Multisig and the required threshold. Then click on `Next`.

![Signers and Threshold](images/1_multisig_4.png)

This example shows a 2/3 Multisig, which means that 2 out of 3 signers are required to approve a transaction.

6. Review the information, choose `Pay now` option and click on `Create Account`.

![Review](images/1_multisig_5.png)

7. Confirm the transaction on your wallet.

8. Wait until the transaction is confirmed. Then, you will see your Multisig wallet.

![Multisig Wallet](images/1_multisig_6.png)

After finishing this tutorial, you will have your Multisig wallet created.
Loading

0 comments on commit 5ffab8e

Please sign in to comment.