-
Notifications
You must be signed in to change notification settings - Fork 457
fix: multichain pt2 audit fixes #1592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**Motivation:** Currently, we don't require the `KeyType` to be set in the `KeyRegistry` when creating a generation reservation **Modifications:** Update the `CCR` to check for key type. Also update docs **Result:** Stricter user flow
**Motivation:** As part of an audit finding, to protect against [second preimage attacks](https://flawed.net.nz/2018/02/21/attacking-merkle-trees-with-a-second-preimage-attack/), we add a salt to the leaf similar to the RewardsCoordinator to significantly reduce the likelihood of an internal node being used to produce an unintentional proof. **Modifications:** * Created new `LeafCalculatorMixin` with `getOperatorInfoLeaf` and `getOperatorTableLeaf` calculations, which take in salt * Updated tests to use `getOperatorInfoLeaf` and `getOperatorTableLeaf` for hash calculation **Result:** Significantly diminished likelihood of second preimage attack --------- Co-authored-by: Yash Patil <40046473+ypatil12@users.noreply.github.com>
**Motivation:** Make natspec clearer after internal review **Modifications:** - Document errors and events - Add error codes - Add error reason **Result:** - Cleaner Natspec --------- Co-authored-by: eigenmikem <michael.muehl@eigenlabs.org> Co-authored-by: Nadir Akhtar <nadir-akhtar@users.noreply.github.com> Co-authored-by: clandestine.eth <96172957+0xClandestine@users.noreply.github.com>
**Motivation:** - There is an offchain race condition where updating the table can cause the entire service to panic if it is frontrun by another tx **Modifications:** - Return if the table has already been updated - Clean up integration testing lib **Result:** - Clear off chain responses
<!--
🚨 ATTENTION! 🚨
This PR template is REQUIRED. PRs not following this format will be
closed without review.
Requirements:
- PR title must follow commit conventions:
https://www.conventionalcommits.org/en/v1.0.0/
- Label your PR with the correct type (e.g., 🐛 Bug, ✨ Enhancement, 🧪
Test, etc.)
- Provide clear and specific details in each section
-->
**Motivation:**
Small typo in natspec regarding hash value. The value in the code is
correct, but the docs are not.
**Modifications:**
* Fixed value in documentation for how salts were derived
**Result:**
More accurate docs
**Motivation:** `getActiveGenerationReservation` can have an OOG error if there are many gen reservations **Modifications:** Paginate the function by adding two view funcs: - `getActiveGenerationReservationsByRange` - `getActiveGenerationReservationCount` **Result:** DOS-resistant API
**Motivation:** Certora L-03: `CrossChainRegistry` getters do not revert if there's not an active generation reservation for the given operator set. **Modifications:** - Added `hasActiveGenerationReservation`. - Added comments in other view methods to first call `hasActiveGenerationReservation`. **Result:** Integrators can validate view before calling.
dcb25e2 to
941e44b
Compare
chore: add permalink
nadir-akhtar
approved these changes
Aug 11, 2025
**Motivation:** We used the `KeyAlreadyRegistered` error when an operator is already registered as well as when a key already registered. This is not a descriptive error message. **Modifications:** Add `OperatorAlreadyRegistered` message **Result:** More descriptive code
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Multichain pt2 Audit Fixes:
High:
Medium:
Low:
hasActiveGenerationReservation#1589Misc