Skip to content
Merged
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
2 changes: 1 addition & 1 deletion lib/eigenlayer-contracts
Submodule eigenlayer-contracts updated 68 files
+243 −0 docs/core/ReleaseManager.md
+114 −28 pkg/bindings/BN254CertificateVerifier/binding.go
+217 −49 pkg/bindings/BN254CertificateVerifierStorage/binding.go
+203 −0 pkg/bindings/BN254SignatureVerifier/binding.go
+2 −136 pkg/bindings/BN254TableCalculator/binding.go
+407 −0 pkg/bindings/BN254TableCalculatorBase/binding.go
+456 −54 pkg/bindings/CrossChainRegistry/binding.go
+455 −53 pkg/bindings/CrossChainRegistryStorage/binding.go
+1,223 −0 pkg/bindings/ECDSACertificateVerifier/binding.go
+1,006 −0 pkg/bindings/ECDSACertificateVerifierStorage/binding.go
+580 −0 pkg/bindings/ECDSATableCalculator/binding.go
+496 −0 pkg/bindings/ECDSATableCalculatorBase/binding.go
+205 −37 pkg/bindings/IBN254CertificateVerifier/binding.go
+1 −135 pkg/bindings/IBN254TableCalculator/binding.go
+67 −37 pkg/bindings/IBaseCertificateVerifier/binding.go
+455 −53 pkg/bindings/ICrossChainRegistry/binding.go
+253 −37 pkg/bindings/IECDSACertificateVerifier/binding.go
+94 −1 pkg/bindings/IKeyRegistrar/binding.go
+149 −25 pkg/bindings/IOperatorTableUpdater/binding.go
+530 −0 pkg/bindings/IReleaseManager/binding.go
+33 −31 pkg/bindings/KeyRegistrar/binding.go
+94 −1 pkg/bindings/KeyRegistrarStorage/binding.go
+150 −26 pkg/bindings/OperatorTableUpdater/binding.go
+149 −25 pkg/bindings/OperatorTableUpdaterStorage/binding.go
+748 −0 pkg/bindings/ReleaseManager/binding.go
+530 −0 pkg/bindings/ReleaseManagerStorage/binding.go
+1 −1 script/deploy/devnet/mutlichain/deploy_multichain_l2.s.sol
+92 −0 src/contracts/core/ReleaseManager.sol
+19 −0 src/contracts/core/ReleaseManagerStorage.sol
+55 −1 src/contracts/interfaces/IBN254CertificateVerifier.sol
+1 −16 src/contracts/interfaces/IBN254TableCalculator.sol
+3 −3 src/contracts/interfaces/IBaseCertificateVerifier.sol
+11 −11 src/contracts/interfaces/ICrossChainRegistry.sol
+69 −0 src/contracts/interfaces/IECDSACertificateVerifier.sol
+40 −1 src/contracts/interfaces/IKeyRegistrar.sol
+37 −2 src/contracts/interfaces/IOperatorTableUpdater.sol
+92 −0 src/contracts/interfaces/IReleaseManager.sol
+66 −59 src/contracts/multichain/BN254CertificateVerifier.sol
+33 −132 src/contracts/multichain/BN254TableCalculator.sol
+180 −0 src/contracts/multichain/BN254TableCalculatorBase.sol
+43 −72 src/contracts/multichain/CrossChainRegistry.sol
+328 −0 src/contracts/multichain/ECDSACertificateVerifier.sol
+54 −0 src/contracts/multichain/ECDSACertificateVerifierStorage.sol
+79 −0 src/contracts/multichain/ECDSATableCalculator.sol
+127 −0 src/contracts/multichain/ECDSATableCalculatorBase.sol
+38 −5 src/contracts/multichain/OperatorTableUpdater.sol
+7 −1 src/contracts/multichain/OperatorTableUpdaterStorage.sol
+21 −27 src/contracts/permissions/KeyRegistrar.sol
+3 −3 src/test/integration/tests/multichain/BN254OperatorSet_CalculateWeights.t.sol
+9 −0 src/test/mocks/AllocationManagerMock.sol
+13 −0 src/test/mocks/CrossChainRegistryMock.sol
+10 −0 src/test/mocks/OperatorTableUpdaterMock.sol
+56 −0 src/test/tree/BN254CertificateVerifier.tree
+31 −0 src/test/tree/BN254TableCalculatorBase.tree
+111 −0 src/test/tree/CrossChainRegistry.tree
+65 −0 src/test/tree/ECDSACertificateVerifierUnit.tree
+34 −0 src/test/tree/ECDSATableCalculatorBase.tree
+68 −0 src/test/tree/OperatorTableUpdaterUnit.tree
+633 −462 src/test/unit/BN254CertificateVerifierUnit.t.sol
+694 −0 src/test/unit/BN254TableCalculatorBaseUnit.t.sol
+0 −28 src/test/unit/BN254TableCalculatorUnit.t.sol
+37 −58 src/test/unit/CrossChainRegistryUnit.t.sol
+1,116 −0 src/test/unit/ECDSACertificateVerifierUnit.t.sol
+742 −0 src/test/unit/ECDSATableCalculatorBaseUnit.t.sol
+114 −7 src/test/unit/KeyRegistrarUnit.t.sol
+148 −11 src/test/unit/OperatorTableUpdaterUnit.t.sol
+476 −0 src/test/unit/ReleaseManagerUnit.t.sol
+8 −27 src/test/utils/EigenLayerMultichainUnitTestSetup.sol
9 changes: 6 additions & 3 deletions src/middlewareV2/registrar/AVSRegistrar.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ contract AVSRegistrar is Initializable, AVSRegistrarStorage {
/// @inheritdoc IAVSRegistrar
function registerOperator(
address operator,
address avs,
address, /* avs */
uint32[] calldata operatorSetIds,
bytes calldata data
) external virtual onlyAllocationManager {
Expand All @@ -54,7 +54,7 @@ contract AVSRegistrar is Initializable, AVSRegistrarStorage {
/// @inheritdoc IAVSRegistrar
function deregisterOperator(
address operator,
address avs,
address, /* avs */
uint32[] calldata operatorSetIds
) external virtual onlyAllocationManager {
_beforeDeregisterOperator(operator, operatorSetIds);
Expand Down Expand Up @@ -83,7 +83,10 @@ contract AVSRegistrar is Initializable, AVSRegistrarStorage {
* @param operatorSetIds The operator sets to validate
* @dev This function assumes the operator has already registered a key in the Key Registrar
*/
function _validateOperatorKeys(address operator, uint32[] calldata operatorSetIds) internal {
function _validateOperatorKeys(
address operator,
uint32[] calldata operatorSetIds
) internal view {
for (uint32 i = 0; i < operatorSetIds.length; i++) {
OperatorSet memory operatorSet = OperatorSet({avs: avs, id: operatorSetIds[i]});
require(keyRegistrar.checkKey(operatorSet, operator), KeyNotRegistered());
Expand Down
24 changes: 12 additions & 12 deletions test/mocks/AllocationManagerMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ contract AllocationManagerIntermediate is IAllocationManager {
) external view virtual returns (bool) {}

function getAllocatedStake(
OperatorSet memory operatorSet,
OperatorSet memory, /* operatorSet */
address[] memory operators,
IStrategy[] memory strategies
) external view virtual returns (uint256[][] memory slashableStake) {
Expand All @@ -170,15 +170,15 @@ contract AllocationManagerIntermediate is IAllocationManager {
}

function getEncumberedMagnitude(
address operator,
IStrategy strategy
address, /* operator */
IStrategy /* strategy */
) external view virtual returns (uint64) {
return 0;
}

function isOperatorSlashable(
address operator,
OperatorSet memory operatorSet
address, /* operator */
OperatorSet memory /* operatorSet */
) external view virtual returns (bool) {
return false;
}
Expand Down Expand Up @@ -230,13 +230,13 @@ contract AllocationManagerMock is AllocationManagerIntermediate {
) external override {}

function getRedistributionRecipient(
OperatorSet memory operatorSet
OperatorSet memory /* operatorSet */
) external pure override returns (address) {
return address(0);
}

function getSlashCount(
OperatorSet memory operatorSet
OperatorSet memory /* operatorSet */
) external pure override returns (uint256) {
return 0;
}
Expand All @@ -246,21 +246,21 @@ contract AllocationManagerMock is AllocationManagerIntermediate {
) external override {}

function isOperatorRedistributable(
address operator
address /* operator */
) external pure override returns (bool) {
return false;
}

function isRedistributingOperatorSet(
OperatorSet memory operatorSet
OperatorSet memory /* operatorSet */
) external pure override returns (bool) {
return false;
}

function getAllocatedStake(
address operator,
IStrategy strategy
) external view returns (uint256) {
address, /* operator */
IStrategy /* strategy */
) external pure returns (uint256) {
return 0;
}
}
23 changes: 23 additions & 0 deletions test/mocks/KeyRegistrarMock.sol
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,29 @@ contract KeyRegistrarMock is IKeyRegistrar {
return "v0.0.1";
}

function getECDSAKeyRegistrationMessageHash(
address operator,
OperatorSet memory operatorSet,
address keyAddress
) external pure returns (bytes32) {
return keccak256(abi.encode(operator, operatorSet, keyAddress));
}

function getBN254KeyRegistrationMessageHash(
address operator,
OperatorSet memory operatorSet,
bytes calldata keyData
) external pure returns (bytes32) {
return keccak256(abi.encode(operator, operatorSet, keyData));
}

function encodeBN254KeyData(
BN254.G1Point memory g1Point,
BN254.G2Point memory g2Point
) external pure returns (bytes memory) {
return abi.encode(g1Point, g2Point);
}

receive() external payable {}
fallback() external payable {}
}
2 changes: 1 addition & 1 deletion test/unit/middlewareV2/AVSRegistrarAllowlistUnit.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ contract AVSRegistrarWithAllowlistUnitTests_removeOperatorFromAllowlist is

function testFuzz_revert_notOwner(
address notOwner
) public {
) public view {
cheats.assume(notOwner != allowlistAdmin);
}

Expand Down