Skip to content

Commit 417ef09

Browse files
committed
add some flesh
1 parent eded6d0 commit 417ef09

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

security/fma-multi-threaded-64-bit-cannon.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -54,42 +54,42 @@ This document covers the conversion of the [Cannon Fault Proof VM](https://docs.
5454
### Unimplemented syscalls or opcodes needed by `op-program`
5555

5656
- **Description:** We only aim to implement syscalls and opcodes that are required by `op-program` so there are some unimplemented. The risk is that there is some previously untested code path that uses an opcode or syscall that we haven't implemented and this code path ends up being exercised by an input condition some time in the future.
57-
- **Risk Assessment:** *Simple low/medium/high rating of impact (severity) + likelihood.*
58-
- **Mitigations:** *What mitigations are in place, or what should we add, to reduce the chance of this occurring?*
59-
- **Detection:** *How do we detect if this occurs?*
60-
- **Recovery Path(s)**: *How do we resolve this? Is it a simple, quick recovery or a big effort? Would recovery require a governance vote or a hard fork?*
57+
- **Risk Assessment:** High severity, low likelihood.
58+
- **Mitigations:** We periodically use Cannon to execute the op-program using inputs from op-mainnet and op-sepolia. This periodic cannon runner (vm-runner) runs on oplabs infrastructure.
59+
- **Detection:** Alerting is setup to notify the proofs team whenever the vm-runner fails to complete a cannon run.
60+
- **Recovery Path(s)**: See [Fault Proof Recovery](https://www.notion.so/oplabs/RB-000-Fault-Proofs-Recovery-Runbook-8dad0f1e6d4644c281b0e946c89f345f).
6161

6262
### Failure to run correct VM based on prestate input
6363

64-
- **Description:** The off-chain Cannon [attempts to run the correct VM version based on the prestate input](https://github.com/ethereum-optimism/design-docs/pull/88/files). If it doesn't work correctly the on-chain steps would not match.
65-
- **Risk Assessment:** *Simple low/medium/high rating of impact (severity) + likelihood.*
66-
- **Mitigations:** *What mitigations are in place, or what should we add, to reduce the chance of this occurring?*
67-
- **Detection:** *How do we detect if this occurs?*
68-
- **Recovery Path(s)**: *How do we resolve this? Is it a simple, quick recovery or a big effort? Would recovery require a governance vote or a hard fork?*
64+
- **Description:** The off-chain Cannon [attempts to run the correct VM version based on the prestate input](https://github.com/ethereum-optimism/design-docs/blob/0034943e42b8ab5f9dd9ded2ef2b6b55359c922c/cannon-state-versioning.md). If it doesn't work correctly the on-chain steps would not match.
65+
- **Risk Assessment:** Medium severity, low likelihood.
66+
- **Mitigations:** Multicannon mitigates this issue by embedding a variety of cannon STFs into a single binary. This shifts the concern of ensuring the correct VM selection to multicannon. We also run multicannon on oplabs infra via the vm-runner, to assert the multicannon binary was built correctly.
67+
- **Detection:** This can be detected by manual review. Failing that, it would only be detected when malicious activity occurs and an honest op-challenger fails to generate a fault proof.
68+
- **Recovery Path(s)**: Fix the op-challenger multicannon configuration.
6969

7070
### Mismatch between on-chain and off-chain execution
7171

7272
- **Description:** There could be bugs in the implementation of either the Solidity or Go versions that make them incompatible with each other.
73-
- **Risk Assessment:** *Simple low/medium/high rating of impact (severity) + likelihood.*
74-
- **Mitigations:** *What mitigations are in place, or what should we add, to reduce the chance of this occurring?*
73+
- **Risk Assessment:** High severity, low likelihood.
74+
- **Mitigations:** Diffeerential testing asserts identical on-chain and off-chain execution. A third-party audit (in progress) review of both VMs.
7575
- **Detection:** *How do we detect if this occurs?*
76-
- **Recovery Path(s)**: *How do we resolve this? Is it a simple, quick recovery or a big effort? Would recovery require a governance vote or a hard fork?*
76+
- **Recovery Path(s)**: Depends on the specifics. If the onchain VM implementation is "more correct", then fixing this can be done solely offchain. Otherwise, a governance vote will be needed. As usual, the [Fault Proof Recovery](https://www.notion.so/oplabs/RB-000-Fault-Proofs-Recovery-Runbook-8dad0f1e6d4644c281b0e946c89f345f) provides the best guidance on this.
7777

7878
### Livelocks in the fault proof
7979

80-
- **Description:** *Details of the failure mode go here. What the causes and effects of this failure?*
81-
- **Risk Assessment:** *Simple low/medium/high rating of impact (severity) + likelihood.*
82-
- **Mitigations:** *What mitigations are in place, or what should we add, to reduce the chance of this occurring?*
83-
- **Detection:** *How do we detect if this occurs?*
84-
- **Recovery Path(s)**: *How do we resolve this? Is it a simple, quick recovery or a big effort? Would recovery require a governance vote or a hard fork?*
80+
- **Description:** A livelocked execution prevents an honest challenger from generating a fault proof.
81+
- **Risk Assessment:** High severity, low likelihood.
82+
- **Mitigations:** Manual review of the op-program and a quick review of Go runtime internals. The op-program uses 3 threads, and only one of those threads are used by the mutator main function. This makes livelocks very unlikely.
83+
- **Detection:** This would manifest as an execution that runs forever. Eventually, but well before the dispute period ends, op-dispute-mon will indicate that a game is forecasted to resolve incorrectly.
84+
- **Recovery Path(s)**: See [Fault Proof Recovery](https://www.notion.so/oplabs/RB-000-Fault-Proofs-Recovery-Runbook-8dad0f1e6d4644c281b0e946c89f345f).
8585

8686
### Execution traces too long for the fault proof
8787

88-
- **Description:** *Details of the failure mode go here. What the causes and effects of this failure?*
89-
- **Risk Assessment:** *Simple low/medium/high rating of impact (severity) + likelihood.*
90-
- **Mitigations:** *What mitigations are in place, or what should we add, to reduce the chance of this occurring?*
91-
- **Detection:** *How do we detect if this occurs?*
92-
- **Recovery Path(s)**: *How do we resolve this? Is it a simple, quick recovery or a big effort? Would recovery require a governance vote or a hard fork?*
88+
- **Description:** It's possible that introducing multi-threading/gc greatly increases the execution time of the op-program.
89+
- **Risk Assessment:** Medium severity, low likelihood.
90+
- **Mitigations:** Based on vm-runner executions of 64-bit Cannon and 32-bit singlethreaded cannon, the 64-bit VM executes the op-program much faster than the 32-bit VM. However, we can always use CPUs with beefier single-core performance to mitigate.
91+
- **Detection:** op-dispute-mon notifies proofs team if the op-challenger stops interacting with a game.
92+
- **Recovery Path(s)**: By migrating the op-challenger to a beefier CPU. [Fault Proof Recovery](https://www.notion.so/oplabs/RB-000-Fault-Proofs-Recovery-Runbook-8dad0f1e6d4644c281b0e946c89f345f) provides guidance on when it'll be appropriate to do so.
9393

9494
### [Name of Failure Mode]
9595

@@ -110,7 +110,7 @@ See [./fma-generic-hardfork.md](./fma-generic-hardfork.md).
110110

111111
Below is what needs to be done before launch to reduce the chances of the above failure modes occurring, and to ensure they can be detected and recovered from:
112112

113-
- [ ] Resolve all comments on this document and incorporate them into the document itself (Assignee: document author)
113+
- [ ] Third-party audit the offchain and onchain VM implementation and specification (Assignee: document author)
114114
- [ ] *Action item 2 (Assignee: tag assignee)*
115115
- [ ] *Action item 3 (Assignee: tag assignee)*
116116

0 commit comments

Comments
 (0)