Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 26 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,11 @@ operator_set_eigen_sdk_go_version_error:
@echo "Error setting Eigen SDK version, missing ENVIRONMENT. Possible values for ENVIRONMENT=<devnet|testnet|mainnet>"
exit 1

operator_full_registration: operator_get_eth operator_register_with_eigen_layer operator_mint_mock_tokens operator_deposit_into_mock_strategy operator_whitelist_devnet operator_register_with_aligned_layer
operator_full_registration_base: operator_get_eth operator_register_with_eigen_layer operator_whitelist_devnet operator_mint_mock_tokens
operator_full_registration_weth: operator_full_registration_base operator_deposit_into_weth_strategy operator_register_with_aligned_layer_weth
operator_full_registration_ali: operator_full_registration_base operator_deposit_into_ali_strategy operator_register_with_aligned_layer_ali

operator_full_registration: operator_full_registration_base operator_deposit_into_weth_strategy operator_deposit_into_ali_strategy operator_register_with_aligned_layer_weth operator_register_with_aligned_layer_ali

operator_register_and_start: $(GET_SDK_VERSION) operator_full_registration operator_start

Expand Down Expand Up @@ -356,30 +360,40 @@ operator_remove_from_whitelist:
@echo "Removing operator $(OPERATOR_ADDRESS)"
@. contracts/scripts/.env && . contracts/scripts/operator_remove_from_whitelist.sh $(OPERATOR_ADDRESS)

