Skip to content
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

feat: overrides in the relayer to force collateral warp route mints to be read-only #4918

Merged
merged 7 commits into from
Dec 12, 2024

Conversation

tkporter
Copy link
Collaborator

@tkporter tkporter commented Nov 28, 2024

Description

Some context, and the fix for future warp routes: #4905

This will force messages to certain collateral warp route recipients to have mint accounts as readonly. This is a first step toward requiring lower fees for some txs.

An example of Helius fees for a USDC process that includes the USDC mint as writeable:

{"jsonrpc":"2.0","result":{"priorityFeeLevels":{"min":0.0,"low":292041.0,"medium":2207571.0,"high":10405557.0,"veryHigh":22996019.0,"unsafeMax":2000000000.0}},"id":"1"}

vs when it's not writeable:

{"jsonrpc":"2.0","result":{"priorityFeeLevels":{"min":0.0,"low":0.0,"medium":1.0,"high":150000.0,"veryHigh":10000000.0,"unsafeMax":2000000000.0}},"id":"1"}

The alternative to having this PR would be to:

  • keep marking mints as writeable, forcing us to overpay
  • or do a program upgrade of the warp routes (unlikely to happen)

Drive-by changes

  • Removed #[allow(warnings)] from mailbox.rs and made required changes

Related issues

Backward compatibility

Testing

Copy link

changeset-bot bot commented Nov 28, 2024

⚠️ No Changeset found

Latest commit: 9503411

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.53%. Comparing base (17ecb97) to head (9503411).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4918   +/-   ##
=======================================
  Coverage   77.53%   77.53%           
=======================================
  Files         103      103           
  Lines        2110     2110           
  Branches      190      190           
=======================================
  Hits         1636     1636           
  Misses        453      453           
  Partials       21       21           
Components Coverage Δ
core 87.80% <ø> (ø)
hooks 79.39% <ø> (ø)
isms 83.68% <ø> (ø)
token 91.27% <ø> (ø)
middlewares 79.80% <ø> (ø)

rust/main/chains/hyperlane-sealevel/src/mailbox.rs Outdated Show resolved Hide resolved
rust/main/chains/hyperlane-sealevel/src/mailbox.rs Outdated Show resolved Hide resolved
@tkporter tkporter enabled auto-merge December 12, 2024 03:59
@tkporter tkporter added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit 07ffbbe Dec 12, 2024
41 checks passed
@tkporter tkporter deleted the trevor/force-readonly-collateral-mints branch December 12, 2024 05:40
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.

4 participants