Skip to content

Commit 553f1aa

Browse files
committed
feat: update Database Growth Impact Recovery Path
1 parent 6dd8156 commit 553f1aa

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

security/fma-operator-fee.md

+17-8
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ Below are references for this project:
3838

3939
### FM1: Operator Fee scalars are set to incorrect values
4040

41-
- **Description:**
41+
- **Description:**
4242
If the operator fee scalars are incorrectly initialized or updated, there is a risk that the transactions fees will be too high. This could lead to a situation where the chain becomes unusable.
4343
- **Risk Assessment:**
4444
High impact, low likelihood.
4545
**Mitigations:**
4646
Before setting or updating the operator fee params, the operator should carefully read the [corresponding specs](https://specs.optimism.io/protocol/isthmus/exec-engine.html#operator-fee) and simulate the impact of operator fee on the whole transaction cost.
47-
- **Detection:**
47+
- **Detection:**
4848
By default, the operator fee parameters are set to 0 and the feature is disabled. There are [E2E tests](https://github.com/ethereum-optimism/optimism/blob/develop/op-e2e/system/fees/fees_test.go) that ensure there is no impact on the transaction cost when the operator fee is disabled.
4949

5050
On chains that enable operator fee, the operator should monitor the transaction cost and ensure that the operator fee is not too high.
@@ -55,14 +55,14 @@ Below are references for this project:
5555

5656
### FM2: Broken Fee Estimation (Wallets)
5757

58-
- **Description:**
58+
- **Description:**
5959
If wallets fail to update their fee estimation logic, users will no longer be shown the accurate costs of a transaction.
6060
- **Risk Assessment:**
6161
This failure mode can only happen on chains that enable the operator fee feature.
6262
Medium impact, medium likelihood.
6363
**Mitigations:**
6464
Coordinate with wallet providers to update their fee estimation logic. This includes MetaMask, Coinbase Wallet, and others.
65-
- **Detection:**
65+
- **Detection:**
6666
Using a given wallet, compare the estimated transaction cost with the actual transaction cost, and check if the difference relates to the operator fee, using the formula.
6767
- **Recovery Path(s)**:
6868
Notify wallets of the new fee structure and ask them to update their fee estimation logic if the operator fee is enabled.
@@ -105,18 +105,27 @@ Below are references for this project:
105105

106106
So, about 3,7 GB for 1 year.
107107
- **Recovery Path(s):**
108+
The decision has been made to not store operator fee parameters in the
109+
receipts if their values hasn't been set. So updated database growth rate is the following:
110+
111+
```
112+
(12 bytes / 2 seconds) x 365 days × 24 hours × 60 minutes × 60 seconds = 189,216,000 bytes in 1 year.
113+
```
114+
115+
So, about 180 GB for 1 year. Therefore, we don't think the following recovery paths are necessary anymore:
116+
108117
- Use archive nodes to maintain historical data.
109-
- Consider implementing receipt compression retroactively if needed.
118+
- Consider implementing receipt compression retroactively.
110119

111120
### Generic items we need to take into account: `L1Block` badly hydrated
112121

113122
- **Description:** At each hardfork, new data can be add to the `L1Block` contract, and the method called to hydrate it change (for instance
114123
`setL1BlockValuesEcotone` to `setL1BlockValuesIsthmus`). If there is a bug in a future method ending up to operator fee params no
115124
longer being updated in the `L1Block` contract, the operator fee will no longer be taken into account in transactions fee.
116125
- **Risk Assessment:** medium severity / low likelihood
117-
- **Mitigations:**
126+
- **Mitigations:**
118127
The [Operator Fee Constistency](https://github.com/ethereum-optimism/optimism/blob/develop/op-e2e/actions/proofs/operator_fee_test.go ) action test runs with all known hardforks activated at genesis, and checks that operator fee parameters are correctly reported to the `L1Block` contract.
119-
- **Detection:**
128+
- **Detection:**
120129
The action or E2E tests or local testing may pick up an issue.
121130
- **Recovery Path(s):**
122131
- If the bug is located in op-node, a new version must be deployed.
@@ -127,4 +136,4 @@ Below are references for this project:
127136
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:
128137

129138
- [ ] Coordinate with wallet providers to update their fee estimation logic
130-
- [ ] Implement automated monitoring on dabase growth rate
139+
- [x] Implement automated monitoring on dabase growth rate

0 commit comments

Comments
 (0)