diff --git a/.gitignore b/.gitignore index db471e42..e10dbe82 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,6 @@ node_modules/ # Dotenv file .env + + +*.DS_Store diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e88e2c61..590c7f8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,6 @@ npm install npx husky install -npx husky add .husky/commit-msg 'npx --no -- commitlint --edit ${1}' - forge install ``` diff --git a/README.md b/README.md index c8fa6bf0..03c194d9 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,8 @@ The Registry Coordinator is a contract that is deployed by each AVS. It handles - Keeping track of what quorums operators are a part of - Handling operator churn (registration/deregistration) - Communicating to registries - The current implementation of this contract is the [BLSRegistryCoordinatorWithIndices](./docs/BLSRegistryCoordinatorWithIndices.md). + +The current implementation of this contract is the [BLSRegistryCoordinatorWithIndices](./docs/BLSRegistryCoordinatorWithIndices.md). ### Registries @@ -90,8 +91,8 @@ The current implementation of this contract is the [BLSSignatureChecker](./docs/ | Name | Solidity | Contract | Notes | | ------------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------- | ----- | -| BLSOperatorStateRetriever | BLSOperatorStateRetriever.sol | [`0xf60a...7251`](https://goerli.etherscan.io/address/0xf60a330F8c1A0C0ecf3Eab1D54b00F3a8FE37251) | | -| BLSPubkeyCompendium | BLSPubkeyCompendium.sol | [`0xdd53...B9Bb`](https://goerli.etherscan.io/address/0xdd53D44257d5F4EB0ca60F60d88827C1b433B9Bb) | | +| BLSOperatorStateRetriever | BLSOperatorStateRetriever.sol | [`0x737D...A3a3`](https://goerli.etherscan.io/address/0x737Dd62816a9392e84Fa21C531aF77C00816A3a3) | | +| BLSPubkeyCompendium | BLSPubkeyCompendium.sol | [`0xc81d...1b19`](https://goerli.etherscan.io/address/0xc81d3963087Fe09316cd1E032457989C7aC91b19) | | ## Further reading diff --git a/src/BLSSignatureChecker.sol b/src/BLSSignatureChecker.sol index 86d44680..ee80785e 100644 --- a/src/BLSSignatureChecker.sol +++ b/src/BLSSignatureChecker.sol @@ -132,11 +132,13 @@ contract BLSSignatureChecker is IBLSSignatureChecker { stakeRegistry.getTotalStakeAtBlockNumberFromIndex(quorumNumber, referenceBlockNumber, nonSignerStakesAndSignature.totalStakeIndices[quorumNumberIndex]); // copy total stake to signed stake quorumStakeTotals.signedStakeForQuorum[quorumNumberIndex] = quorumStakeTotals.totalStakeForQuorum[quorumNumberIndex]; + + // keep track of the nonSigners index in the quorum + uint32 nonSignerForQuorumIndex = 0; + // loop through all nonSigners, checking that they are a part of the quorum via their quorumBitmap // if so, load their stake at referenceBlockNumber and subtract it from running stake signed for (uint32 i = 0; i < nonSignerStakesAndSignature.nonSignerPubkeys.length; i++) { - // keep track of the nonSigners index in the quorum - uint32 nonSignerForQuorumIndex = 0; // if the nonSigner is a part of the quorum, subtract their stake from the running total if (BitmapUtils.numberIsInBitmap(nonSignerQuorumBitmaps[i], quorumNumber)) { quorumStakeTotals.signedStakeForQuorum[quorumNumberIndex] -=