diff --git a/Makefile b/Makefile index 797b9a211c..f7d667383e 100644 --- a/Makefile +++ b/Makefile @@ -437,8 +437,8 @@ operator_remove_from_whitelist_devnet: 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) operator_whitelist: - @echo "Whitelisting operator $(OPERATOR_ADDRESS)" - @. contracts/scripts/.env && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS) + @echo "Whitelisting operator $(OPERATOR_ADDRESS) on $(NETWORK)" + @. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/operator_whitelist.sh $(OPERATOR_ADDRESS) operator_remove_from_whitelist: @echo "Removing operator $(OPERATOR_ADDRESS)" @@ -805,7 +805,7 @@ generate_circom_groth16_bn256_setup: ## Run the circom_groth16_bn256_script setu __CONTRACTS_DEPLOYMENT__: ## ____ deploy_aligned_contracts: ## Deploy Aligned Contracts. Parameters: NETWORK= @echo "Deploying Aligned Contracts on $(NETWORK) network..." - @. co ntracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh + @. contracts/scripts/.env.$(NETWORK) && . contracts/scripts/deploy_aligned_contracts.sh deploy_pauser_registry: ## Deploy Pauser Registry @echo "Deploying Pauser Registry..." @@ -1349,14 +1349,13 @@ ansible_batcher_create_env: ## Create empty variables files for the Batcher depl @echo "Config files for the Batcher created in infra/ansible/playbooks/ini" @echo "Please complete the values and run make ansible_batcher_deploy" -ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY, KEYSTORE - @if [ -z "$(INVENTORY)" ] || [ -z "$(KEYSTORE)" ]; then \ - echo "Error: Both INVENTORY and KEYSTORE must be set."; \ +ansible_batcher_deploy: ## Deploy the Batcher. Parameters: INVENTORY + @if [ -z "$(INVENTORY)" ]; then \ + echo "Error: INVENTORY must be set."; \ exit 1; \ fi @ansible-playbook infra/ansible/playbooks/batcher.yaml \ - -i $(INVENTORY) \ - -e "keystore_path=$(KEYSTORE)" + -i $(INVENTORY) ansible_aggregator_create_env: ## Create empty variables files for the Aggregator deploy @cp -n infra/ansible/playbooks/ini/config-aggregator.ini.example infra/ansible/playbooks/ini/config-aggregator.ini @@ -1364,14 +1363,12 @@ ansible_aggregator_create_env: ## Create empty variables files for the Aggregato @echo "Please complete the values and run make ansible_aggregator_deploy" ansible_aggregator_deploy: ## Deploy the Operator. Parameters: INVENTORY - @if [ -z "$(INVENTORY)" ] || [ -z "$(ECDSA_KEYSTORE)" ] || [ -z "$(BLS_KEYSTORE)" ]; then \ - echo "Error: INVENTORY, ECDSA_KEYSTORE, BLS_KEYSTORE must be set."; \ + @if [ -z "$(INVENTORY)" ]; then \ + echo "Error: INVENTORY must be set."; \ exit 1; \ fi @ansible-playbook infra/ansible/playbooks/aggregator.yaml \ - -i $(INVENTORY) \ - -e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \ - -e "bls_keystore_path=$(BLS_KEYSTORE)" + -i $(INVENTORY) ansible_operator_create_env: ## Create empty variables files for the Operator deploy @cp -n infra/ansible/playbooks/ini/config-operator.ini.example infra/ansible/playbooks/ini/config-operator.ini @@ -1380,14 +1377,12 @@ ansible_operator_create_env: ## Create empty variables files for the Operator de @echo "Please complete the values and run make ansible_operator_deploy" ansible_operator_deploy: ## Deploy the Operator. Parameters: INVENTORY - @if [ -z "$(INVENTORY)" ] || [ -z "$(ECDSA_KEYSTORE)" ] || [ -z "$(BLS_KEYSTORE)" ]; then \ - echo "Error: INVENTORY, ECDSA_KEYSTORE, BLS_KEYSTORE must be set."; \ + @if [ -z "$(INVENTORY)" ]; then \ + echo "Error: INVENTORY must be set."; \ exit 1; \ fi @ansible-playbook infra/ansible/playbooks/operator.yaml \ - -i $(INVENTORY) \ - -e "ecdsa_keystore_path=$(ECDSA_KEYSTORE)" \ - -e "bls_keystore_path=$(BLS_KEYSTORE)" + -i $(INVENTORY) ansible_explorer_deploy: ## Deploy the Explorer. Parameters: INVENTORY @ansible-playbook infra/ansible/playbooks/explorer.yaml \ diff --git a/contracts/script/deploy/AlignedLayerDeployer.s.sol b/contracts/script/deploy/AlignedLayerDeployer.s.sol index 9c2cc1ab53..5c20ac040a 100644 --- a/contracts/script/deploy/AlignedLayerDeployer.s.sol +++ b/contracts/script/deploy/AlignedLayerDeployer.s.sol @@ -107,6 +107,9 @@ contract AlignedLayerDeployer is ExistingDeploymentParser { vm.startBroadcast(); + // Empty contract to use as initial implementation for proxies + EmptyContract emptyContract = new EmptyContract(); + // deploy proxy admin for ability to upgrade proxy contracts alignedLayerProxyAdmin = new ProxyAdmin(); @@ -302,239 +305,239 @@ contract AlignedLayerDeployer is ExistingDeploymentParser { _writeOutput(config_data, outputPath); } - function xtest( - string memory existingDeploymentInfoPath, - string memory deployConfigPath - ) external { - // get info on all the already-deployed contracts - _parseDeployedContracts(existingDeploymentInfoPath); - - // READ JSON CONFIG DATA - string memory config_data = vm.readFile(deployConfigPath); - - // check that the chainID matches the one in the config - uint256 currentChainId = block.chainid; - uint256 configChainId = stdJson.readUint( - config_data, - ".chainInfo.chainId" - ); - emit log_named_uint("You are deploying on ChainID", currentChainId); - require( - configChainId == currentChainId, - "You are on the wrong chain for this config" - ); - - // parse the addresses of permissioned roles - alignedLayerOwner = stdJson.readAddress( - config_data, - ".permissions.owner" - ); - alignedLayerUpgrader = stdJson.readAddress( - config_data, - ".permissions.upgrader" - ); - alignedLayerPauser = stdJson.readAddress( - config_data, - ".permissions.pauser" - ); - initalPausedStatus = stdJson.readUint( - config_data, - ".permissions.initalPausedStatus" - ); - - deployer = stdJson.readAddress(config_data, ".permissions.deployer"); - vm.startPrank(deployer); - - // deploy proxy admin for ability to upgrade proxy contracts - alignedLayerProxyAdmin = new ProxyAdmin(); - - //deploy pauser registry - { - address[] memory pausers = new address[](1); - pausers[0] = alignedLayerPauser; - pauserRegistry = new PauserRegistry(pausers, alignedLayerPauser); // (pausers, unpauser) - } - - //deploy service manager router - serviceManagerRouter = new ServiceManagerRouter(); - - /** - * First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are - * not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. - */ - alignedLayerServiceManager = AlignedLayerServiceManager( - payable( - new TransparentUpgradeableProxy( - address(emptyContract), - address(alignedLayerProxyAdmin), - "" - ) - ) - ); - registryCoordinator = RegistryCoordinator( - address( - new TransparentUpgradeableProxy( - address(emptyContract), - address(alignedLayerProxyAdmin), - "" - ) - ) - ); - indexRegistry = IndexRegistry( - address( - new TransparentUpgradeableProxy( - address(emptyContract), - address(alignedLayerProxyAdmin), - "" - ) - ) - ); - stakeRegistry = StakeRegistry( - address( - new TransparentUpgradeableProxy( - address(emptyContract), - address(alignedLayerProxyAdmin), - "" - ) - ) - ); - apkRegistry = BLSApkRegistry( - address( - new TransparentUpgradeableProxy( - address(emptyContract), - address(alignedLayerProxyAdmin), - "" - ) - ) - ); - - //deploy index registry implementation - indexRegistryImplementation = new IndexRegistry(registryCoordinator); - - //upgrade index registry proxy to implementation - alignedLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(indexRegistry))), - address(indexRegistryImplementation) - ); - - //deploy stake registry implementation - stakeRegistryImplementation = new StakeRegistry( - registryCoordinator, - delegationManager - ); - - //upgrade stake registry proxy to implementation - alignedLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(stakeRegistry))), - address(stakeRegistryImplementation) - ); - - //deploy apk registry implementation - apkRegistryImplementation = new BLSApkRegistry(registryCoordinator); - - //upgrade apk registry proxy to implementation - alignedLayerProxyAdmin.upgrade( - TransparentUpgradeableProxy(payable(address(apkRegistry))), - address(apkRegistryImplementation) - ); - - //deploy the registry coordinator implementation. - registryCoordinatorImplementation = new RegistryCoordinator( - IServiceManager(address(alignedLayerServiceManager)), - stakeRegistry, - apkRegistry, - indexRegistry - ); - - { - // parse initalization params and permissions from config data - ( - uint96[] memory minimumStakeForQuourm, - IStakeRegistry.StrategyParams[][] - memory strategyAndWeightingMultipliers - ) = _parseStakeRegistryParams(config_data); - ( - IRegistryCoordinator.OperatorSetParam[] - memory operatorSetParams, - address churner, - address ejector - ) = _parseRegistryCoordinatorParams(config_data); - - //upgrade the registry coordinator proxy to implementation - alignedLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy( - payable(address(registryCoordinator)) - ), - address(registryCoordinatorImplementation), - abi.encodeWithSelector( - RegistryCoordinator.initialize.selector, - alignedLayerOwner, - churner, - ejector, - pauserRegistry, - initalPausedStatus, - operatorSetParams, - minimumStakeForQuourm, - strategyAndWeightingMultipliers - ) - ); - } - - //deploy the alignedLayer service manager implementation - alignedLayerServiceManagerImplementation = new AlignedLayerServiceManager( - avsDirectory, - rewardsCoordinator, - registryCoordinator, - stakeRegistry - ); - - //upgrade the alignedLayer service manager proxy to implementation - alignedLayerProxyAdmin.upgradeAndCall( - TransparentUpgradeableProxy( - payable(address(alignedLayerServiceManager)) - ), - address(alignedLayerServiceManagerImplementation), - abi.encodeWithSelector( - AlignedLayerServiceManager.initialize.selector, - deployer, - deployer, - pauserRegistry, - initalPausedStatus - ) - ); - - string memory metadataURI = stdJson.readString(config_data, ".uri"); - alignedLayerServiceManager.updateAVSMetadataURI(metadataURI); - alignedLayerServiceManager.transferOwnership(alignedLayerOwner); - - //deploy the operator state retriever - operatorStateRetriever = new OperatorStateRetriever(); - - // transfer ownership of proxy admin to upgrader - alignedLayerProxyAdmin.transferOwnership(alignedLayerUpgrader); - - vm.stopPrank(); - - // sanity checks - __verifyContractPointers( - apkRegistry, - alignedLayerServiceManager, - registryCoordinator, - indexRegistry, - stakeRegistry - ); - - __verifyContractPointers( - apkRegistryImplementation, - alignedLayerServiceManagerImplementation, - registryCoordinatorImplementation, - indexRegistryImplementation, - stakeRegistryImplementation - ); - - __verifyImplementations(); - __verifyInitalizations(config_data); - } +// function xtest( +// string memory existingDeploymentInfoPath, +// string memory deployConfigPath +// ) external { +// // get info on all the already-deployed contracts +// _parseDeployedContracts(existingDeploymentInfoPath); +// +// // READ JSON CONFIG DATA +// string memory config_data = vm.readFile(deployConfigPath); +// +// // check that the chainID matches the one in the config +// uint256 currentChainId = block.chainid; +// uint256 configChainId = stdJson.readUint( +// config_data, +// ".chainInfo.chainId" +// ); +// emit log_named_uint("You are deploying on ChainID", currentChainId); +// require( +// configChainId == currentChainId, +// "You are on the wrong chain for this config" +// ); +// +// // parse the addresses of permissioned roles +// alignedLayerOwner = stdJson.readAddress( +// config_data, +// ".permissions.owner" +// ); +// alignedLayerUpgrader = stdJson.readAddress( +// config_data, +// ".permissions.upgrader" +// ); +// alignedLayerPauser = stdJson.readAddress( +// config_data, +// ".permissions.pauser" +// ); +// initalPausedStatus = stdJson.readUint( +// config_data, +// ".permissions.initalPausedStatus" +// ); +// +// deployer = stdJson.readAddress(config_data, ".permissions.deployer"); +// vm.startPrank(deployer); +// +// // deploy proxy admin for ability to upgrade proxy contracts +// alignedLayerProxyAdmin = new ProxyAdmin(); +// +// //deploy pauser registry +// { +// address[] memory pausers = new address[](1); +// pausers[0] = alignedLayerPauser; +// pauserRegistry = new PauserRegistry(pausers, alignedLayerPauser); // (pausers, unpauser) +// } +// +// //deploy service manager router +// serviceManagerRouter = new ServiceManagerRouter(); +// +// /** +// * First, deploy upgradeable proxy contracts that **will point** to the implementations. Since the implementation contracts are +// * not yet deployed, we give these proxies an empty contract as the initial implementation, to act as if they have no code. +// */ +// alignedLayerServiceManager = AlignedLayerServiceManager( +// payable( +// new TransparentUpgradeableProxy( +// address(emptyContract), +// address(alignedLayerProxyAdmin), +// "" +// ) +// ) +// ); +// registryCoordinator = RegistryCoordinator( +// address( +// new TransparentUpgradeableProxy( +// address(emptyContract), +// address(alignedLayerProxyAdmin), +// "" +// ) +// ) +// ); +// indexRegistry = IndexRegistry( +// address( +// new TransparentUpgradeableProxy( +// address(emptyContract), +// address(alignedLayerProxyAdmin), +// "" +// ) +// ) +// ); +// stakeRegistry = StakeRegistry( +// address( +// new TransparentUpgradeableProxy( +// address(emptyContract), +// address(alignedLayerProxyAdmin), +// "" +// ) +// ) +// ); +// apkRegistry = BLSApkRegistry( +// address( +// new TransparentUpgradeableProxy( +// address(emptyContract), +// address(alignedLayerProxyAdmin), +// "" +// ) +// ) +// ); +// +// //deploy index registry implementation +// indexRegistryImplementation = new IndexRegistry(registryCoordinator); +// +// //upgrade index registry proxy to implementation +// alignedLayerProxyAdmin.upgrade( +// TransparentUpgradeableProxy(payable(address(indexRegistry))), +// address(indexRegistryImplementation) +// ); +// +// //deploy stake registry implementation +// stakeRegistryImplementation = new StakeRegistry( +// registryCoordinator, +// delegationManager +// ); +// +// //upgrade stake registry proxy to implementation +// alignedLayerProxyAdmin.upgrade( +// TransparentUpgradeableProxy(payable(address(stakeRegistry))), +// address(stakeRegistryImplementation) +// ); +// +// //deploy apk registry implementation +// apkRegistryImplementation = new BLSApkRegistry(registryCoordinator); +// +// //upgrade apk registry proxy to implementation +// alignedLayerProxyAdmin.upgrade( +// TransparentUpgradeableProxy(payable(address(apkRegistry))), +// address(apkRegistryImplementation) +// ); +// +// //deploy the registry coordinator implementation. +// registryCoordinatorImplementation = new RegistryCoordinator( +// IServiceManager(address(alignedLayerServiceManager)), +// stakeRegistry, +// apkRegistry, +// indexRegistry +// ); +// +// { +// // parse initalization params and permissions from config data +// ( +// uint96[] memory minimumStakeForQuourm, +// IStakeRegistry.StrategyParams[][] +// memory strategyAndWeightingMultipliers +// ) = _parseStakeRegistryParams(config_data); +// ( +// IRegistryCoordinator.OperatorSetParam[] +// memory operatorSetParams, +// address churner, +// address ejector +// ) = _parseRegistryCoordinatorParams(config_data); +// +// //upgrade the registry coordinator proxy to implementation +// alignedLayerProxyAdmin.upgradeAndCall( +// TransparentUpgradeableProxy( +// payable(address(registryCoordinator)) +// ), +// address(registryCoordinatorImplementation), +// abi.encodeWithSelector( +// RegistryCoordinator.initialize.selector, +// alignedLayerOwner, +// churner, +// ejector, +// pauserRegistry, +// initalPausedStatus, +// operatorSetParams, +// minimumStakeForQuourm, +// strategyAndWeightingMultipliers +// ) +// ); +// } +// +// //deploy the alignedLayer service manager implementation +// alignedLayerServiceManagerImplementation = new AlignedLayerServiceManager( +// avsDirectory, +// rewardsCoordinator, +// registryCoordinator, +// stakeRegistry +// ); +// +// //upgrade the alignedLayer service manager proxy to implementation +// alignedLayerProxyAdmin.upgradeAndCall( +// TransparentUpgradeableProxy( +// payable(address(alignedLayerServiceManager)) +// ), +// address(alignedLayerServiceManagerImplementation), +// abi.encodeWithSelector( +// AlignedLayerServiceManager.initialize.selector, +// deployer, +// deployer, +// pauserRegistry, +// initalPausedStatus +// ) +// ); +// +// string memory metadataURI = stdJson.readString(config_data, ".uri"); +// alignedLayerServiceManager.updateAVSMetadataURI(metadataURI); +// alignedLayerServiceManager.transferOwnership(alignedLayerOwner); +// +// //deploy the operator state retriever +// operatorStateRetriever = new OperatorStateRetriever(); +// +// // transfer ownership of proxy admin to upgrader +// alignedLayerProxyAdmin.transferOwnership(alignedLayerUpgrader); +// +// vm.stopPrank(); +// +// // sanity checks +// __verifyContractPointers( +// apkRegistry, +// alignedLayerServiceManager, +// registryCoordinator, +// indexRegistry, +// stakeRegistry +// ); +// +// __verifyContractPointers( +// apkRegistryImplementation, +// alignedLayerServiceManagerImplementation, +// registryCoordinatorImplementation, +// indexRegistryImplementation, +// stakeRegistryImplementation +// ); +// +// __verifyImplementations(); +// __verifyInitalizations(config_data); +// } function __verifyContractPointers( BLSApkRegistry _apkRegistry, diff --git a/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.json b/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.json index 0a5f7efafb..d2995652a5 100644 --- a/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.json +++ b/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.json @@ -5,7 +5,7 @@ "alignedAggregatorAddress": "0x9403dF48130621f87974a5A1d1d11d3aF1222A82" }, "programs_id": { - "sp1AggregationProgramVKHash": "0x0073c64593b6224bb8059787baa93b3aa491a308e9f126788b547ca02d3d599e", + "sp1AggregationProgramVKHash": "0x00856d1f422b7919a4c37d912033a3a8404d2a19688769ad7b6095e16b3d7448", "risc0AggregationProgramImageId": "0x4121299f6bc60c97cee65caf19677339c07134d14807b01fe88e4d42789d4ef4" }, "permissions": { diff --git a/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json b/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json index 6e7390af8e..e7c021fc45 100644 --- a/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json +++ b/contracts/script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json @@ -5,7 +5,7 @@ "alignedAggregatorAddress": "0x3595aa7d30f89f65933e7421dec77e4478d9fb01" }, "programs_id": { - "sp1AggregationProgramVKHash": "0x0073c64593b6224bb8059787baa93b3aa491a308e9f126788b547ca02d3d599e", + "sp1AggregationProgramVKHash": "0x00856d1f422b7919a4c37d912033a3a8404d2a19688769ad7b6095e16b3d7448", "risc0AggregationProgramImageId": "0x4121299f6bc60c97cee65caf19677339c07134d14807b01fe88e4d42789d4ef4" }, "permissions": { diff --git a/contracts/script/deploy/config/mainnet/proof-aggregator-service.mainnet.config.json b/contracts/script/deploy/config/mainnet/proof-aggregator-service.mainnet.config.json index 09418fcb37..1cb0fee7ba 100644 --- a/contracts/script/deploy/config/mainnet/proof-aggregator-service.mainnet.config.json +++ b/contracts/script/deploy/config/mainnet/proof-aggregator-service.mainnet.config.json @@ -5,7 +5,7 @@ "alignedAggregatorAddress": "" }, "programs_id": { - "sp1AggregationProgramVKHash": "0x0073c64593b6224bb8059787baa93b3aa491a308e9f126788b547ca02d3d599e", + "sp1AggregationProgramVKHash": "0x00856d1f422b7919a4c37d912033a3a8404d2a19688769ad7b6095e16b3d7448", "risc0AggregationProgramImageId": "0x4121299f6bc60c97cee65caf19677339c07134d14807b01fe88e4d42789d4ef4" }, "permissions": { diff --git a/contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.mainnet.config.json b/contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.mainnet.config.json index da8c611c07..1cb0fee7ba 100644 --- a/contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.mainnet.config.json +++ b/contracts/script/deploy/config/mainnet_staging/proof-aggregator-service.mainnet.config.json @@ -5,8 +5,8 @@ "alignedAggregatorAddress": "" }, "programs_id": { - "sp1AggregationProgramVKHash": "0x0073c64593b6224bb8059787baa93b3aa491a308e9f126788b547ca02d3d599e", - "risc0AggregationProgramImageId": "0xcee9c4f2e4758970c20676cc7bfd23a1640f18b8b025ed05be7330c9472aa65a" + "sp1AggregationProgramVKHash": "0x00856d1f422b7919a4c37d912033a3a8404d2a19688769ad7b6095e16b3d7448", + "risc0AggregationProgramImageId": "0x4121299f6bc60c97cee65caf19677339c07134d14807b01fe88e4d42789d4ef4" }, "permissions": { "owner": "" diff --git a/contracts/script/deploy/config/sepolia/aligned.sepolia.config.json b/contracts/script/deploy/config/sepolia/aligned.sepolia.config.json index 7e7784d565..9a4ced60c7 100644 --- a/contracts/script/deploy/config/sepolia/aligned.sepolia.config.json +++ b/contracts/script/deploy/config/sepolia/aligned.sepolia.config.json @@ -3,13 +3,13 @@ "chainId": 11155111 }, "permissions" : { - "aggregator": "", - "deployer": "", - "owner": "", - "upgrader": "", - "churner": "", - "ejector": "", - "pauser": "", + "aggregator": "0x1407a423FFaBcBC6ceEb0bbDf4cd093c860a3F62", + "deployer": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "owner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "upgrader": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "churner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "ejector": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "pauser": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", "initalPausedStatus": 0 }, "minimumStakes": [ @@ -18,7 +18,15 @@ "strategyWeights": [ [ { - "0_strategy": "0x80528D6e9A2BAbFc766965E0E26d5aB08D9CFaF9", + "0_strategy": "0x424246eF71b01ee33aA33aC590fd9a0855F5eFbc", + "1_multiplier": 1e+18 + }, + { + "0_strategy": "0x8b29d91e67b013e855EaFe0ad704aC4Ab086a574", + "1_multiplier": 1e+18 + }, + { + "0_strategy": "0xbeaC0eeEeeeeEEeEeEEEEeeEEeEeeeEeeEEBEaC0", "1_multiplier": 1e+18 } ] diff --git a/contracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json b/contracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json index 0766c80724..8d454b2779 100644 --- a/contracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json +++ b/contracts/script/deploy/config/sepolia/batcher-payment-service.sepolia.config.json @@ -1,10 +1,10 @@ { "address": { - "batcherWallet": "", - "alignedLayerServiceManager": "" + "batcherWallet": "0xBd924Fd31b960C2a1fd261F952B304b13A6922F1", + "alignedLayerServiceManager": "0xFf731AB7b3653dc66878DC77E851D174f472d137" }, "permissions": { - "owner": "" + "owner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106" }, "eip712": { "noncedVerificationDataTypeHash": "0x41817b5c5b0c3dcda70ccb43ba175fdcd7e586f9e0484422a2c6bba678fdf4a3" diff --git a/contracts/script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json b/contracts/script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json index dcf0c74f22..4791308cf6 100644 --- a/contracts/script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json +++ b/contracts/script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json @@ -2,13 +2,13 @@ "address": { "sp1VerifierAddress": "0x397A5f7f3dBd538f23DE225B51f532c34448dA9B", "risc0VerifierAddress": "0x925d8331ddc0a1F0d96E68CF073DFE1d92b69187", - "alignedAggregatorAddress": "" + "alignedAggregatorAddress": "0x3602fEF708644530Fef94f86b770c0603571e98B" }, "programs_id": { - "sp1AggregationProgramVKHash": "0x0073c64593b6224bb8059787baa93b3aa491a308e9f126788b547ca02d3d599e", - "risc0AggregationProgramImageId": "0xcee9c4f2e4758970c20676cc7bfd23a1640f18b8b025ed05be7330c9472aa65a" + "sp1AggregationProgramVKHash": "0x00856d1f422b7919a4c37d912033a3a8404d2a19688769ad7b6095e16b3d7448", + "risc0AggregationProgramImageId": "0x4121299f6bc60c97cee65caf19677339c07134d14807b01fe88e4d42789d4ef4" }, "permissions": { - "owner": "" + "owner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106" } } diff --git a/contracts/script/deploy/utils/ExistingDeploymentParser.sol b/contracts/script/deploy/utils/ExistingDeploymentParser.sol index cd80a5d4bd..742e466e18 100644 --- a/contracts/script/deploy/utils/ExistingDeploymentParser.sol +++ b/contracts/script/deploy/utils/ExistingDeploymentParser.sol @@ -68,8 +68,6 @@ contract ExistingDeploymentParser is Script, Test { // All eigenpods is just single array list of above eigenPods address[] public allEigenPods; - EmptyContract public emptyContract; - address executorMultisig; address operationsMultisig; address pauserMultisig; @@ -171,7 +169,6 @@ contract ExistingDeploymentParser is Script, Test { baseStrategyImplementation = StrategyBase( stdJson.readAddress(existingDeploymentData, ".addresses.baseStrategyImplementation") ); - emptyContract = EmptyContract(stdJson.readAddress(existingDeploymentData, ".addresses.emptyContract")); } function _parseDeployedEigenPods(string memory existingDeploymentInfoPath) internal returns (DeployedEigenPods memory) { @@ -712,7 +709,6 @@ contract ExistingDeploymentParser is Script, Test { vm.serializeAddress(deployed_addresses, "eigenPodBeacon", address(eigenPodBeacon)); vm.serializeAddress(deployed_addresses, "eigenPodImplementation", address(eigenPodImplementation)); vm.serializeAddress(deployed_addresses, "baseStrategyImplementation", address(baseStrategyImplementation)); - vm.serializeAddress(deployed_addresses, "emptyContract", address(emptyContract)); string memory deployed_addresses_output = vm.serializeString( deployed_addresses, "strategies", diff --git a/contracts/script/output/sepolia/alignedlayer_deployment_output.json b/contracts/script/output/sepolia/alignedlayer_deployment_output.json index 406321362d..6e4730ce64 100644 --- a/contracts/script/output/sepolia/alignedlayer_deployment_output.json +++ b/contracts/script/output/sepolia/alignedlayer_deployment_output.json @@ -1,32 +1,32 @@ { "addresses": { - "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" + "alignedLayerProxyAdmin": "0xD259905A51e99585fA5b44A696C9129Db36460C8", + "alignedLayerServiceManager": "0xFf731AB7b3653dc66878DC77E851D174f472d137", + "alignedLayerServiceManagerImplementation": "0x35cc2385B8F76332a7160e86E78894F7f0ab5259", + "blsApkRegistry": "0x33b541E0C2725eEa4FB61F5f0E40ef84e764A228", + "blsApkRegistryImplementation": "0xdFAdF9DCb5a69Da4466122A08E8fd3f0d5C87F63", + "indexRegistry": "0xA5EA732c82f51Bcbff4021c1F6EA3853B6565347", + "indexRegistryImplementation": "0x5709C66752789932C95b1EF7A516e97106AC67bB", + "operatorStateRetriever": "0xE4BDE5A267a44444E2808c60B4Abf89e74f552c6", + "pauserRegistry": "0x2C2a377F95F06c6b8F5a838244Cd7B0e8F680717", + "registryCoordinator": "0x0Ef1920F089DD02d3A28BF2e34342FD3E74160A3", + "registryCoordinatorImplementation": "0x7f7F66B3FbeaFeF6e7F4219F2fa807808d854125", + "serviceManagerRouter": "0xb30aD4Fe5Fc5424670828Ee0D1d740A588644210", + "stakeRegistry": "0xe87cB8f9C74264BD446835F899e15c3AE1209C34", + "stakeRegistryImplementation": "0x83286078696eE5F6833701c94Ba7E4B2A6bCddb6", + "batcherPaymentService": "0x403dE630751e148bD71BFFcE762E5667C0825399", + "batcherPaymentServiceImplementation": "0xCDafa6c553AFE700964Adf04B577517b2BAe8318" }, "chainInfo": { "chainId": 11155111, - "deploymentBlock": 7111030 + "deploymentBlock": 9062616 }, "permissions": { - "alignedLayerAggregator": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0", - "alignedLayerChurner": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0", - "alignedLayerEjector": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0", - "alignedLayerOwner": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0", - "alignedLayerPauser": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0", - "alignedLayerUpgrader": "0x1Fa835Be4f67eA84617F16917FaF54A4e336F9b0" + "alignedLayerAggregator": "0x1407a423FFaBcBC6ceEb0bbDf4cd093c860a3F62", + "alignedLayerChurner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "alignedLayerEjector": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "alignedLayerOwner": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "alignedLayerPauser": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106", + "alignedLayerUpgrader": "0x771C1aB81C81A774B66C4386Eb50D6DFC8538106" } } diff --git a/contracts/script/output/sepolia/batcher_deployment_output.json b/contracts/script/output/sepolia/batcher_deployment_output.json new file mode 100644 index 0000000000..c32e7dfb00 --- /dev/null +++ b/contracts/script/output/sepolia/batcher_deployment_output.json @@ -0,0 +1,6 @@ +{ + "addresses": { + "batcherPaymentService": "0x403dE630751e148bD71BFFcE762E5667C0825399", + "batcherPaymentServiceImplementation": "0xCDafa6c553AFE700964Adf04B577517b2BAe8318" + } +} diff --git a/contracts/script/output/sepolia/eigenlayer_deployment_output.json b/contracts/script/output/sepolia/eigenlayer_deployment_output.json index 3ded9a3c0f..8544bf9881 100644 --- a/contracts/script/output/sepolia/eigenlayer_deployment_output.json +++ b/contracts/script/output/sepolia/eigenlayer_deployment_output.json @@ -1,38 +1,39 @@ { "addresses": { - "avsDirectory": "0x2f1F293185c7b57E1E8e07B95C9f04D33418854c", - "avsDirectoryImplementation": "0x6DC4C39E3e6FC3bdbb054C6Cf87FEf8E33DBBCa9", - "baseStrategyImplementation": "0x942CfD2F80f517D6e6129277b027750D01Aa3Eb1", - "beaconOracle": "0x0000000000000000000000000000000000000000", - "delayedWithdrawalRouter": "0x02eE8752d9d6ee1B366BD04d24Bbaa3547ABc0c1", - "delayedWithdrawalRouterImplementation": "0x5FC324E99fb6db1859225C3E53b2688ce7FbF5E1", - "delegationManager": "0x7F250FA1f844Ae88eAdF919ca3a95e327B639d8F", - "delegationManagerImplementation": "0x77E8329dc5290Ef8BA61A997132316a39f731968", - "eigenLayerPauserReg": "0xC2316E03d0871f667e75C62181089988Eb4DB7Db", - "eigenLayerProxyAdmin": "0x3b9b847F251260d6681E2dF937E84Ae4Db1191e5", - "eigenPodBeacon": "0x879Fce476F58b5691a6AF29C2895e9fDF956642C", - "eigenPodImplementation": "0x953F32aE91ec538eBAD2110b3276dEDe9a886519", - "eigenPodManager": "0x1c49661c978c587d98a4dF730CfBaAeE8836d813", - "eigenPodManagerImplementation": "0xE3A2b29e35E878f24bcf46b3d53004aBD5105d99", - "emptyContract": "0xCf334DbB9bEefC53e3e9Fa0feb7319B702155408", - "rewardsCoordinator": "0x420324e8834D2bfF217319D497DDB2B221dea46C", - "rewardsCoordinatorImplementation": "0xF2Fdf5cDBd262DAE8aCF77f85fc1A7546B5FBa3D", - "slasher": "0xF953eDdb64b624FcEbb133f3D991BA05B122bEC8", - "slasherImplementation": "0xB4Fe2669dA4ee0A67E292F1f09d2b83E07C0fb26", - "strategies": { - "MOCK": "0x3eb924d928c138898FC089328f840105969bD6a0" - }, - "strategyManager": "0xAcd358E6CCdE1634A1e80F143cF467Bf40fac4BA", - "strategyManagerImplementation": "0x7A7122D7a5194217Be6181c76484dCc10E8BFf83" + "avsDirectory": "0xa789c91ECDdae96865913130B786140Ee17aF545", + "avsDirectoryImplementation": "0xD88b96998325c3e74A74a0B0938BBFeA1395C188", + "baseStrategyImplementation": "0x3BA4F6973D9ed2f0617C4b15d8CE06155fd6a43b", + "beaconOracle": "", + "delayedWithdrawalRouter": "", + "delayedWithdrawalRouterImplementation": "", + "delegationManager": "0xD4A7E1Bd8015057293f0D0A557088c286942e84b", + "delegationManagerImplementation": "0xa9821F0620D347648f375c597761C7FD16C1b823", + "eigenLayerPauserReg": "0x63AAe451780090f50Ad323aAEF155F63a29D20f3", + "eigenLayerProxyAdmin": "0x56E88cb4f0136fC27D95499dE4BE2acf47946Fa1", + "eigenPodBeacon": "0x0e19E56E41D42137d00dD4f51EC2F613E50cAcf4", + "eigenPodImplementation": "0x107339987a46F77598cB563bf63eb8a1C9f5b40e", + "eigenPodManager": "0x56BfEb94879F4543E756d26103976c567256034a", + "eigenPodManagerImplementation": "0x10848d61cE044bcAEE301a28A4C30Ad0a40e88Ae", + "emptyContract": "", + "rewardsCoordinator": "0x5ae8152fb88c26ff9ca5C014c94fca3c68029349", + "rewardsCoordinatorImplementation": "0xcC305562B01bec562D13A40ef8781e313AFE7940", + "strategies": "", + "strategyManager": "0x2E3D6c0744b10eb0A4e6F679F71554a39Ec47a5D", + "strategyManagerImplementation": "0xf0A8735c26121e6C488ebac65c8fa3fe37cBFCB3", + "allocationManager": "0x42583067658071247ec8CE0A516A58f682002d07", + "allocationManagerImplementation": "0xB87AeeA46BB3a3050D277272E33b011922537Db7", + "permissionController": "0x44632dfBdCb6D3E21EF613B0ca8A6A0c618F5a37", + "permissionControllerImplementation": "0x59B11b191B572888703E150E45F5015e0fFcf525", + "keyRegistrar": "0xA4dB30D08d8bbcA00D40600bee9F029984dB162a", + "keyRegistrarImplementation": "0xe61E638650DC91Fe0f59bBBf5315517337d687CD" }, "chainInfo": { "chainId": 11155111, "deploymentBlock": 6200286 }, - "numStrategies": 1, "parameters": { - "executorMultisig": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D", - "operationsMultisig": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D", - "pauserMultisig": "0x97aEC5F28181abe5d2aD40dBe7FbaEe014529b7D" + "executorMultisig": "0x4FDA8998EC3b7d4b4A612d45FeB8fB36734470f2", + "operationsMultisig": "0xb094Ba769b4976Dc37fC689A76675f31bc4923b0", + "pauserMultisig": "0x0B415f75980D863872C3eb8caa76E6eC8Bc81536" } -} \ No newline at end of file +} diff --git a/contracts/script/output/sepolia/proof_aggregation_service_deployment_output.json b/contracts/script/output/sepolia/proof_aggregation_service_deployment_output.json new file mode 100644 index 0000000000..b19b25162e --- /dev/null +++ b/contracts/script/output/sepolia/proof_aggregation_service_deployment_output.json @@ -0,0 +1,6 @@ +{ + "addresses": { + "alignedProofAggregationService": "0xb5D46304c30B1AeB3a8Da6ab599c336f7946C8A4", + "alignedProofAggregationServiceImplementation": "0x0Fc3e5639980BEd39016a3B34e4aa18857934BEb" + } +} diff --git a/contracts/scripts/deploy_batcher_payment_service.sh b/contracts/scripts/deploy_batcher_payment_service.sh index 5bd1220ace..e7c6c41f01 100755 --- a/contracts/scripts/deploy_batcher_payment_service.sh +++ b/contracts/scripts/deploy_batcher_payment_service.sh @@ -20,7 +20,8 @@ forge script script/deploy/BatcherPaymentServiceDeployer.s.sol \ --legacy \ --verify \ --etherscan-api-key $ETHERSCAN_API_KEY \ - --sig "run(string memory batcherConfigPath, string memory outputPath)" + --sig "run(string memory batcherConfigPath, string memory outputPath)" \ + --slow # Extract the batcher payment service values from the output batcher_payment_service_proxy=$(jq -r '.addresses.batcherPaymentService' $BATCHER_PAYMENT_SERVICE_OUTPUT_PATH) diff --git a/contracts/scripts/deploy_proof_aggregator.sh b/contracts/scripts/deploy_proof_aggregator.sh index 8bc0107b44..22db6ab8e5 100644 --- a/contracts/scripts/deploy_proof_aggregator.sh +++ b/contracts/scripts/deploy_proof_aggregator.sh @@ -5,10 +5,12 @@ # PROOF_AGGREGATOR_DEPLOY_CONFIG_PATH: Path to the proof aggregator deploy config file # - Holesky Stage: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.stage.json # - Holesky Prod: ./script/deploy/config/holesky/proof-aggregator-service.holesky.config.json +# - Sepolia: ./script/deploy/config/sepolia/proof-aggregator-service.sepolia.config.json # # PROOF_AGGREGATOR_OUTPUT_PATH: Path to the proof aggregator output file # - Holesky Stage: ./script/output/holesky/proof_aggregation_service_deployment_output.stage.json # - Holesky Prod: ./script/output/holesky/proof_aggregation_service_deployment_output.json +# - Sepolia: ./script/output/sepolia/proof_aggregation_service_deployment_output.json # # RPC_URL: The RPC URL to connect to the Ethereum network # diff --git a/crates/Cargo.lock b/crates/Cargo.lock index 744392b748..5ed416f56f 100644 --- a/crates/Cargo.lock +++ b/crates/Cargo.lock @@ -103,7 +103,6 @@ dependencies = [ "bytes", "ciborium", "clap", - "dashmap", "dotenvy", "env_logger", "ethers", @@ -2040,20 +2039,6 @@ dependencies = [ "syn 2.0.100", ] -[[package]] -name = "dashmap" -version = "6.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" -dependencies = [ - "cfg-if", - "crossbeam-utils", - "hashbrown 0.14.5", - "lock_api", - "once_cell", - "parking_lot_core", -] - [[package]] name = "dashu" version = "0.4.2" diff --git a/crates/cli/src/main.rs b/crates/cli/src/main.rs index a9778cbda2..f782ca994b 100644 --- a/crates/cli/src/main.rs +++ b/crates/cli/src/main.rs @@ -382,6 +382,7 @@ enum NetworkNameArg { HoleskyStage, Mainnet, MainnetStage, + Sepolia, } impl FromStr for NetworkNameArg { @@ -394,8 +395,9 @@ impl FromStr for NetworkNameArg { "holesky-stage" => Ok(NetworkNameArg::HoleskyStage), "mainnet" => Ok(NetworkNameArg::Mainnet), "mainnet-stage" => Ok(NetworkNameArg::MainnetStage), + "sepolia" => Ok(NetworkNameArg::Sepolia), _ => Err( - "Unknown network. Possible values: devnet, holesky, holesky-stage, mainnet, mainnet-stage" + "Unknown network. Possible values: devnet, holesky, holesky-stage, mainnet, mainnet-stage, sepolia" .to_string(), ), } @@ -408,7 +410,7 @@ struct NetworkArg { name = "The working network's name", long = "network", default_value = "devnet", - help = "[possible values: devnet, holesky, holesky-stage, mainnet, mainnet-stage]" + help = "[possible values: devnet, holesky, holesky-stage, mainnet, mainnet-stage, sepolia]" )] network: Option, @@ -462,6 +464,7 @@ impl From for Network { Some(NetworkNameArg::HoleskyStage) => Network::HoleskyStage, Some(NetworkNameArg::Mainnet) => Network::Mainnet, Some(NetworkNameArg::MainnetStage) => Network::MainnetStage, + Some(NetworkNameArg::Sepolia) => Network::Sepolia, } } } @@ -635,6 +638,7 @@ async fn main() -> Result<(), AlignedError> { Network::MainnetStage => { "https://mainnetstage.explorer.alignedlayer.com/batches/0x" } + Network::Sepolia => "https://sepolia.explorer.alignedlayer.com/batches/0x", Network::Devnet => "http://localhost:4000/batches/0x", _ => "http://localhost:4000/batches/0x", }; diff --git a/crates/sdk/src/common/constants.rs b/crates/sdk/src/common/constants.rs index e27293698c..08c1c40a7e 100644 --- a/crates/sdk/src/common/constants.rs +++ b/crates/sdk/src/common/constants.rs @@ -61,6 +61,8 @@ pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET: &str = "0xb0567184A52cB40956df6333510d6eF35B89C8de"; pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE: &str = "0x88ad27EfBeF16b6fC5b2E40c5155d61876f847c5"; +pub const BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA: &str = + "0x403dE630751e148bD71BFFcE762E5667C0825399"; /// AlignedServiceManager pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"; @@ -70,6 +72,7 @@ pub const ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE: &str = pub const ALIGNED_SERVICE_MANAGER_MAINNET: &str = "0xeF2A435e5EE44B2041100EF8cbC8ae035166606c"; pub const ALIGNED_SERVICE_MANAGER_MAINNET_STAGE: &str = "0x96b6a29D7B98519Ae66E6398BD27A76B30a5dC3f"; +pub const ALIGNED_SERVICE_MANAGER_SEPOLIA: &str = "0xFf731AB7b3653dc66878DC77E851D174f472d137"; // AlignedProofAggregationService pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET: &str = "0x0"; @@ -80,6 +83,8 @@ pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY: &str = "0xe84CD4084d8131841CE6DC265361f81F4C59a1d4"; pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_DEVNET: &str = "0xFD471836031dc5108809D173A067e8486B9047A3"; +pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA: &str = + "0xb5D46304c30B1AeB3a8Da6ab599c336f7946C8A4"; /// Batcher URL's pub const BATCHER_URL_DEVNET: &str = "ws://localhost:8080"; @@ -87,3 +92,4 @@ pub const BATCHER_URL_HOLESKY: &str = "wss://batcher.alignedlayer.com"; pub const BATCHER_URL_HOLESKY_STAGE: &str = "wss://stage.batcher.alignedlayer.com"; pub const BATCHER_URL_MAINNET: &str = "wss://mainnet.batcher.alignedlayer.com"; pub const BATCHER_URL_MAINNET_STAGE: &str = "wss://mainnetstage.batcher.alignedlayer.com"; +pub const BATCHER_URL_SEPOLIA: &str = "wss://sepolia.batcher.alignedlayer.com"; diff --git a/crates/sdk/src/common/types.rs b/crates/sdk/src/common/types.rs index 2129ac38f1..11f4fc0f79 100644 --- a/crates/sdk/src/common/types.rs +++ b/crates/sdk/src/common/types.rs @@ -21,13 +21,15 @@ use sha3::{Digest, Keccak256}; use super::constants::{ ALIGNED_PROOF_AGG_SERVICE_ADDRESS_DEVNET, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY_STAGE, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET, - ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE, ALIGNED_SERVICE_MANAGER_DEVNET, - ALIGNED_SERVICE_MANAGER_HOLESKY, ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE, - ALIGNED_SERVICE_MANAGER_MAINNET, ALIGNED_SERVICE_MANAGER_MAINNET_STAGE, + ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE, ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA, + ALIGNED_SERVICE_MANAGER_DEVNET, ALIGNED_SERVICE_MANAGER_HOLESKY, + ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE, ALIGNED_SERVICE_MANAGER_MAINNET, + ALIGNED_SERVICE_MANAGER_MAINNET_STAGE, ALIGNED_SERVICE_MANAGER_SEPOLIA, BATCHER_PAYMENT_SERVICE_ADDRESS_DEVNET, BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY, BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY_STAGE, BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET, - BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE, BATCHER_URL_DEVNET, BATCHER_URL_HOLESKY, - BATCHER_URL_HOLESKY_STAGE, BATCHER_URL_MAINNET, BATCHER_URL_MAINNET_STAGE, + BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE, BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA, + BATCHER_URL_DEVNET, BATCHER_URL_HOLESKY, BATCHER_URL_HOLESKY_STAGE, BATCHER_URL_MAINNET, + BATCHER_URL_MAINNET_STAGE, BATCHER_URL_SEPOLIA, }; use super::errors::VerifySignatureError; @@ -447,6 +449,7 @@ pub enum Network { HoleskyStage, Mainnet, MainnetStage, + Sepolia, Custom(String, String, String), } @@ -458,6 +461,7 @@ impl Network { Self::HoleskyStage => H160::from_str(ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE).unwrap(), Self::Mainnet => H160::from_str(ALIGNED_SERVICE_MANAGER_MAINNET).unwrap(), Self::MainnetStage => H160::from_str(ALIGNED_SERVICE_MANAGER_MAINNET_STAGE).unwrap(), + Self::Sepolia => H160::from_str(ALIGNED_SERVICE_MANAGER_SEPOLIA).unwrap(), Self::Custom(s, _, _) => H160::from_str(s.as_str()).unwrap(), } } @@ -473,6 +477,7 @@ impl Network { Self::MainnetStage => { H160::from_str(BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE).unwrap() } + Self::Sepolia => H160::from_str(BATCHER_PAYMENT_SERVICE_ADDRESS_SEPOLIA).unwrap(), Self::Custom(_, s, _) => H160::from_str(s.as_str()).unwrap(), } } @@ -488,6 +493,7 @@ impl Network { Self::MainnetStage => { H160::from_str(ALIGNED_PROOF_AGG_SERVICE_ADDRESS_MAINNET_STAGE).unwrap() } + Self::Sepolia => H160::from_str(ALIGNED_PROOF_AGG_SERVICE_ADDRESS_SEPOLIA).unwrap(), Self::Custom(_, s, _) => H160::from_str(s.as_str()).unwrap(), } } @@ -499,6 +505,7 @@ impl Network { Self::HoleskyStage => BATCHER_URL_HOLESKY_STAGE, Self::Mainnet => BATCHER_URL_MAINNET, Self::MainnetStage => BATCHER_URL_MAINNET_STAGE, + Self::Sepolia => BATCHER_URL_SEPOLIA, Self::Custom(_, _, s) => s.as_str(), } } diff --git a/explorer/lib/explorer/contract_managers/aligned_layer_service_manager.ex b/explorer/lib/explorer/contract_managers/aligned_layer_service_manager.ex index a3d9d61d92..1f7ddeac96 100644 --- a/explorer/lib/explorer/contract_managers/aligned_layer_service_manager.ex +++ b/explorer/lib/explorer/contract_managers/aligned_layer_service_manager.ex @@ -8,6 +8,7 @@ defmodule AlignedLayerServiceManager do "devnet" -> Logger.debug("Running on devnet") "holesky" -> Logger.debug("Running on holesky") "mainnet" -> Logger.debug("Running on mainnet") + "sepolia" -> Logger.debug("Running on sepolia") _ -> Logger.debug("Invalid ENVIRONMENT var in .env") nil -> raise("Invalid ENVIRONMENT var in .env") end @@ -38,6 +39,7 @@ defmodule AlignedLayerServiceManager do "devnet" -> 0 "holesky" -> 1_728_056 "mainnet" -> 19_000_000 + "sepolia" -> 9_062_616 _ -> raise("Invalid environment") end) diff --git a/explorer/lib/explorer/contract_managers/batcher_payment_service_manager.ex b/explorer/lib/explorer/contract_managers/batcher_payment_service_manager.ex index 1926310fa2..a5b096d4a7 100644 --- a/explorer/lib/explorer/contract_managers/batcher_payment_service_manager.ex +++ b/explorer/lib/explorer/contract_managers/batcher_payment_service_manager.ex @@ -8,6 +8,7 @@ defmodule BatcherPaymentServiceManager do "devnet" -> 0 "holesky" -> 1_728_056 "mainnet" -> 19_000_000 + "sepolia" -> 9_062_616 _ -> raise("Invalid environment") end) diff --git a/explorer/lib/explorer/contract_managers/delegation_manager.ex b/explorer/lib/explorer/contract_managers/delegation_manager.ex index 0975245ebb..fc52683db1 100644 --- a/explorer/lib/explorer/contract_managers/delegation_manager.ex +++ b/explorer/lib/explorer/contract_managers/delegation_manager.ex @@ -7,6 +7,7 @@ defmodule DelegationManager do "devnet" -> 0 "holesky" -> 1_210_000 "mainnet" -> 19_000_000 + "sepolia" -> 9_062_616 _ -> raise("Invalid environment") end) diff --git a/explorer/lib/explorer_web/components/nav.ex b/explorer/lib/explorer_web/components/nav.ex index 4f460a88ce..d29118e948 100644 --- a/explorer/lib/explorer_web/components/nav.ex +++ b/explorer/lib/explorer_web/components/nav.ex @@ -5,9 +5,10 @@ defmodule NavComponent do Helpers.get_aligned_networks() |> Enum.filter(fn {name, _link} -> case current_network do - # Filter dev networks if we are in mainnet or holesky - "Mainnet" -> name in ["Mainnet", "Holesky"] - "Holesky" -> name in ["Mainnet", "Holesky"] + # Filter dev networks if we are in mainnet, holesky, or sepolia + "Mainnet" -> name in ["Mainnet", "Holesky", "Sepolia"] + "Holesky" -> name in ["Mainnet", "Holesky", "Sepolia"] + "Sepolia" -> name in ["Mainnet", "Holesky", "Sepolia"] _ -> true end end) diff --git a/explorer/lib/explorer_web/live/utils.ex b/explorer/lib/explorer_web/live/utils.ex index 08804cc062..2867017df9 100644 --- a/explorer/lib/explorer_web/live/utils.ex +++ b/explorer/lib/explorer_web/live/utils.ex @@ -123,6 +123,7 @@ defmodule ExplorerWeb.Helpers do case prefix do "holesky" -> "https://holesky.eigenlayer.xyz" "mainnet" -> "https://app.eigenlayer.xyz" + "sepolia" -> "https://sepolia.eigenlayer.xyz" _ -> "http://localhost:4000" end end @@ -134,6 +135,7 @@ defmodule ExplorerWeb.Helpers do [ {"Mainnet", "https://explorer.alignedlayer.com"}, {"Holesky", "https://holesky.explorer.alignedlayer.com"}, + {"Sepolia", "https://sepolia.explorer.alignedlayer.com"}, {"Stage", "https://stage.explorer.alignedlayer.com"}, {"Devnet", "http://localhost:4000/"} ] @@ -143,6 +145,7 @@ defmodule ExplorerWeb.Helpers do case host do "explorer.alignedlayer.com" -> "Mainnet" "holesky.explorer.alignedlayer.com" -> "Holesky" + "sepolia.explorer.alignedlayer.com" -> "Sepolia" "stage.explorer.alignedlayer.com" -> "Stage" _ -> "Devnet" end @@ -160,6 +163,7 @@ defmodule ExplorerWeb.Helpers do case prefix do "mainnet" -> "https://etherscan.io" "holesky" -> "https://holesky.etherscan.io" + "sepolia" -> "https://sepolia.etherscan.io" _ -> "http://localhost:4000" end end @@ -176,6 +180,7 @@ defmodule ExplorerWeb.Helpers do case prefix do "mainnet" -> "https://blobscan.com/" "holesky" -> "https://holesky.blobscan.com/" + "sepolia" -> "https://sepolia.blobscan.com/" _ -> "http://localhost:4000" end end diff --git a/infra/aggregation_mode/aggregation_mode.sh b/infra/aggregation_mode/aggregation_mode.sh index 07151bc5b3..f69a91ed29 100755 --- a/infra/aggregation_mode/aggregation_mode.sh +++ b/infra/aggregation_mode/aggregation_mode.sh @@ -109,7 +109,7 @@ read -p "Enter a block number for SP1 (last_aggregated_block): " num && echo "{\ read -p "Enter a block number for Risc0 (last_aggregated_block): " num && echo "{\"last_aggregated_block\":$num}" > $HOME/config/proof-aggregator-risc0.last_aggregated_block.json # Build the proof_aggregator -make install_aggregation_mode +make proof_aggregator_install # Copy run script cp ./infra/aggregation_mode/run.sh $HOME/run.sh diff --git a/infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml b/infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml index 1865bbb3e6..929124059d 100644 --- a/infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml +++ b/infra/aggregation_mode/config-proof-aggregator-risc0.template.yaml @@ -4,6 +4,14 @@ eth_rpc_url: eth_ws_url: max_proofs_in_queue: 1000 last_aggregated_block_filepath: /home/user/config/proof-aggregator-risc0.last_aggregated_block.json +proofs_per_chunk: 512 # Amount of proofs to process per chunk +# This number comes from the blob data limit +# Since each blob has a capacity of (4096 * 32) = 131.072 bytes +# But to not surpass the field modulus we pad with a 0xo byte so we have (4096 * 31) = 126.976 bytes +# of usable data +# Since each proof commitments takes 32 bytes hash +# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob +total_proofs_limit: 3968 ecdsa: private_key_store_path: diff --git a/infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml b/infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml index 8456cd77a9..d55f7e28f6 100644 --- a/infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml +++ b/infra/aggregation_mode/config-proof-aggregator-sp1.template.yaml @@ -4,6 +4,14 @@ eth_rpc_url: eth_ws_url: max_proofs_in_queue: 1000 last_aggregated_block_filepath: /home/user/config/proof-aggregator-sp1.last_aggregated_block.json +proofs_per_chunk: 512 # Amount of proofs to process per chunk +# This number comes from the blob data limit +# Since each blob has a capacity of (4096 * 32) = 131.072 bytes +# But to not surpass the field modulus we pad with a 0xo byte so we have (4096 * 31) = 126.976 bytes +# of usable data +# Since each proof commitments takes 32 bytes hash +# We can aggregate as much proofs as 126.976 / 32 = 3968 per blob +total_proofs_limit: 3968 ecdsa: private_key_store_path: diff --git a/infra/aggregation_mode/run.sh b/infra/aggregation_mode/run.sh index 8edf89fc3a..6034e18c42 100644 --- a/infra/aggregation_mode/run.sh +++ b/infra/aggregation_mode/run.sh @@ -6,10 +6,10 @@ echo "Starting Aggregation Mode in $SLEEP seconds..." sleep $SLEEP echo "Starting SP1 Aggregation Mode..." -AGGREGATOR=sp1 SP1_PROVER=cuda /home/user/.cargo/bin/proof_aggregator /home/user/config/config-proof-aggregator-sp1.yaml +AGGREGATOR=sp1 SP1_PROVER=cuda /home/user/.cargo/bin/proof_aggregator_gpu /home/user/config/config-proof-aggregator-sp1.yaml docker stop $(docker ps -a -q) ## stop all containers echo "SP1 Aggregation Mode finished" echo "Starting Risc0 Aggregation Mode..." -AGGREGATOR=risc0 /home/user/.cargo/bin/proof_aggregator /home/user/config/config-proof-aggregator-risc0.yaml +AGGREGATOR=risc0 /home/user/.cargo/bin/proof_aggregator_gpu /home/user/config/config-proof-aggregator-risc0.yaml echo "Risc0 Aggregation Mode finished" diff --git a/infra/ansible/README.md b/infra/ansible/README.md index 86ed5f859a..b57a2f552d 100644 --- a/infra/ansible/README.md +++ b/infra/ansible/README.md @@ -57,7 +57,7 @@ The `caddy-batcher.ini` contains the following variables: Deploy the Batcher: ```shell -make ansible_batcher_deploy INVENTORY= KEYSTORE= +make ansible_batcher_deploy INVENTORY= ``` ## Operator @@ -160,10 +160,8 @@ The `config-aggregator.ini` contains the variables to run the Operator in Aligne Deploy the Aggregator: ```shell -make ansible_aggregator_deploy INVENTORY= ECDSA_KEYSTORE= BLS_KEYSTORE= +make ansible_aggregator_deploy INVENTORY= ``` -> [!Note] -> ECDSA_KEYSTORE and BLS_KEYSTORE are the paths of the keystores in your machine. ## Telemetry To deploy the Telemetry Services you need to set some variables and then run the Telemetry playbook diff --git a/infra/ansible/playbooks/aggregator.yaml b/infra/ansible/playbooks/aggregator.yaml index 0cd8306869..f2afecabfc 100644 --- a/infra/ansible/playbooks/aggregator.yaml +++ b/infra/ansible/playbooks/aggregator.yaml @@ -38,7 +38,7 @@ git: repo: https://github.com/yetanotherco/aligned_layer.git dest: /home/{{ ansible_user }}/repos/{{ service }}/aligned_layer - version: v0.10.2 + version: 2065-feat-sepolia-deployment loop: - aggregator @@ -50,20 +50,6 @@ group: '{{ ansible_user }}' recurse: yes - - name: Copy ECDSA keystore to server - copy: - src: '{{ ecdsa_keystore_path }}' - dest: /home/{{ ansible_user }}/.keystores/aggregator.ecdsa - owner: '{{ ansible_user }}' - group: '{{ ansible_user }}' - - - name: Copy BLS keystore to server - copy: - src: '{{ bls_keystore_path }}' - dest: /home/{{ ansible_user }}/.keystores/aggregator.bls - owner: '{{ ansible_user }}' - group: '{{ ansible_user }}' - - name: Build aggregator shell: chdir: /home/{{ ansible_user }}/repos/aggregator/aligned_layer/ @@ -114,8 +100,3 @@ state: started enabled: true scope: user - - - name: Run node_exporter playbook - ansible.builtin.import_playbook: node_exporter.yaml - vars: - host: aggregator diff --git a/infra/ansible/playbooks/batcher.yaml b/infra/ansible/playbooks/batcher.yaml index 2926c1bdba..d1b463c7f7 100644 --- a/infra/ansible/playbooks/batcher.yaml +++ b/infra/ansible/playbooks/batcher.yaml @@ -52,7 +52,7 @@ ansible.builtin.git: repo: https://github.com/yetanotherco/aligned_layer.git dest: /home/{{ ansible_user }}/repos/batcher/aligned_layer - version: v0.10.2 + version: 2065-feat-sepolia-deployment recursive: false # Build the batcher @@ -66,7 +66,7 @@ - name: Install batcher make: chdir: /home/{{ ansible_user }}/repos/batcher/aligned_layer - target: install_batcher + target: batcher_install environment: PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin:/home/{{ ansible_user }}/.cargo/bin" @@ -118,13 +118,6 @@ ansible_ssh_user: "{{ admin_user }}" batcher_domain: "{{ lookup('ini', 'batcher_domain', file='ini/caddy-batcher.ini') }}" - - name: Copy keystore to server - ansible.builtin.copy: - src: '{{ keystore_path }}' - dest: /home/{{ ansible_user }}/.keystores/batcher - owner: '{{ ansible_user }}' - group: '{{ ansible_user }}' - - name: Start Batcher service ansible.builtin.systemd_service: name: batcher @@ -139,8 +132,3 @@ state: restarted vars: ansible_ssh_user: "{{ admin_user }}" - - - name: Run node_exporter playbook - ansible.builtin.import_playbook: node_exporter.yaml - vars: - host: batcher diff --git a/infra/ansible/playbooks/caddy.yaml b/infra/ansible/playbooks/caddy.yaml new file mode 100644 index 0000000000..c5205953df --- /dev/null +++ b/infra/ansible/playbooks/caddy.yaml @@ -0,0 +1,87 @@ +- name: Caddy Setup + hosts: "{{ host }}" + + tasks: + - name: Allow http/https traffic on UFW + become: true + ufw: + rule: allow + state: enabled + port: '{{ item }}' + loop: + - http + - https + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Install dependencies for Caddy + become: true + apt: + name: + - debian-keyring + - debian-archive-keyring + - apt-transport-https + - curl + state: present + update_cache: yes + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Download and install Caddy GPG key + shell: + cmd: curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg + creates: /usr/share/keyrings/caddy-stable-archive-keyring.gpg + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Add Caddy repository + shell: + cmd: curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list + creates: /etc/apt/sources.list.d/caddy-stable.list + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Download and install XCaddy GPG key + shell: + cmd: curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg + creates: /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Add XCaddy repository + shell: + cmd: curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list + creates: /etc/apt/sources.list.d/caddy-xcaddy.list + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Install Caddy and XCaddy + become: true + apt: + update_cache: yes + name: + - caddy + - xcaddy + state: present + vars: + ansible_ssh_user: "{{ admin_user }}" + + - name: Build Cloudflare DNS module for caddy + shell: + cmd: | + xcaddy build --with github.com/caddy-dns/cloudflare + sudo mv /home/{{ ansible_ssh_user }}/caddy /usr/bin/caddy + chdir: /home/{{ ansible_ssh_user }}/ + vars: + ansible_ssh_user: "{{ admin_user }}" + environment: + PATH: "{{ ansible_env.PATH }}:/usr/local/go/bin" + + - name: Enable caddy + become: true + systemd_service: + name: caddy + enabled: true + state: started + vars: + ansible_ssh_user: "{{ admin_user }}" diff --git a/infra/ansible/playbooks/explorer.yaml b/infra/ansible/playbooks/explorer.yaml index dec8cb265b..1cc928399c 100644 --- a/infra/ansible/playbooks/explorer.yaml +++ b/infra/ansible/playbooks/explorer.yaml @@ -45,7 +45,8 @@ ansible.builtin.git: repo: https://github.com/yetanotherco/aligned_layer dest: "/home/{{ ansible_user }}/repos/explorer/aligned_layer" - update: yes + version: 2065-feat-sepolia-deployment + recursive: false - name: Create .ssl directory file: @@ -86,6 +87,8 @@ BATCH_TTL_MINUTES: "{{ lookup('ini', 'BATCH_TTL_MINUTES file=ini/config-explorer.ini') }}" SCHEDULED_BATCH_INTERVAL_MINUTES: "{{ lookup('ini', 'SCHEDULED_BATCH_INTERVAL_MINUTES file=ini/config-explorer.ini') }}" LATEST_RELEASE: "{{ lookup('ini', 'LATEST_RELEASE file=ini/config-explorer.ini') }}" + BEACON_CLIENT: "{{ lookup('ini', 'BEACON_CLIENT file=ini/config-explorer.ini') }}" + ALIGNED_PROOF_AGG_CONFIG_FILE: "{{ lookup('ini', 'ALIGNED_PROOF_AGG_CONFIG_FILE file=ini/config-explorer.ini') }}" - name: Build the explorer release args: diff --git a/infra/ansible/playbooks/grafana.yaml b/infra/ansible/playbooks/grafana.yaml index 7f7e55cd3c..876ce8484f 100644 --- a/infra/ansible/playbooks/grafana.yaml +++ b/infra/ansible/playbooks/grafana.yaml @@ -63,7 +63,7 @@ git: repo: https://github.com/yetanotherco/aligned_layer.git dest: /home/{{ ansible_user }}/repos/telemetry/aligned_layer - version: v0.12.1 + version: 2065-feat-sepolia-deployment recursive: false - name: Ensure /etc/grafana/provisioning directory exists diff --git a/infra/ansible/playbooks/ini/caddy-batcher.ini.example b/infra/ansible/playbooks/ini/caddy-batcher.ini.example new file mode 100644 index 0000000000..0d202f5277 --- /dev/null +++ b/infra/ansible/playbooks/ini/caddy-batcher.ini.example @@ -0,0 +1,2 @@ +[global] +batcher_domain= diff --git a/infra/ansible/playbooks/ini/config-explorer.ini.example b/infra/ansible/playbooks/ini/config-explorer.ini.example index 2d2d3a1f2c..eb175a53ca 100644 --- a/infra/ansible/playbooks/ini/config-explorer.ini.example +++ b/infra/ansible/playbooks/ini/config-explorer.ini.example @@ -15,3 +15,5 @@ CERTFILE_PATH= BATCH_TTL_MINUTES= SCHEDULED_BATCH_INTERVAL_MINUTES= LATEST_RELEASE= +BEACON_CLIENT= +ALIGNED_PROOF_AGG_CONFIG_FILE= diff --git a/infra/ansible/playbooks/ini/config-telemetry.ini.example b/infra/ansible/playbooks/ini/config-telemetry.ini.example index dd857dfd1a..bf5c9b732d 100644 --- a/infra/ansible/playbooks/ini/config-telemetry.ini.example +++ b/infra/ansible/playbooks/ini/config-telemetry.ini.example @@ -20,9 +20,15 @@ postgresql_telemetry_pass= cassandra_telemetry_user= cassandra_telemetry_pass= +telemetry_environment= +telemetry_aligned_config_file= telemetry_aligned_rpc= telemetry_api_phx_host= telemetry_api_elixir_hostname= telemetry_api_secret_key_base= pagerduty_routing_key= + +caddy_metrics_url= +caddy_telemetry_url= +caddy_jaeger_url= diff --git a/infra/ansible/playbooks/telemetry.yaml b/infra/ansible/playbooks/telemetry.yaml index 32fdb5f830..472b56abaf 100644 --- a/infra/ansible/playbooks/telemetry.yaml +++ b/infra/ansible/playbooks/telemetry.yaml @@ -34,7 +34,7 @@ vars: host: telemetry ini_file: ini/config-telemetry.ini - cassandra_version: 5.0.2 + cassandra_version: 5.0.5 - name: Run Jaeger playbook ansible.builtin.import_playbook: jaeger.yaml @@ -59,11 +59,44 @@ vars: host: telemetry +- name: Run webserver playbook + ansible.builtin.import_playbook: webserver.yaml + vars: + host: telemetry + - name: Setup Telemetry hosts: telemetry tasks: + - name: Add reverse proxy configuration to Caddyfile + become: true + blockinfile: + path: /etc/caddy/Caddyfile + block: | + {{ caddy_metrics_url }} { + reverse_proxy localhost:{{ caddy_metrics_port }} + } + {{ caddy_telemetry_url }} { + @whitelisted { + path /versions* + } + reverse_proxy @whitelisted localhost:{{ caddy_telemetry_port }} + } + {{ caddy_jaeger_url }} { + reverse_proxy localhost:{{ caddy_jaeger_port }} + } + create: yes + prepend_newline: true + vars: + ansible_ssh_user: "{{ admin_user }}" + caddy_metrics_url: "{{ lookup('ini', 'caddy_metrics_url file=ini/config-telemetry.ini') }}" + caddy_metrics_port: 3000 + caddy_telemetry_url: "{{ lookup('ini', 'caddy_telemetry_url file=ini/config-telemetry.ini') }}" + caddy_telemetry_port: 4001 + caddy_jaeger_url: "{{ lookup('ini', 'caddy_jaeger_url file=ini/config-telemetry.ini') }}" + caddy_jaeger_port: 16686 + - name: Make sure /etc/default/tailscaled exists become: true file: @@ -72,11 +105,23 @@ vars: ansible_ssh_user: "{{ admin_user }}" + - name: Add permit to tailscale for caddy + become: true + lineinfile: + path: /etc/default/tailscaled + line: TS_PERMIT_CERT_UID=caddy + state: present + vars: + ansible_ssh_user: "{{ admin_user }}" + notify: + - Restart caddy + - Restart tailscale + - name: Clone Aligned repository ansible.builtin.git: repo: https://github.com/yetanotherco/aligned_layer.git dest: /home/{{ ansible_user }}/repos/telemetry/aligned_layer - version: v0.12.1 + version: 2065-feat-sepolia-deployment recursive: false - name: Run telemetry_compile_bls_verifier target @@ -94,7 +139,9 @@ postgresql_telemetry_db_name: "{{ lookup('ini', 'postgresql_telemetry_db_name file=ini/config-telemetry.ini') }}" postgresql_telemetry_user: "{{ lookup('ini', 'postgresql_telemetry_user file=ini/config-telemetry.ini') }}" postgresql_telemetry_pass: "{{ lookup('ini', 'postgresql_telemetry_pass file=ini/config-telemetry.ini') }}" + telemetry_environment: "{{ lookup('ini', 'telemetry_environment file=ini/config-telemetry.ini') }}" telemetry_aligned_rpc: "{{ lookup('ini', 'telemetry_aligned_rpc file=ini/config-telemetry.ini') }}" + telemetry_aligned_config_file: "{{ lookup('ini', 'telemetry_aligned_config_file file=ini/config-telemetry.ini') }}" telemetry_api_phx_host: "{{ lookup('ini', 'telemetry_api_phx_host file=ini/config-telemetry.ini') }}" telemetry_api_elixir_hostname: "{{ lookup('ini', 'telemetry_api_elixir_hostname file=ini/config-telemetry.ini') }}" telemetry_api_secret_key_base: "{{ lookup('ini', 'telemetry_api_secret_key_base file=ini/config-telemetry.ini') }}" @@ -147,6 +194,14 @@ scope: user handlers: + - name: Restart caddy + become: true + systemd_service: + name: caddy + state: restarted + vars: + ansible_ssh_user: "{{ admin_user }}" + - name: Restart tailscale become: true systemd_service: diff --git a/infra/ansible/playbooks/templates/caddy/Caddyfile.batcher.j2 b/infra/ansible/playbooks/templates/caddy/Caddyfile.batcher.j2 new file mode 100644 index 0000000000..282a865130 --- /dev/null +++ b/infra/ansible/playbooks/templates/caddy/Caddyfile.batcher.j2 @@ -0,0 +1,13 @@ +# The Caddyfile is an easy way to configure your Caddy web server. + +# To use your own domain name (with automatic HTTPS), first make +# sure your domain's A/AAAA DNS records are properly pointed to +# this machine's public IP, then replace ":80" below with your +# domain name. + +# Refer to the Caddy docs for more information: +# https://caddyserver.com/docs/caddyfile + +{{ batcher_domain }} { + reverse_proxy localhost:8080 +} diff --git a/infra/ansible/playbooks/templates/config-files/config-aggregator.yaml.j2 b/infra/ansible/playbooks/templates/config-files/config-aggregator.yaml.j2 index 49bb8a3c4d..ae62961bdf 100644 --- a/infra/ansible/playbooks/templates/config-files/config-aggregator.yaml.j2 +++ b/infra/ansible/playbooks/templates/config-files/config-aggregator.yaml.j2 @@ -21,7 +21,7 @@ bls: ## Aggregator Configurations aggregator: - server_ip_port_address: localhost:8090 + server_ip_port_address: 0.0.0.0:8090 bls_public_key_compendium_address: avs_service_manager_address: enable_metrics: {{ enable_metrics }} @@ -30,3 +30,11 @@ aggregator: garbage_collector_period: 2m #The period of the GC process. Suggested value for Prod: '168h' (7 days) garbage_collector_tasks_age: 20 #The age of tasks that will be removed by the GC, in blocks. Suggested value for prod: '216000' (30 days) garbage_collector_tasks_interval: 10 #The interval of queried blocks to get an old batch. Suggested value for prod: '900' (3 hours) + bls_service_task_timeout: 168h # The timeout of bls aggregation service tasks. Suggested value for prod '168h' (7 days) + gas_base_bump_percentage: 25 # Percentage to overestimate gas price when sending a task + gas_bump_incremental_percentage: 20 # An extra percentage to overestimate in each bump of respond to task. This is additive between tries + # Gas used formula = est_gas_by_node * (gas_base_bump_percentage + gas_bum_incremental_percentage * i) / 100, where i is the iteration number. + gas_bump_percentage_limit: 150 # The max percentage to bump the gas price. + # The Gas formula is percentage (gas_base_bump_percentage + gas_bump_incremental_percentage * i) / 100) is checked against this value + # If it is higher, it will default to `gas_bump_percentage_limit` + time_to_wait_before_bump: 72s # The time to wait for the receipt when responding to task. Suggested value 72 seconds (6 blocks) diff --git a/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 b/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 index e6f81bc202..0d8be3c723 100644 --- a/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 +++ b/infra/ansible/playbooks/templates/config-files/config-batcher.yaml.j2 @@ -22,7 +22,9 @@ batcher: batch_size_interval: 10 transaction_wait_timeout: 36000 # 3 blocks max_proof_size: 67108864 # 64 MiB - max_batch_size: 268435456 # 256 MiB + max_batch_byte_size: 268435456 # 256 MiB + max_batch_proof_qty: 3000 # 3000 proofs in a batch + max_queue_size: 10000 pre_verification_is_enabled: true eth_ws_reconnects: 99999999999999 metrics_port: 9093 diff --git a/infra/ansible/playbooks/templates/explorer/explorer_env.j2 b/infra/ansible/playbooks/templates/explorer/explorer_env.j2 index 27ab0fb36a..f0c53417e1 100644 --- a/infra/ansible/playbooks/templates/explorer/explorer_env.j2 +++ b/infra/ansible/playbooks/templates/explorer/explorer_env.j2 @@ -18,3 +18,6 @@ export CERTFILE_PATH={{ CERTFILE_PATH }} export BATCH_TTL_MINUTES={{ BATCH_TTL_MINUTES }} export SCHEDULED_BATCH_INTERVAL_MINUTES={{ SCHEDULED_BATCH_INTERVAL_MINUTES }} + +export BEACON_CLIENT={{ BEACON_CLIENT }} +export ALIGNED_PROOF_AGG_CONFIG_FILE={{ ALIGNED_PROOF_AGG_CONFIG_FILE }} diff --git a/infra/ansible/playbooks/templates/prometheus/prometheus.yaml.j2 b/infra/ansible/playbooks/templates/prometheus/prometheus.yaml.j2 index b6b8201626..3a55f4bfcf 100644 --- a/infra/ansible/playbooks/templates/prometheus/prometheus.yaml.j2 +++ b/infra/ansible/playbooks/templates/prometheus/prometheus.yaml.j2 @@ -14,28 +14,28 @@ alerting: # A scrape configuration containing exactly one endpoint to scrape. scrape_configs: - job_name: "aligned-aggregator" - scrape_interval: 1s + scrape_interval: 15s static_configs: - targets: [ "{{ prometheus_aggregator_ip }}" ] labels: bot: "aggregator" - job_name: "aligned-operator" - scrape_interval: 1s + scrape_interval: 15s static_configs: - targets: [ "{{ prometheus_operator_ip }}" ] labels: bot: "operator" - job_name: "aligned-batcher" - scrape_interval: 1s + scrape_interval: 15s static_configs: - targets: [ "{{ prometheus_batcher_ip }}" ] labels: bot: "batcher" - job_name: "aligned-tracker" - scrape_interval: 1s + scrape_interval: 15s static_configs: - targets: [ "{{ prometheus_tracker_ip }}" ] labels: diff --git a/infra/ansible/playbooks/templates/telemetry_api/telemetry_env.j2 b/infra/ansible/playbooks/templates/telemetry_api/telemetry_env.j2 index d8a812d15b..4775dcbaa4 100644 --- a/infra/ansible/playbooks/templates/telemetry_api/telemetry_env.j2 +++ b/infra/ansible/playbooks/templates/telemetry_api/telemetry_env.j2 @@ -1,7 +1,7 @@ # Network export RPC_URL="{{ telemetry_aligned_rpc }}" -export ENVIRONMENT=holesky -export ALIGNED_CONFIG_FILE="/home/{{ ansible_user }}/repos/telemetry/aligned_layer/contracts/script/output/mainnet/alignedlayer_deployment_output.json" +export ENVIRONMENT="{{ telemetry_environment }}" +export ALIGNED_CONFIG_FILE="{{ telemetry_aligned_config_file }}" # Elixir export PHX_HOST="{{ telemetry_api_phx_host }}" export ELIXIR_HOSTNAME="{{ telemetry_api_elixir_hostname }}" diff --git a/infra/ansible/sepolia-inventory.yaml b/infra/ansible/sepolia-inventory.yaml new file mode 100644 index 0000000000..422f21e655 --- /dev/null +++ b/infra/ansible/sepolia-inventory.yaml @@ -0,0 +1,39 @@ +aggregator: + hosts: + aligned-sepolia-aggregator: + ansible_host: aligned-sepolia-aggregator + admin_user: admin + ansible_user: app + ansible_python_interpreter: /usr/bin/python3 + +batcher: + hosts: + aligned-sepolia-batcher: + ansible_host: aligned-sepolia-batcher + admin_user: admin + ansible_user: app + ansible_python_interpreter: /usr/bin/python3 + +explorer: + hosts: + aligned-sepolia-explorer: + ansible_host: aligned-sepolia-explorer + admin_user: admin + ansible_user: app + ansible_python_interpreter: /usr/bin/python3 + +telemetry: + hosts: + aligned-sepolia-telemetry: + ansible_host: aligned-sepolia-telemetry + admin_user: admin + ansible_user: app + ansible_python_interpreter: /usr/bin/python3 + +operator: + hosts: + aligned-sepolia-operator-1: + ansible_host: aligned-sepolia-operator-1 + admin_user: admin + ansible_user: app + ansible_python_interpreter: /usr/bin/python3 diff --git a/telemetry_api/lib/telemetry_api/contract_managers/delegation_manager.ex b/telemetry_api/lib/telemetry_api/contract_managers/delegation_manager.ex index b3b5f73c60..2b3497c5a4 100644 --- a/telemetry_api/lib/telemetry_api/contract_managers/delegation_manager.ex +++ b/telemetry_api/lib/telemetry_api/contract_managers/delegation_manager.ex @@ -8,6 +8,7 @@ defmodule TelemetryApi.ContractManagers.DelegationManager do "devnet" -> 0 "holesky" -> 1_210_000 "mainnet" -> 19_000_000 + "sepolia" -> 9_062_616 _ -> raise("Invalid environment") end) diff --git a/telemetry_api/lib/telemetry_api/periodically.ex b/telemetry_api/lib/telemetry_api/periodically.ex index 21ba1639fd..67bf7cd31b 100644 --- a/telemetry_api/lib/telemetry_api/periodically.ex +++ b/telemetry_api/lib/telemetry_api/periodically.ex @@ -9,7 +9,7 @@ defmodule TelemetryApi.Periodically do @registered 1 @deregistered 2 - @wait_time_str System.get_env("OPERATOR_FETCHER_WAIT_TIME_MS") || + @wait_time_str "60000" || raise """ environment variable OPERATOR_FETCHER_WAIT_TIME_MS is missing. """