operator_deposit_into_mock_strategy:
@echo "Depositing into mock strategy"
operator_deposit_into_weth_strategy:
@echo "Depositing into WETH strategy"
$(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.WETH' contracts/script/output/devnet/eigenlayer_deployment_output.json))
@go run operator/cmd/main.go deposit-into-strategy \
--config $(CONFIG_FILE) \
--strategy-address $(STRATEGY_ADDRESS) \
--amount 100000000000000000

operator_deposit_into_ali_strategy:
@echo "Depositing into ALI strategy"
$(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.ALI' contracts/script/output/devnet/eigenlayer_deployment_output.json))
@go run operator/cmd/main.go deposit-into-strategy \
--config $(CONFIG_FILE) \
--strategy-address $(STRATEGY_ADDRESS) \
--amount 100000000000000000


AMOUNT ?= 1000

operator_deposit_into_strategy:
@echo "Depositing into strategy"
@go run operator/cmd/main.go deposit-into-strategy \
operator_register_with_aligned_layer_weth:
@echo "Registering operator with AlignedLayer in quorum 0"
@go run operator/cmd/main.go register \
--config $(CONFIG_FILE) \
--strategy-address $(STRATEGY_ADDRESS) \
--amount $(AMOUNT)
--quorum-number 0

operator_register_with_aligned_layer:
@echo "Registering operator with AlignedLayer"
operator_register_with_aligned_layer_ali:
@echo "Registering operator with AlignedLayer in quorum 1"
@go run operator/cmd/main.go register \
--config $(CONFIG_FILE)
--config $(CONFIG_FILE) \
--quorum-number 1

operator_deposit_and_register_weth: operator_deposit_into_weth_strategy operator_register_with_aligned_layer_weth

operator_deposit_and_register: operator_deposit_into_strategy operator_register_with_aligned_layer
operator_deposit_and_register_ali: operator_deposit_into_ali_strategy operator_register_with_aligned_layer_ali


# The verifier ID to enable or disable corresponds to the index of the verifier in the `ProvingSystemID` enum.
Expand Down
4 changes: 2 additions & 2 deletions aggregation_mode/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ make start_proof_aggregator_gpu AGGREGATOR="sp1|risc0"
1. Get latest aggregated proof:

```shell
cast call 0xc351628EB244ec633d5f21fBD6621e1a683B1181 "currentAggregatedProofNumber()" --rpc-url http://localhost:8545
cast call 0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f "currentAggregatedProofNumber()" --rpc-url http://localhost:8545
```

2. Get aggregated proof info:

```shell
cast call 0xc351628EB244ec633d5f21fBD6621e1a683B1181 "getAggregatedProof(uint64)(uint8,bytes32,bytes32)" <AGG_PROOF_NUMBER> --rpc-url http://localhost:8545
cast call 0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f "getAggregatedProof(uint64)(uint8,bytes32,bytes32)" <AGG_PROOF_NUMBER> --rpc-url http://localhost:8545
```
12 changes: 6 additions & 6 deletions aggregator/pkg/aggregator.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ import (
)

// FIXME(marian): Read this from Aligned contract directly
const QUORUM_NUMBER = byte(0)
const QUORUM_THRESHOLD = byte(67)
const QuorumThreshold = byte(67)

var QuorumNums = eigentypes.QuorumNums{eigentypes.QuorumNum(0), eigentypes.QuorumNum(1)}
var QuorumThresholdPercentages = eigentypes.QuorumThresholdPercentages{eigentypes.QuorumThresholdPercentage(QuorumThreshold), eigentypes.QuorumThresholdPercentage(QuorumThreshold)}

// Aggregator stores TaskResponse for a task here
type TaskResponses = []types.SignedTaskResponse
Expand Down Expand Up @@ -337,6 +339,7 @@ func (agg *Aggregator) sendAggregatedResponse(batchIdentifierHash [32]byte, batc
batchIdentifierHash,
batchMerkleRoot,
senderAddress,
QuorumNums,
nonSignerStakesAndSignature,
agg.AggregatorConfig.Aggregator.GasBaseBumpPercentage,
agg.AggregatorConfig.Aggregator.GasBumpIncrementalPercentage,
Expand Down Expand Up @@ -407,10 +410,7 @@ func (agg *Aggregator) AddNewTask(batchMerkleRoot [32]byte, senderAddress [20]by
)
agg.nextBatchIndex += 1

quorumNums := eigentypes.QuorumNums{eigentypes.QuorumNum(QUORUM_NUMBER)}
quorumThresholdPercentages := eigentypes.QuorumThresholdPercentages{eigentypes.QuorumThresholdPercentage(QUORUM_THRESHOLD)}

err := agg.blsAggregationService.InitializeNewTaskWithWindow(batchIndex, taskCreatedBlock, quorumNums, quorumThresholdPercentages, agg.AggregatorConfig.Aggregator.BlsServiceTaskTimeout, 15*time.Second)
err := agg.blsAggregationService.InitializeNewTaskWithWindow(batchIndex, taskCreatedBlock, QuorumNums, QuorumThresholdPercentages, agg.AggregatorConfig.Aggregator.BlsServiceTaskTimeout, 15*time.Second)
if err != nil {
agg.logger.Fatalf("BLS aggregation service error when initializing new task: %s", err)
}
Expand Down
6 changes: 3 additions & 3 deletions batcher/aligned-sdk/src/common/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub const BUMP_MAX_RETRY_DELAY: u64 = 3600; // seconds
/// NETWORK ADDRESSES ///
/// BatcherPaymentService
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_DEVNET: &str =
"0x7969c5eD335650692Bc04293B07F5BF2e7A673C0";
"0xc351628EB244ec633d5f21fBD6621e1a683B1181";
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY: &str =
"0x815aeCA64a974297942D2Bbf034ABEe22a38A003";
pub const BATCHER_PAYMENT_SERVICE_ADDRESS_HOLESKY_STAGE: &str =
Expand All @@ -63,7 +63,7 @@ pub const BATCHER_PAYMENT_SERVICE_ADDRESS_MAINNET_STAGE: &str =
"0x88ad27EfBeF16b6fC5b2E40c5155d61876f847c5";

/// AlignedServiceManager
pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8";
pub const ALIGNED_SERVICE_MANAGER_DEVNET: &str = "0xf5059a5D33d5853360D16C683c16e67980206f36";
pub const ALIGNED_SERVICE_MANAGER_HOLESKY: &str = "0x58F280BeBE9B34c9939C3C39e0890C81f163B623";
pub const ALIGNED_SERVICE_MANAGER_HOLESKY_STAGE: &str =
"0x9C5231FC88059C086Ea95712d105A2026048c39B";
Expand All @@ -79,7 +79,7 @@ pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY_STAGE: &str =
pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_HOLESKY: &str =
"0xe84CD4084d8131841CE6DC265361f81F4C59a1d4";
pub const ALIGNED_PROOF_AGG_SERVICE_ADDRESS_DEVNET: &str =
"0xFD471836031dc5108809D173A067e8486B9047A3";
"0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f";

/// Batcher URL's
pub const BATCHER_URL_DEVNET: &str = "ws://localhost:8080";
Expand Down
4 changes: 2 additions & 2 deletions config-files/config-proof-aggregator-ethereum-package.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aligned_service_manager_address: "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"
proof_aggregation_service_address: "0xFD471836031dc5108809D173A067e8486B9047A3"
aligned_service_manager_address: "0xf5059a5D33d5853360D16C683c16e67980206f36"
proof_aggregation_service_address: "0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f"
eth_rpc_url: "http://localhost:8545"
eth_ws_url: "ws://localhost:8546"
max_proofs_in_queue: 1000
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aligned_service_manager_address: "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"
proof_aggregation_service_address: "0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f"
aligned_service_manager_address: "0xf5059a5D33d5853360D16C683c16e67980206f36"
proof_aggregation_service_address: "0x162A433068F51e18b7d13932F27e66a3f99E6890"
eth_rpc_url: "http://localhost:8545"
eth_ws_url: "ws://localhost:8546"
max_proofs_in_queue: 1000
Expand Down
4 changes: 2 additions & 2 deletions config-files/config-proof-aggregator-mock.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aligned_service_manager_address: "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"
proof_aggregation_service_address: "0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f"
aligned_service_manager_address: "0xf5059a5D33d5853360D16C683c16e67980206f36"
proof_aggregation_service_address: "0x162A433068F51e18b7d13932F27e66a3f99E6890"
eth_rpc_url: "http://localhost:8545"
eth_ws_url: "ws://localhost:8545"
max_proofs_in_queue: 1000
Expand Down
4 changes: 2 additions & 2 deletions config-files/config-proof-aggregator.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
aligned_service_manager_address: "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"
proof_aggregation_service_address: "0xFD471836031dc5108809D173A067e8486B9047A3"
aligned_service_manager_address: "0xf5059a5D33d5853360D16C683c16e67980206f36"
proof_aggregation_service_address: "0x1429859428C0aBc9C2C47C8Ee9FBaf82cFA0F20f"
eth_rpc_url: "http://localhost:8545"
eth_ws_url: "ws://localhost:8545"
max_proofs_in_queue: 1000
Expand Down
125 changes: 57 additions & 68 deletions contracts/bindings/AlignedLayerServiceManager/binding.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion contracts/bindings/ERC20Mock/binding.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion contracts/deployments/31337.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"CREATE2_SALT": "0x0000000000000000000000000000000000000000000000000000000000000009",
"SP1_VERIFIER_GATEWAY_GROTH16": "0x06530DD13aFB697B81E2d602a279EBAEC8Ca2E31",
"V4_0_0_RC3_SP1_VERIFIER_GROTH16": "0x14C66A76b06A414e62048c50e4d21B295ad2Cb0C"
}
}
12 changes: 12 additions & 0 deletions contracts/script/deploy/config/devnet/aligned.devnet.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"initalPausedStatus": 0
},
"minimumStakes": [
1,
1
],
"strategyWeights": [
Expand All @@ -21,9 +22,20 @@
"0_strategy": "0xc5a5C42992dECbae36851359345FE25997F5C42d",
"1_multiplier": 1e+18
}
],
[
{
"0_strategy": "0xE6E340D132b5f46d1e472DebcD681B2aBc16e57E",
"1_multiplier": 1e+18
}
]
],
"operatorSetParams": [
{
"0_maxOperatorCount": 200,
"1_kickBIPsOfOperatorStake": 11000,
"2_kickBIPsOfTotalStake": 50
},
{
"0_maxOperatorCount": 200,
"1_kickBIPsOfOperatorStake": 11000,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"address": {
"batcherWallet": "0x9965507D1a55bcC2695C58ba16FB37d819B0A4dc",
"batcherPrivateKey": "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba",
"alignedLayerServiceManager": "0x1613beB3B2C4f22Ee086B2b38C1476A3cE7f78E8"
"alignedLayerServiceManager": "0xf5059a5D33d5853360D16C683c16e67980206f36"
},
"amounts": {
"gasForAggregator": "300000",
Expand Down
Loading
Loading