Skip to content

Conversation

@nadir-akhtar
Copy link
Collaborator

@nadir-akhtar nadir-akhtar commented Aug 4, 2025

Motivation:

Uninitialized roots can lead to issues like the Nomad bridge hack.

Modifications:

  • New error code and documentation
  • Added require statements for verifyInclusion(Keccak|SHA256)
  • Updated documentation for existing error code

Result:

Guard against unintialized roots being used in proofs

@nadir-akhtar nadir-akhtar changed the base branch from main to release-dev/merkle-audit-fixes August 4, 2025 20:07
Copy link
Collaborator

@ypatil12 ypatil12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nadir-akhtar nadir-akhtar force-pushed the nadir/l-01-uninitialized-roots branch from 0031c85 to 4644613 Compare August 8, 2025 20:30
@nadir-akhtar nadir-akhtar merged commit 30ec964 into release-dev/merkle-audit-fixes Aug 8, 2025
9 checks passed
@nadir-akhtar nadir-akhtar deleted the nadir/l-01-uninitialized-roots branch August 8, 2025 21:17
nadir-akhtar added a commit that referenced this pull request Aug 12, 2025
<!-- 
    🚨 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:**

Uninitialized roots can lead to issues like the [Nomad bridge
hack](https://medium.com/nomad-xyz-blog/nomad-bridge-hack-root-cause-analysis-875ad2e5aacd).

**Modifications:**

* New error code and documentation
* Added require statements for `verifyInclusion(Keccak|SHA256)`
* Updated documentation for existing error code

**Result:**

Guard against unintialized roots being used in proofs
nadir-akhtar added a commit that referenced this pull request Aug 13, 2025
<!-- 
    🚨 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:**

In response to a recent audit report, we are closing out Lows and Infos
related to the Merkle library.

**Modifications:**

* [fix(audit): Merkle library infos
(#1597)](a98493f)
* [fix(L-01): prevent uninitialized roots from being used
(#1586)](30ec964)

**Result:**

Cleaner, safer code
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.

3 participants