diff --git a/contracts/lib/eigenlayer-middleware b/contracts/lib/eigenlayer-middleware index b42aa0b7ae..91400d9776 160000 --- a/contracts/lib/eigenlayer-middleware +++ b/contracts/lib/eigenlayer-middleware @@ -1 +1 @@ -Subproject commit b42aa0b7aefb5b30721c3f4b9ad7ab02e8215648 +Subproject commit 91400d9776d4f7276a2807a53559f49f7edf5378 diff --git a/contracts/src/core/EigenDAServiceManager.sol b/contracts/src/core/EigenDAServiceManager.sol index 029785eb7c..fab05d0501 100644 --- a/contracts/src/core/EigenDAServiceManager.sol +++ b/contracts/src/core/EigenDAServiceManager.sol @@ -31,7 +31,7 @@ contract EigenDAServiceManager is EigenDAServiceManagerStorage, ServiceManagerBa /// @notice when applied to a function, ensures that the function is only callable by the `batchConfirmer`. modifier onlyBatchConfirmer() { - require(isBatchConfirmer[msg.sender], "onlyBatchConfirmer: not from batch confirmer"); + require(isBatchConfirmer[msg.sender]); _; } @@ -80,21 +80,21 @@ contract EigenDAServiceManager is EigenDAServiceManagerStorage, ServiceManagerBa NonSignerStakesAndSignature memory nonSignerStakesAndSignature ) external onlyWhenNotPaused(PAUSED_CONFIRM_BATCH) onlyBatchConfirmer() { // make sure the information needed to derive the non-signers and batch is in calldata to avoid emitting events - require(tx.origin == msg.sender, "EigenDAServiceManager.confirmBatch: header and nonsigner data must be in calldata"); + require(tx.origin == msg.sender, "header and nonsigner data must be in calldata"); // make sure the stakes against which the Batch is being confirmed are not stale require( - batchHeader.referenceBlockNumber < block.number, "EigenDAServiceManager.confirmBatch: specified referenceBlockNumber is in future" + batchHeader.referenceBlockNumber < block.number, "specified referenceBlockNumber is in future" ); require( (batchHeader.referenceBlockNumber + BLOCK_STALE_MEASURE) >= uint32(block.number), - "EigenDAServiceManager.confirmBatch: specified referenceBlockNumber is too far in past" + "specified referenceBlockNumber is too far in past" ); //make sure that the quorumNumbers and signedStakeForQuorums are of the same length require( batchHeader.quorumNumbers.length == batchHeader.signedStakeForQuorums.length, - "EigenDAServiceManager.confirmBatch: quorumNumbers and signedStakeForQuorums must be of the same length" + "quorumNumbers and signedStakeForQuorums must be same length" ); // calculate reducedBatchHeaderHash which nodes signed @@ -118,7 +118,7 @@ contract EigenDAServiceManager is EigenDAServiceManagerStorage, ServiceManagerBa require( quorumStakeTotals.signedStakeForQuorum[i] * THRESHOLD_DENOMINATOR >= quorumStakeTotals.totalStakeForQuorum[i] * uint8(batchHeader.signedStakeForQuorums[i]), - "EigenDAServiceManager.confirmBatch: signatories do not own at least threshold percentage of a quorum" + "signatories do not own threshold percentage of a quorum" ); } diff --git a/contracts/test/unit/EigenDAServiceManagerUnit.t.sol b/contracts/test/unit/EigenDAServiceManagerUnit.t.sol index f550889bcb..b476494d5c 100644 --- a/contracts/test/unit/EigenDAServiceManagerUnit.t.sol +++ b/contracts/test/unit/EigenDAServiceManagerUnit.t.sol @@ -158,7 +158,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { (BatchHeader memory batchHeader, BLSSignatureChecker.NonSignerStakesAndSignature memory nonSignerStakesAndSignature) = _getHeaderandNonSigners(0, pseudoRandomNumber, 100); - cheats.expectRevert(bytes("EigenDAServiceManager.confirmBatch: header and nonsigner data must be in calldata")); + cheats.expectRevert(bytes("header and nonsigner data must be in calldata")); cheats.prank(confirmer, notConfirmer); eigenDAServiceManager.confirmBatch( batchHeader, @@ -170,7 +170,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { (BatchHeader memory batchHeader, BLSSignatureChecker.NonSignerStakesAndSignature memory nonSignerStakesAndSignature) = _getHeaderandNonSigners(0, pseudoRandomNumber, 100); - cheats.expectRevert(bytes("onlyBatchConfirmer: not from batch confirmer")); + cheats.expectRevert(); cheats.prank(notConfirmer, notConfirmer); eigenDAServiceManager.confirmBatch( batchHeader, @@ -192,7 +192,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { bytes32 batchHeaderHash = batchHeader.hashBatchHeaderMemory(); nonSignerStakesAndSignature.sigma = BN254.hashToG1(batchHeaderHash).scalar_mul(aggSignerPrivKey); - cheats.expectRevert(bytes("EigenDAServiceManager.confirmBatch: specified referenceBlockNumber is in future")); + cheats.expectRevert(bytes("specified referenceBlockNumber is in future")); cheats.prank(confirmer, confirmer); eigenDAServiceManager.confirmBatch( batchHeader, @@ -205,7 +205,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { = _getHeaderandNonSigners(0, pseudoRandomNumber, 100); cheats.roll(block.number + eigenDAServiceManager.BLOCK_STALE_MEASURE()); - cheats.expectRevert(bytes("EigenDAServiceManager.confirmBatch: specified referenceBlockNumber is too far in past")); + cheats.expectRevert(bytes("specified referenceBlockNumber is too far in past")); cheats.prank(confirmer, confirmer); eigenDAServiceManager.confirmBatch( batchHeader, @@ -217,7 +217,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { (BatchHeader memory batchHeader, BLSSignatureChecker.NonSignerStakesAndSignature memory nonSignerStakesAndSignature) = _getHeaderandNonSigners(1, pseudoRandomNumber, 100); - cheats.expectRevert(bytes("EigenDAServiceManager.confirmBatch: signatories do not own at least threshold percentage of a quorum")); + cheats.expectRevert(bytes("signatories do not own threshold percentage of a quorum")); cheats.prank(confirmer, confirmer); eigenDAServiceManager.confirmBatch( batchHeader, @@ -251,7 +251,7 @@ contract EigenDAServiceManagerUnit is BLSMockAVSDeployer { = _getHeaderandNonSigners(0, pseudoRandomNumber, 100); batchHeader.signedStakeForQuorums = new bytes(0); - cheats.expectRevert(bytes("EigenDAServiceManager.confirmBatch: quorumNumbers and signedStakeForQuorums must be of the same length")); + cheats.expectRevert(bytes("quorumNumbers and signedStakeForQuorums must be same length")); cheats.prank(confirmer, confirmer); eigenDAServiceManager.confirmBatch( batchHeader,