Skip to content

fix: process gas estimation for trusted relayer isms#8457

Merged
troykessler merged 6 commits intomainfrom
fix/process-gas-estimation
Mar 27, 2026
Merged

fix: process gas estimation for trusted relayer isms#8457
troykessler merged 6 commits intomainfrom
fix/process-gas-estimation

Conversation

@troykessler
Copy link
Copy Markdown
Contributor

@troykessler troykessler commented Mar 26, 2026

Description

This pr fixes the process() gas estimation by setting the sender to the relayer address (needed for trusted relayer isms). Also it enables trusted relayer isms inside aggregation isms by setting the gas estimation to zero if we are the trusted relayer, else we ignore it like before. Both fixes have been applied to ethereum and tron

Drive-by changes

Related issues

Backward compatibility

Testing

tested on sepolia<>arbitrumsepolia


Open with Devin

devin-ai-integration[bot]

This comment was marked as resolved.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 26, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updated mailbox gas-simulation to set simulated tx.from to the provider/relayer default sender, changed Arbitrum retryable-ticket estimation to use that sender, added an ITrustedRelayer ISM ABI, and made the InterchainSecurityModuleBuilder require a signer and handle Null ISM trusted_relayer checks.

Changes

Cohort / File(s) Summary
Mailbox & Arbitrum gas estimation
rust/main/chains/hyperlane-ethereum/src/contracts/mailbox.rs
process_contract_call now builds ContractCall mutably and sets tx.from to self.provider.default_sender() when present before filling gas params. Arbitrum-nitro estimate_retryable_ticket path uses the relayer default_sender (falls back to H160::zero() only if absent) and sets .from(sender) on the retryable call before estimating gas; removed the prior fallback match that set l2_gas_limit = None. Moved H160 import usage to ethers::types.
New ABI: trusted relayer
rust/main/chains/hyperlane-ethereum/abis/ITrustedRelayerIsm.abi.json
Added ABI declaring trustedRelayer() -> address (view).
ISM builder & dry-run logic
rust/main/chains/hyperlane-ethereum/src/ism/interchain_security_module.rs
InterchainSecurityModuleBuilder::NEEDS_SIGNER set to true. dry_run_verify returns early with Some(gas_estimate) when verification succeeds; adds handling for ModuleType::Null where matching default_sender with on-chain trusted_relayer returns Some(U256::zero()) instead of None.
🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 60.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
Title check ✅ Passed The title clearly summarizes the main change: fixing gas estimation for trusted relayer ISMs by setting the sender appropriately.
Description check ✅ Passed The PR description covers the main objectives and testing, but the required template sections for 'Drive-by changes', 'Related issues', and 'Backward compatibility' are incomplete or vague.

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


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[bot]

This comment was marked as resolved.

@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.21%. Comparing base (6d44b65) to head (3f24bde).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8457   +/-   ##
=======================================
  Coverage   77.21%   77.21%           
=======================================
  Files         130      130           
  Lines        3533     3533           
  Branches      294      294           
=======================================
  Hits         2728     2728           
  Misses        788      788           
  Partials       17       17           
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 74.55% <ø> (ø)
isms 81.46% <ø> (ø)
token 87.33% <ø> (ø)
middlewares 87.87% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

devin-ai-integration[bot]

This comment was marked as resolved.

@yjamin yjamin force-pushed the fix/process-gas-estimation branch from d43a5fc to 3754d4f Compare March 26, 2026 12:58
@github-project-automation github-project-automation Bot moved this from In Review to Done in Hyperlane Tasks Mar 26, 2026
@troykessler troykessler reopened this Mar 27, 2026
@github-project-automation github-project-automation Bot moved this from Done to Sprint in Hyperlane Tasks Mar 27, 2026
coderabbitai[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

devin-ai-integration[bot]

This comment was marked as resolved.

Copy link
Copy Markdown
Member

@tkporter tkporter left a comment

Choose a reason for hiding this comment

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

lgtm assuming we've tested this with a trusted relayer ISM

@troykessler troykessler added this pull request to the merge queue Mar 27, 2026
Merged via the queue into main with commit 1663fd7 Mar 27, 2026
86 checks passed
@troykessler troykessler deleted the fix/process-gas-estimation branch March 27, 2026 15:48
@github-project-automation github-project-automation Bot moved this from Sprint to Done in Hyperlane Tasks Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants