Skip to content

feat: upgrade hyperlane packages to v23 - #265

Closed
troykessler wants to merge 1 commit into
mainfrom
feat/v23
Closed

feat: upgrade hyperlane packages to v23#265
troykessler wants to merge 1 commit into
mainfrom
feat/v23

Conversation

@troykessler

@troykessler troykessler commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

This PR upgrades the hyperlane packages to the latest version and fixes a bug where aleo tx hashes are displayed in the wrong format

Summary by CodeRabbit

Release Notes

  • New Features

    • Added Aleo protocol support with specialized hash formatting
    • Enhanced CosmosNative protocol handling for improved transaction processing
  • Chores

    • Updated core Hyperlane packages to version 23.0.0 (sdk, utils, widgets)
    • Refined build configuration with webpack customization and experimental features for improved performance

@troykessler troykessler self-assigned this Feb 2, 2026
@troykessler
troykessler requested a review from Xaroz as a code owner February 2, 2026 15:57
@vercel

vercel Bot commented Feb 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hyperlane-explorer Ready Ready Preview, Comment Feb 2, 2026 3:57pm

Request Review

@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​hyperlane-xyz/​widgets@​20.1.0 ⏵ 23.0.077 +110083 +198100
Updated@​hyperlane-xyz/​utils@​20.1.0 ⏵ 23.0.085 +41007998100
Updated@​hyperlane-xyz/​sdk@​20.1.0 ⏵ 23.0.085 +41008598100

View full report

@coderabbitai

coderabbitai Bot commented Feb 2, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR updates Hyperlane SDK dependencies to version 23.0.0, adds webpack configuration to disable ProvableHQ modules during server builds, enables async WebAssembly support in Next.js, and extends address hash formatting to support Aleo protocol alongside improved CosmosNative handling.

Changes

Cohort / File(s) Summary
Dependencies
package.json
Updated three @hyperlane-xyz/* packages from 20.1.0 to 23.0.0: sdk, utils, and widgets.
Build Configuration
next.config.js
Added webpack server-side aliases to disable @provablehq/wasm and @provablehq/sdk modules; enabled experimental async WebAssembly and layers support.
Address Formatting
src/utils/addresses.ts
Extended CosmosNative protocol to use same strip0x logic as Cosmos; added new Aleo case using bech32m-style prefix ('at') for transaction hashes.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Bump SDK version to 19.1.0 #230: Performs related version bumps of the same Hyperlane packages, indicating coordinated dependency updates across repositories.

Suggested reviewers

  • Xaroz

Poem

Like layers in a swamp, this PR builds high,
Dependencies updated, modules set aside,
Aleo addresses now get their due,
WebAssembly flowing through and through. 🧅✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change—upgrading Hyperlane packages to v23—which is the primary objective reflected in package.json updates.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/v23

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@src/utils/addresses.ts`:
- Around line 21-22: The switch case is using the comma operator so only
ProtocolType.CosmosNative is matched; change the single case expression to two
fall-through case labels: add a separate case for ProtocolType.Cosmos followed
by case ProtocolType.CosmosNative, then return strip0x(hash) (identify the
switch handling ProtocolType and the strip0x call in src/utils/addresses.ts to
locate the lines to update). Ensure both ProtocolType.Cosmos and
ProtocolType.CosmosNative reach the same return branch.
🧹 Nitpick comments (3)
src/utils/addresses.ts (2)

23-25: Aleo formatting looks reasonable, though the comment could use some clarification.

Reusing hexToRadixCustomPrefix for Aleo since they both use bech32m makes sense for now. Once the dedicated Aleo utility lands in @hyperlane-xyz/utils, you'll want to swap it out.

Consider adding a TODO or tracking issue so this doesn't get lost in the swamp:

📝 Suggested improvement
     case ProtocolType.Aleo:
-      // radix and aleo use both bech32m, we use this method until the aleo one is released
+      // TODO: Replace with dedicated Aleo utility when available in `@hyperlane-xyz/utils`
+      // Using Radix bech32m helper as both protocols share the same encoding
       return hexToRadixCustomPrefix(hash, 'txid', 'at');

15-28: Consider adding test coverage for formatTxHash changes.

You're addin' new protocol cases and changing existing behavior. Would be good to have some tests to make sure things don't go sideways later. As per coding guidelines, new utility functions in src/utils/ should have .test.ts files.

next.config.js (1)

64-69: Disabling ProvableHQ modules for SSR is a smart move.

These WASM-dependent modules would cause all sorts of trouble during server-side rendering. Aliasing them to false keeps the build from blowin' up.

One small thing - you could merge this with the existing alias block above instead of spreadin' it twice:

♻️ Consolidate alias assignments
     if (isServer) {
       // Replace pino with a mock module to avoid SSR errors with pino-pretty transport
       config.resolve.alias = {
         ...config.resolve.alias,
         pino: require.resolve('./src/utils/pino-noop.js'),
-      };
-
-      config.resolve.alias = {
-        ...config.resolve.alias,
         '@provablehq/wasm': false,
         '@provablehq/sdk': false,
       };
     }

Comment thread src/utils/addresses.ts
Comment on lines +21 to 22
case (ProtocolType.Cosmos, ProtocolType.CosmosNative):
return strip0x(hash);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

This ain't gonna work the way you think it will - comma operator bug.

The syntax case (ProtocolType.Cosmos, ProtocolType.CosmosNative): uses JavaScript's comma operator, which evaluates to only the last value. This means ProtocolType.Cosmos is completely ignored and only ProtocolType.CosmosNative will match. Cosmos transactions will fall through to the default case and won't get strip0x applied.

🐛 Fix: Use fall-through case syntax
-    case (ProtocolType.Cosmos, ProtocolType.CosmosNative):
+    case ProtocolType.Cosmos:
+    case ProtocolType.CosmosNative:
       return strip0x(hash);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
case (ProtocolType.Cosmos, ProtocolType.CosmosNative):
return strip0x(hash);
case ProtocolType.Cosmos:
case ProtocolType.CosmosNative:
return strip0x(hash);
🤖 Prompt for AI Agents
In `@src/utils/addresses.ts` around lines 21 - 22, The switch case is using the
comma operator so only ProtocolType.CosmosNative is matched; change the single
case expression to two fall-through case labels: add a separate case for
ProtocolType.Cosmos followed by case ProtocolType.CosmosNative, then return
strip0x(hash) (identify the switch handling ProtocolType and the strip0x call in
src/utils/addresses.ts to locate the lines to update). Ensure both
ProtocolType.Cosmos and ProtocolType.CosmosNative reach the same return branch.

@troykessler

Copy link
Copy Markdown
Contributor Author

closing in favor of #276

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.

1 participant