From aa73dea2468cf6e7ae220295c05eab36b51ec46c Mon Sep 17 00:00:00 2001 From: Ori Pomerantz Date: Mon, 27 Jan 2025 12:56:17 -0600 Subject: [PATCH 1/4] Better explanation of what equivocation does --- pages/stack/interop/security.mdx | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/pages/stack/interop/security.mdx b/pages/stack/interop/security.mdx index 67f20f561..4ef925d30 100644 --- a/pages/stack/interop/security.mdx +++ b/pages/stack/interop/security.mdx @@ -62,7 +62,15 @@ L2 blocks start as unsafe, meaning that there's no L1 evidence for them, and the Sending out incorrect information, for example that a certain transaction is included in a block when it isn't, is called *equivocation*. A sequencer that builds blocks with interop can choose to accept messages from unsafe blocks (received through the gossip protocol), for minimal latency. -However, because of equivocation risk, a block that is written to L1 (*local safe*) can only be considered truly safe (the technical term is *cross safe*), for itself and the previous blocks in its blockchain are also written to L1. +Because of equivocation risk, a block that is written to L1 (*local safe*) can only be considered truly safe (the technical term is *cross safe*), for itself and the previous blocks in its blockchain are also written to L1. + +If the source block is written to L1 first, the destination sequencer can detect it. +If because of equivocation it is missing an initiating message that the sequencer relied upon, the sequencer can detect the error and recalculate the state. +In this case, no significant harm is done. + +However, it is also possible that the destination block, the one with the executing message that relies on the initiating message, is written to L1 first (for example, because it is a chain with more traffic). +In that case, if the source block that gets written to L1 does not have the initiating message, all the verifiers will see that the derivation of the destination block (and any block that depends on it) is wrong. +In this case the destination block, and any block in any chain that depends upon it, become deposit only blocks. ```mermaid @@ -71,14 +79,18 @@ sequenceDiagram participant src as Source Chain participant dst as Destination Chain participant l1 as Ethereum Mainnet + note over src,dst: ↓ Initiating message ↓ src->>dst: Block src_n will have transaction txn_0 that emits log event evt_0 - note over src,dst: Initiating message - app->>dst: Transaction txn_1: If you have evt_0, call contract C with the data in evt_0. - note over app,dst: Executing message + note over app,dst: ↓ Executing message ↓ + app->>dst: Transaction txn_1: If you have evt_0, call contract C with the data in evt_0. Otherwise, revert. note left of dst: Block dst_m will
have the results of
calling contract C
with the data in evt_0. break note over app,l1: time passes end + dst->>l1: Write block dst_m, which includes a successful txn_1. + break + note over app,l1: time passes + end src->>l1: Write block src_n without txn_0 (so no evt_0) l1->>dst: This is the safe block src_n note left of dst: No evt_0, so block dst_m is incorrect
and so is every subsequent block.
All those blocks are replaced with
deposit only blocks. @@ -102,10 +114,10 @@ sequenceDiagram participant src as Source Chain participant dst as Destination Chain participant l1 as Ethereum Mainnet + note over src,dst: ↓ Initiating message ↓ src->>dst: Block src_n will have transaction txn_0 that emits log event evt_0 - note over src,dst: Initiating message - app->>dst: Transaction txn_1: If you have evt_0, call contract C with the data in evt_0. - note over app,dst: Executing message + note over app,dst: ↓ Executing message ↓ + app->>dst: Transaction txn_1: If you have evt_0, call contract C with the data in evt_0, otherwise revert. note over dst: Block src_n is not safe yet,
txn_1 fails break note over app,l1: time passes From cef3f24ed8eeab9b47b14003b7aeb4296d7fe572 Mon Sep 17 00:00:00 2001 From: Zain Bacchus Date: Mon, 27 Jan 2025 14:47:35 -0600 Subject: [PATCH 2/4] Update pages/stack/interop/security.mdx Co-authored-by: Blessing Krofegha --- pages/stack/interop/security.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/stack/interop/security.mdx b/pages/stack/interop/security.mdx index 4ef925d30..376e26fd2 100644 --- a/pages/stack/interop/security.mdx +++ b/pages/stack/interop/security.mdx @@ -68,9 +68,9 @@ If the source block is written to L1 first, the destination sequencer can detect If because of equivocation it is missing an initiating message that the sequencer relied upon, the sequencer can detect the error and recalculate the state. In this case, no significant harm is done. -However, it is also possible that the destination block, the one with the executing message that relies on the initiating message, is written to L1 first (for example, because it is a chain with more traffic). -In that case, if the source block that gets written to L1 does not have the initiating message, all the verifiers will see that the derivation of the destination block (and any block that depends on it) is wrong. -In this case the destination block, and any block in any chain that depends upon it, become deposit only blocks. +However, if the destination block—containing the executing message that depends on the initiating message—is written to L1 first (e.g., due to higher traffic on the chain), a different risk arises. +If the source block that is eventually written to L1 lacks the initiating message, verifiers will detect that the derivation of the destination block, and any blocks dependent on it, is incorrect. +In this case, the destination block and all subsequent blocks on any chain that depend on it are classified as deposit-only blocks. ```mermaid From d61d55d818167b7af3b9fb29ea30d32600240f20 Mon Sep 17 00:00:00 2001 From: Zain Bacchus Date: Mon, 27 Jan 2025 14:47:42 -0600 Subject: [PATCH 3/4] Update pages/stack/interop/security.mdx Co-authored-by: Blessing Krofegha --- pages/stack/interop/security.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/stack/interop/security.mdx b/pages/stack/interop/security.mdx index 376e26fd2..5658360e1 100644 --- a/pages/stack/interop/security.mdx +++ b/pages/stack/interop/security.mdx @@ -65,8 +65,7 @@ A sequencer that builds blocks with interop can choose to accept messages from u Because of equivocation risk, a block that is written to L1 (*local safe*) can only be considered truly safe (the technical term is *cross safe*), for itself and the previous blocks in its blockchain are also written to L1. If the source block is written to L1 first, the destination sequencer can detect it. -If because of equivocation it is missing an initiating message that the sequencer relied upon, the sequencer can detect the error and recalculate the state. -In this case, no significant harm is done. +If the source block is missing an initiating message that the sequencer relied on due to equivocation, the sequencer can identify the error and recalculate the state. In this scenario, no significant harm occurs. However, if the destination block—containing the executing message that depends on the initiating message—is written to L1 first (e.g., due to higher traffic on the chain), a different risk arises. If the source block that is eventually written to L1 lacks the initiating message, verifiers will detect that the derivation of the destination block, and any blocks dependent on it, is incorrect. From 22f7f93d3300928dd8e929564d468051e6d49cfe Mon Sep 17 00:00:00 2001 From: Zain Bacchus Date: Mon, 27 Jan 2025 14:48:09 -0600 Subject: [PATCH 4/4] Update pages/stack/interop/security.mdx Co-authored-by: Blessing Krofegha --- pages/stack/interop/security.mdx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pages/stack/interop/security.mdx b/pages/stack/interop/security.mdx index 5658360e1..d3979ca37 100644 --- a/pages/stack/interop/security.mdx +++ b/pages/stack/interop/security.mdx @@ -62,8 +62,7 @@ L2 blocks start as unsafe, meaning that there's no L1 evidence for them, and the Sending out incorrect information, for example that a certain transaction is included in a block when it isn't, is called *equivocation*. A sequencer that builds blocks with interop can choose to accept messages from unsafe blocks (received through the gossip protocol), for minimal latency. -Because of equivocation risk, a block that is written to L1 (*local safe*) can only be considered truly safe (the technical term is *cross safe*), for itself and the previous blocks in its blockchain are also written to L1. - +To minimize the risk of equivocation, a block written to L1 (*local safe*) is only considered fully safe (*cross safe*) once both that block and all preceding blocks in its blockchain are also written to L1. If the source block is written to L1 first, the destination sequencer can detect it. If the source block is missing an initiating message that the sequencer relied on due to equivocation, the sequencer can identify the error and recalculate the state. In this scenario, no significant harm occurs.