From 08589e8dbedcedabdec9b1c154bb7e6ed224850c Mon Sep 17 00:00:00 2001 From: curlypoint Date: Mon, 15 Jan 2024 18:26:40 +0530 Subject: [PATCH 1/3] add docs for polygonZkevm Bridge and hook --- docs/reference/hooks/polygon-zkevm.mdx | 49 ++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 docs/reference/hooks/polygon-zkevm.mdx diff --git a/docs/reference/hooks/polygon-zkevm.mdx b/docs/reference/hooks/polygon-zkevm.mdx new file mode 100644 index 00000000..4a87c5ca --- /dev/null +++ b/docs/reference/hooks/polygon-zkevm.mdx @@ -0,0 +1,49 @@ + +# PolygonZkevm ISM and hook +Polygon Zkevm have their own bridging interface to transfer assets and messages across the parent and child chain - [zkEVM Bridge](https://docs.polygon.technology/zkEVM/architecture/protocol/zkevm-bridge/). Message ID is passed via this interface to verify the integrity of the message sent across chain using hyperlane messenger. + +To provide this security option in Hyperlane we created the hook and ISM combo that can be transparently configured to use the zkEVM bridge. + +See the [addresses](../contract-addresses.mdx) page for Hook and ISM addresses. + +## How It Works + +here's the flow for how the system works (this applies to L1 <-> L2 and L2<->L1) : + +the ism verifies if the message has been sent by the hook + + +```mermaid +flowchart TB + subgraph Origin Ethereum + Sender + M_O[(Mailbox)] + Hook[PolygonZkEvmHook] + Eth[(zkEVM Bridge)] + + Sender -- "dispatch(...)" --> M_O + M_O -- "postDispatch(message)" --> Hook + Hook -- "sendMessage(messageId)" --> Eth + end + + M_O -. "relay" .-> M_D + Eth -. "Rollup sync" .-> Polygon + + subgraph Destination Polygon zkEvm chain + Recipient + M_D[(Mailbox)] + ISM{PolygonZkEvmISM} + Polygon[(zkEVM Bridge)] + + M_D -- "verify(..., message)" --> ISM + M_D -- "handle(...)" --> Recipient + ISM -. "interchainSecurityModule()" .- Recipient + + Polygon -- "verifyMessageId(messageId)" --> ISM + end + + style Eth fill: #ff0402 + style Polygon fill: #ff0402 +``` + + From 13c9ce72e8b67a5a9ef04ab55772f8eb1a98110c Mon Sep 17 00:00:00 2001 From: curly point <104732858+curlypoint@users.noreply.github.com> Date: Mon, 15 Jan 2024 18:32:56 +0530 Subject: [PATCH 2/3] Update polygon-zkevm.mdx --- docs/reference/hooks/polygon-zkevm.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/hooks/polygon-zkevm.mdx b/docs/reference/hooks/polygon-zkevm.mdx index 4a87c5ca..21f19011 100644 --- a/docs/reference/hooks/polygon-zkevm.mdx +++ b/docs/reference/hooks/polygon-zkevm.mdx @@ -8,7 +8,7 @@ See the [addresses](../contract-addresses.mdx) page for Hook and ISM addresses. ## How It Works -here's the flow for how the system works (this applies to L1 <-> L2 and L2<->L1) : +here's the flow for how the system works (this applies to `L1 <-> L2` and `L2<->L1`) : the ism verifies if the message has been sent by the hook From b1d52f11b95976fbb54b47804000e79d3f61d9ef Mon Sep 17 00:00:00 2001 From: curly point <104732858+curlypoint@users.noreply.github.com> Date: Fri, 19 Jan 2024 02:40:36 +0530 Subject: [PATCH 3/3] Update polygon-zkevm.mdx --- docs/reference/hooks/polygon-zkevm.mdx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/reference/hooks/polygon-zkevm.mdx b/docs/reference/hooks/polygon-zkevm.mdx index 21f19011..f4276919 100644 --- a/docs/reference/hooks/polygon-zkevm.mdx +++ b/docs/reference/hooks/polygon-zkevm.mdx @@ -27,9 +27,10 @@ flowchart TB end M_O -. "relay" .-> M_D - Eth -. "Rollup sync" .-> Polygon subgraph Destination Polygon zkEvm chain + Eth -. "Rollup sync" .-> Polygon + Recipient M_D[(Mailbox)] ISM{PolygonZkEvmISM} @@ -39,7 +40,9 @@ flowchart TB M_D -- "handle(...)" --> Recipient ISM -. "interchainSecurityModule()" .- Recipient - Polygon -- "verifyMessageId(messageId)" --> ISM + + ISM -- "claimMessage(messageId)" --> Polygon + Polygon -- "onMessageRecieved(messageId)" --> ISM end style Eth fill: #ff0402