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: implement multi-message relay #4812

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Conversation

yorhodes
Copy link
Member

@yorhodes yorhodes commented Nov 4, 2024

Description

  • Allow self-relaying of all messages if there are multiple in a given dispatch transaction.
  • Adds relayAll method to HyperlaneRelayer in SDK.
  • Finds and attempts to relay all undelivered messages in the given dispatch tx.

Drive-by changes

  • use getContracts in HyperlaneCore
  • add assertions in HyperlaneCore for expected number of process events

Related issues

Backward compatibility

Testing

Manual with ICA governance tx

$ yarn workspace @hyperlane-xyz/cli hyperlane status --dispatchTx 0x96377bd88332ac86b10bc87ab3c97c89a9edef1046d0179ac8bec215d8964611 --origin ethereum --relay -r /Users/pbio/work/hyperlane-registry/ --overrides ''
Hyperlane CLI
File /Users/pbio/.hyperlane/strategies/default-strategy.yaml does not exist, returning empty config
Checking status of message 0x2f02bc5d50e6e5e3722d1cfe1f44c12f726ddffa0d0702358fca23653b1a1ead on lisk
Message 0x2f02bc5d50e6e5e3722d1cfe1f44c12f726ddffa0d0702358fca23653b1a1ead was delivered
Checking status of message 0x83a95fe23bdf0d0f5e6d04c9fc2b5af8259c06d7a69e1a3d549eea27f7c68f0c on flowmainnet
Message 0x83a95fe23bdf0d0f5e6d04c9fc2b5af8259c06d7a69e1a3d549eea27f7c68f0c was delivered
Checking status of message 0xb65fab794926ed121076adb4d590000ac629f036bd1aba7638faa59bc3514efa on cheesechain
Message 0xb65fab794926ed121076adb4d590000ac629f036bd1aba7638faa59bc3514efa was delivered
Checking status of message 0x75e5f9a914879f74b68c6e557cca0394ecae85d08d48030285235f6904b10756 on superpositionmainnet
Message 0x75e5f9a914879f74b68c6e557cca0394ecae85d08d48030285235f6904b10756 was delivered
Checking status of message 0xe11da92d16dacc82e5e7ddb9f5b0e4fbbab7250e0980f304b8b79c808e62aad3 on flame
Message 0xe11da92d16dacc82e5e7ddb9f5b0e4fbbab7250e0980f304b8b79c808e62aad3 was delivered
Checking status of message 0x6207cec7be3f192ccd18850bcb56564d1750f3fdf763fd21136fed8a4a47c209 on kroma
Message 0x6207cec7be3f192ccd18850bcb56564d1750f3fdf763fd21136fed8a4a47c209 was delivered
Checking status of message 0xd9b7bde4c1195ec474b1d75d1e3c6bb3fe2c991aa84685deaf6d3090ae43c59d on molten
Message 0xd9b7bde4c1195ec474b1d75d1e3c6bb3fe2c991aa84685deaf6d3090ae43c59d was delivered
Checking status of message 0xa88533a9d8cdbdd6ab1cb656707ed60b18077f45867b29e0099560dafab691f9 on gravity
Message 0xa88533a9d8cdbdd6ab1cb656707ed60b18077f45867b29e0099560dafab691f9 was delivered
Checking status of message 0xb942a6663af5f35fbd3efec75200c8909d9542428167267a9bbf7878c9ba02a5 on viction
Message 0xb942a6663af5f35fbd3efec75200c8909d9542428167267a9bbf7878c9ba02a5 was delivered
Checking status of message 0x36e7cb4857bab78d04d04e3c7c43a9f06150c533d51a8157641f8a99090c763d on bitlayer
Message 0x36e7cb4857bab78d04d04e3c7c43a9f06150c533d51a8157641f8a99090c763d was delivered
Checking status of message 0x11bf61480a63bcb3a77131d9bd5eecf756579675c95a32c7049f3585ed6b6a15 on harmony
Message 0x11bf61480a63bcb3a77131d9bd5eecf756579675c95a32c7049f3585ed6b6a15 was delivered
Checking status of message 0x146906d5315af3eaa2db01d4b999426df5dfae1d5ea99ef68a274d5a8e351bdc on shibarium
Message 0x146906d5315af3eaa2db01d4b999426df5dfae1d5ea99ef68a274d5a8e351bdc was delivered
Checking status of message 0x49451d6040aef68faff3163b99d01601f807e3c6f743de523e3c7df227b47314 on rootstockmainnet
Message 0x49451d6040aef68faff3163b99d01601f807e3c6f743de523e3c7df227b47314 was delivered
Checking status of message 0x716f57169a0faa0a4d895b67a95a82447afae19dd3d62121660cb701b1dd8f0d on xlayer
Message 0x716f57169a0faa0a4d895b67a95a82447afae19dd3d62121660cb701b1dd8f0d was delivered
Checking status of message 0x170ba3d0e049a1f2585308d7114c05726994b394ab0cf2a4c1ef6a13d005e429 on chilizmainnet
Message 0x170ba3d0e049a1f2585308d7114c05726994b394ab0cf2a4c1ef6a13d005e429 was delivered
Checking status of message 0x42197cf0eb431ca1b289e48f4b2f8eaf9ccf7b0a16c425b3bb52cd7e9ebb3ffa on cyber
Message 0x42197cf0eb431ca1b289e48f4b2f8eaf9ccf7b0a16c425b3bb52cd7e9ebb3ffa was delivered
Checking status of message 0x215f8dba14a1fa0f4931abacf0ba59a46691c99b805ea350b6e5d165eb4b5f7d on lukso
Message 0x215f8dba14a1fa0f4931abacf0ba59a46691c99b805ea350b6e5d165eb4b5f7d was delivered
Checking status of message 0x408d4bb711692901b0c61532c614eb442da7b45f230307705143137a7ce4cb52 on merlin
Message 0x408d4bb711692901b0c61532c614eb442da7b45f230307705143137a7ce4cb52 was delivered
Checking status of message 0x5b896efa1c70cd321f2867cedaf4be1934929c9877a175d0095e61f4f2d2a2d1 on apechain
Message 0x5b896efa1c70cd321f2867cedaf4be1934929c9877a175d0095e61f4f2d2a2d1 was delivered
Checking status of message 0xb759a9c039dedd54a0ddab0e970ed7725424a1de42e436c07d28bc67daee609e on mint
Message 0xb759a9c039dedd54a0ddab0e970ed7725424a1de42e436c07d28bc67daee609e was delivered
Checking status of message 0x00e64e88520ee03e5d88cb61ebc2e7d53524dcd84743433716bad70f94e4b897 on arbitrumnova
Message 0x00e64e88520ee03e5d88cb61ebc2e7d53524dcd84743433716bad70f94e4b897 was delivered
Checking status of message 0xf204eea06d7d7c64c145e5a62a5922fdc254d1ffe9390c6883e74ce57e809df9 on prom
Message 0xf204eea06d7d7c64c145e5a62a5922fdc254d1ffe9390c6883e74ce57e809df9 was delivered
Checking status of message 0x125a752d042355bfe6182d80b2553bb2f7c74df3c188376c58b5463d6fb9f370 on astar
Message 0x125a752d042355bfe6182d80b2553bb2f7c74df3c188376c58b5463d6fb9f370 was delivered
Checking status of message 0x5130d380008fc94b04c9b81dca4ed0a445d189e8b6a82b5dc7cc412e56cd4a9b on astarzkevm
Message 0x5130d380008fc94b04c9b81dca4ed0a445d189e8b6a82b5dc7cc412e56cd4a9b was delivered
Checking status of message 0x13e53bdd365bb582e9d8ae5169f6a7cc6fb673c60824552c1e1cf44f3836dc3a on morph
Message 0x13e53bdd365bb582e9d8ae5169f6a7cc6fb673c60824552c1e1cf44f3836dc3a was delivered
Checking status of message 0x811bd7834b02ade059deaad3aea6f2bfb652019ee0b9f73ebc558686d58e7a8b on dogechain
Message 0x811bd7834b02ade059deaad3aea6f2bfb652019ee0b9f73ebc558686d58e7a8b was delivered
Checking status of message 0x61d0d7a5952aff88d962e0f6891f9e87e841982fffd27f595d9c9b8d88ab60aa on superseed
Message 0x61d0d7a5952aff88d962e0f6891f9e87e841982fffd27f595d9c9b8d88ab60aa was delivered
Checking status of message 0x23f2afc9ba360a2e11b90582904af09f5f56f2963ffede3118e6e10458c83e50 on moonbeam
Message 0x23f2afc9ba360a2e11b90582904af09f5f56f2963ffede3118e6e10458c83e50 was delivered
Checking status of message 0x698ae1a2ae198c5d96db7162d8373ad638de647f45a16aeb7512d2b0a9a6c6f7 on sanko
Message 0x698ae1a2ae198c5d96db7162d8373ad638de647f45a16aeb7512d2b0a9a6c6f7 was delivered
Checking status of message 0xe8740981b523da2806556eb39c9c4050b31e9ab80607ab40ae8bfdd10b130e7e on real
Message 0xe8740981b523da2806556eb39c9c4050b31e9ab80607ab40ae8bfdd10b130e7e was delivered
Checking status of message 0x6b6bd8a4c6a243a3405df69b08a16438a066ad9397c3f9d7dcb07b46de2c4284 on alephzeroevmmainnet
Message 0x6b6bd8a4c6a243a3405df69b08a16438a066ad9397c3f9d7dcb07b46de2c4284 was delivered
Checking status of message 0x8d5536254e7df327d13cd0ac1d347ea816c693409f05946933f85120d2453488 on everclear
Message 0x8d5536254e7df327d13cd0ac1d347ea816c693409f05946933f85120d2453488 was delivered
Checking status of message 0x004e26517383e3a90c8df3528e57208ad0cb091207feee14cb5b5ba654ccfa22 on flare
Message 0x004e26517383e3a90c8df3528e57208ad0cb091207feee14cb5b5ba654ccfa22 was delivered
Checking status of message 0xea0ffd9380f1c8e4340b7fb7479701472213557d1b647b90c782a7541cd261fa on immutablezkevmmainnet
Message 0xea0ffd9380f1c8e4340b7fb7479701472213557d1b647b90c782a7541cd261fa was delivered
Checking status of message 0xa907f67a44244da93b9d9cb0bbe270df8044a10be90c4798707a0727e4cae659 on coredao
Message 0xa907f67a44244da93b9d9cb0bbe270df8044a10be90c4798707a0727e4cae659 was delivered
Checking status of message 0x0649707b3ef5a04d4b22a13402fddb6fded89b8616105ae3e1da541ea617f5ca on worldchain
Message 0x0649707b3ef5a04d4b22a13402fddb6fded89b8616105ae3e1da541ea617f5ca was delivered
Checking status of message 0xd847f86f99db8d59fa8990ac8a41558f49c758ce4c8074bf2c23c37e81a4d08e on xai
Message 0xd847f86f99db8d59fa8990ac8a41558f49c758ce4c8074bf2c23c37e81a4d08e was delivered
Checking status of message 0xdd9d0252a9f4b8d571834db046311ad2b76385ef33e14a381d8fdcdb57ed0dd3 on unichain
Message 0xdd9d0252a9f4b8d571834db046311ad2b76385ef33e14a381d8fdcdb57ed0dd3 was delivered
Checking status of message 0xf72776b71109674e3aec514e4ffea1058c4f2b88224f12068cf328a99f99856a on b3
Message 0xf72776b71109674e3aec514e4ffea1058c4f2b88224f12068cf328a99f99856a was delivered
Checking status of message 0xfa889d5fc81bded784b0dc97228372a4947e1320fe04fe442286aa0c94b71bbf on vana
Message 0xfa889d5fc81bded784b0dc97228372a4947e1320fe04fe442286aa0c94b71bbf was delivered
Checking status of message 0xe197b6e1116dbe8f8bbe7676033143f6a1f82fbfd88f39e2adb4142a379a98bd on endurance
Message 0xe197b6e1116dbe8f8bbe7676033143f6a1f82fbfd88f39e2adb4142a379a98bd was delivered
Checking status of message 0x67546be1d30a2154c150411a7d5e3cd12d277ad4f55e1bd50277af12f4465ce3 on inevm
Message 0x67546be1d30a2154c150411a7d5e3cd12d277ad4f55e1bd50277af12f4465ce3 was delivered
Checking status of message 0xd3af75c6f2688b0fa8a68fef0c7bea1bd096ca201ff2443b8ca9b6b33516a8e8 on tangle
Message 0xd3af75c6f2688b0fa8a68fef0c7bea1bd096ca201ff2443b8ca9b6b33516a8e8 was delivered
Checking status of message 0x180897afcd9ea6b7ea7e73cacca55bd223b6357f201e99657cd23e2b781f3916 on boba
Message 0x180897afcd9ea6b7ea7e73cacca55bd223b6357f201e99657cd23e2b781f3916 was delivered
Checking status of message 0x9663665c6579d4607e569ff7ed0b9df4e3d2cac4ad5790aa9340356ccec4ddbb on orderly
Message 0x9663665c6579d4607e569ff7ed0b9df4e3d2cac4ad5790aa9340356ccec4ddbb was delivered
Checking status of message 0x71582853e19ffcd85004928ed2f125b10db015cfeb1f180b06d222628ae356c7 on degenchain
Message 0x71582853e19ffcd85004928ed2f125b10db015cfeb1f180b06d222628ae356c7 was delivered
Checking status of message 0xbd96b2fb0b938831b20e30414533956e21e0b24df5c55971b1bf143915fd24c6 on oortmainnet
Message 0xbd96b2fb0b938831b20e30414533956e21e0b24df5c55971b1bf143915fd24c6 was delivered
Checking status of message 0xa0b1a56f4c47c939d47d7c64401b736f0a5797a7e2cdb83e8cb360c61d8b1ec9 on fantom
Message 0xa0b1a56f4c47c939d47d7c64401b736f0a5797a7e2cdb83e8cb360c61d8b1ec9 was delivered
Checking status of message 0xae2ee30ced87d19f5761e80c564ffff4f6ba98ef87bc0a16c69e5dfd4aafd74b on mantle
Message 0xae2ee30ced87d19f5761e80c564ffff4f6ba98ef87bc0a16c69e5dfd4aafd74b was delivered
Checking status of message 0x43c48ee511ee24019bb938ecb5ac9159d4b973b52bffc3c9765894f5d118b022 on polynomialfi
Message 0x43c48ee511ee24019bb938ecb5ac9159d4b973b52bffc3c9765894f5d118b022 was delivered
Checking status of message 0xee54dde1a75c8219f307bbce84fb3eb16fdcc5b05b3609b5adf2b8a32d022232 on bob
Message 0xee54dde1a75c8219f307bbce84fb3eb16fdcc5b05b3609b5adf2b8a32d022232 was delivered
Checking status of message 0x3ccc0fd020089e3fcb51e5ee057aee6666bd06096ae9c04cff889f5cfbf4b62b on fusemainnet
Message 0x3ccc0fd020089e3fcb51e5ee057aee6666bd06096ae9c04cff889f5cfbf4b62b was delivered
Checking status of message 0xeb16ee6f398d3a2c4a60edb8a797b5df56b7f8b1b43f336bded666536c038508 on kaia
Message 0xeb16ee6f398d3a2c4a60edb8a797b5df56b7f8b1b43f336bded666536c038508 was delivered
Checking status of message 0xcf23f9de2c9db41136fb9c2fdfd3f9c47378a7e10296cdc1b2d02440effa1f20 on metal
Message 0xcf23f9de2c9db41136fb9c2fdfd3f9c47378a7e10296cdc1b2d02440effa1f20 was delivered
Checking status of message 0x172604a47d0b6de9bc40c3ad9eff75294711533646836e12d4c4238be8c07faf on metis
Message 0x172604a47d0b6de9bc40c3ad9eff75294711533646836e12d4c4238be8c07faf was delivered
Checking status of message 0xc9cf61e11586a8578f2cfc637919954f24bdf011787b751ca9dd107a11a1b5af on rarichain
Message 0xc9cf61e11586a8578f2cfc637919954f24bdf011787b751ca9dd107a11a1b5af was delivered
Checking status of message 0x01cf143ee8da8d82d9c72f152e25658665d0d2f52a94cf2ebab0d433f9432a69 on snaxchain
Message 0x01cf143ee8da8d82d9c72f152e25658665d0d2f52a94cf2ebab0d433f9432a69 was delivered
Checking status of message 0x1574e00fffb8737c5a3ab3dd2efbdaec13dfaba98be3cbd9c49fdbb1c34b0275 on polygon
Message 0x1574e00fffb8737c5a3ab3dd2efbdaec13dfaba98be3cbd9c49fdbb1c34b0275 was delivered
Checking status of message 0x7e2ca4f70b77a70333bc736ba75bc0e70482aacc3d5c1022bf4c74352e14a849 on bsquared
Message 0x7e2ca4f70b77a70333bc736ba75bc0e70482aacc3d5c1022bf4c74352e14a849 was delivered
Checking status of message 0x84b20bbbdb401d3e42f99b8bb18a78e07812906a2992ec16baa3dc1779ce1dc0 on scroll
Message 0x84b20bbbdb401d3e42f99b8bb18a78e07812906a2992ec16baa3dc1779ce1dc0 was delivered
Checking status of message 0x082ef17aee560b3497cd61621b7233b919fda83dd729b3c99c97423485891317 on redstone
Message 0x082ef17aee560b3497cd61621b7233b919fda83dd729b3c99c97423485891317 was delivered
Checking status of message 0xb81a893a09ac7432f678d19d6072da17094a7530ecbeb99d132ce535ee92583b on proofofplay
Message 0xb81a893a09ac7432f678d19d6072da17094a7530ecbeb99d132ce535ee92583b was delivered
Checking status of message 0x7e2013853d26a64346de2dfe7cfa324e7f497db3865453cddb9c511b2398a9b9 on duckchain
Message 0x7e2013853d26a64346de2dfe7cfa324e7f497db3865453cddb9c511b2398a9b9 was delivered
Checking status of message 0xe355415b1d57853ac7479d9db40c2c060e80834cb5360e6ff7868bd2d455875b on polygonzkevm
Message 0xe355415b1d57853ac7479d9db40c2c060e80834cb5360e6ff7868bd2d455875b was delivered
Checking status of message 0xb0391835a971c5936f8407b58bea5cef1f4dd761f2cf875b06107c8cff7fce75 on ancient8
Message 0xb0391835a971c5936f8407b58bea5cef1f4dd761f2cf875b06107c8cff7fce75 was delivered
Checking status of message 0xf8a9f9e6468d609711e2596d905f8e3c642f912de06efe79312e88b0d7b2957e on swell
Message 0xf8a9f9e6468d609711e2596d905f8e3c642f912de06efe79312e88b0d7b2957e was delivered
Checking status of message 0x0fd455f8b27982e6d4cb0f6e082baa8ee42d461073335ab0cefe6c65f9e0c018 on avalanche
Message 0x0fd455f8b27982e6d4cb0f6e082baa8ee42d461073335ab0cefe6c65f9e0c018 was delivered
Checking status of message 0xaefe33e5517790e3644a28c841cd45ea352e2afb34753fb5268a4778ca52ce66 on gnosis
Message 0xaefe33e5517790e3644a28c841cd45ea352e2afb34753fb5268a4778ca52ce66 was delivered
Checking status of message 0xbbb2293291a684292e3c6bdaa4bfc9ffd38c7e2b5fcc6edc7ec470f6331f7931 on celo
Message 0xbbb2293291a684292e3c6bdaa4bfc9ffd38c7e2b5fcc6edc7ec470f6331f7931 was delivered
Checking status of message 0x50aa9ebcbf4ce4ed8d0e21580bf2ae56cf9c2983e0c373463261dfca065e9606 on zoramainnet
Message 0x50aa9ebcbf4ce4ed8d0e21580bf2ae56cf9c2983e0c373463261dfca065e9606 was delivered
Checking status of message 0xe7d2bd88c7ee856bda482e8db56c49bc35b2212bbf8b74a108e6e4ec146f00a8 on zetachain
Message 0xe7d2bd88c7ee856bda482e8db56c49bc35b2212bbf8b74a108e6e4ec146f00a8 was delivered

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: 2ea23c1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@hyperlane-xyz/cli Minor
@hyperlane-xyz/sdk Minor
@hyperlane-xyz/helloworld Minor
@hyperlane-xyz/infra Minor
@hyperlane-xyz/widgets Minor
@hyperlane-xyz/ccip-server Minor
@hyperlane-xyz/github-proxy Minor
@hyperlane-xyz/utils Minor
@hyperlane-xyz/core Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

codecov bot commented Nov 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.53%. Comparing base (c2ca849) to head (2ea23c1).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4812   +/-   ##
=======================================
  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% <ø> (ø)

@yorhodes
Copy link
Member Author

would be cool to use this for #4722

@paulbalaji paulbalaji changed the title Implement multiple message relay feat: implement multi-message relay Dec 13, 2024
@paulbalaji paulbalaji marked this pull request as ready for review December 13, 2024 12:10
@paulbalaji paulbalaji requested a review from xeno097 December 13, 2024 13:10
@@ -19,12 +19,11 @@ export const statusCommand: CommandModuleWithWriteContext<
description: 'Dispatch transaction hash',
},
},
handler: async ({ context, origin, destination, id, relay, dispatchTx }) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Considering that the destination var is unused maybe we should remove it from the command options too so that users won't try to set it and then see unexpected results because the value is not used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Review
Development

Successfully merging this pull request may close these issues.

3 participants