Skip to content

fix(m-01): add salt to merkle leaf hashing - #527

Merged
ypatil12 merged 3 commits into
release-dev/multichain-pt2-audit-fixesfrom
fix/merkle-leaf-hashing
Aug 6, 2025
Merged

ypatil12 merged 3 commits into
release-dev/multichain-pt2-audit-fixesfrom
fix/merkle-leaf-hashing

Conversation

@ypatil12

@ypatil12 ypatil12 commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Motivation:

As part of an audit finding, to protect against second preimage attacks, 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. Layr-Labs/eigenlayer-contracts#1580 in core already did this on the cert verifier side. We now need to do this for table calc

Modifications:

  • Inherit LeafCalculatorMixin in BN254TableCalculatorBase
  • Use calculateOperatorInfoLeaf

Result:

Secure code

@ypatil12
ypatil12 merged commit b8458dd into release-dev/multichain-pt2-audit-fixes Aug 6, 2025
5 checks passed
@ypatil12
ypatil12 deleted the fix/merkle-leaf-hashing branch August 6, 2025 18:14
ypatil12 added a commit that referenced this pull request Aug 8, 2025
**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.
Layr-Labs/eigenlayer-contracts#1580 in core
already did this on the cert verifier side. We now need to do this for
table calc

**Modifications:**

- Inherit `LeafCalculatorMixin` in `BN254TableCalculatorBase`
- Use `calculateOperatorInfoLeaf`

**Result:**

Secure code
ypatil12 added a commit that referenced this pull request Aug 11, 2025
**Multichain Pt2 Audit Fixes**

**Medium:**

- #527 

**Info:**

- #526
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants