Skip to content

Commit

Permalink
fixing function documentation and README
Browse files Browse the repository at this point in the history
  • Loading branch information
raffaele-oplabs committed Oct 10, 2024
1 parent 88bb56c commit fc7037f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 12 deletions.
10 changes: 6 additions & 4 deletions op-monitorism/fault/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

The fault monitor checks for changes in output roots posted to the `L2OutputOracle` contract. On change, reconstructing the output root from a trusted L2 source and looking for a match

NOTE: Fault monitor only working against chains Pre-Faultproof. For chains using Faultproof system please check [dispute-mon service](https://github.com/ethereum-optimism/optimism/blob/develop/op-dispute-mon/README.md)

```
OPTIONS:
--l1.node.url value [$FAULT_MON_L1_NODE_URL] Node URL of L1 peer (default: "127.0.0.1:8545")
--l2.node.url value [$FAULT_MON_L2_NODE_URL] Node URL of L2 peer (default: "127.0.0.1:9545")
--start.output.index value [$FAULT_MON_START_OUTPUT_INDEX] Output index to start from. -1 to find first unfinalized index (default: -1)
--optimismportal.address value [$FAULT_MON_OPTIMISM_PORTAL] Address of the OptimismPortal contract
--l1.node.url value Node URL of L1 peer Geth node [$FAULT_MON_L1_NODE_URL]
--l2.node.url value Node URL of L2 peer Op-Geth node [$FAULT_MON_L2_NODE_URL]
--start.output.index value Output index to start from. -1 to find first unfinalized index (default: -1) [$FAULT_MON_START_OUTPUT_INDEX]
--optimismportal.address value Address of the OptimismPortal contract [$FAULT_MON_OPTIMISM_PORTAL]
```

On mismatch the `isCurrentlyMismatched` metrics is set to `1`.
6 changes: 2 additions & 4 deletions op-monitorism/fault/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,12 @@ func CLIFlags(envVar string) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: L1NodeURLFlagName,
Usage: "Node URL of L1 peer",
Value: "127.0.0.1:8545",
Usage: "Node URL of L1 peer Geth node",
EnvVars: opservice.PrefixEnvVar(envVar, "L1_NODE_URL"),
},
&cli.StringFlag{
Name: L2NodeURLFlagName,
Usage: "Node URL of L2 peer",
Value: "127.0.0.1:9545",
Usage: "Node URL of L2 peer Op-Geth node",
EnvVars: opservice.PrefixEnvVar(envVar, "L2_NODE_URL"),
},
&cli.Int64Flag{
Expand Down
16 changes: 16 additions & 0 deletions op-monitorism/withdrawals/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Purpose of the Service
faultproof_withdrawals has the following purpose:
- Monitor Withdrawals: The service listens for WithdrawalProven events on the OptimismPortal contract on L1.
- Validate Withdrawals: It verifies the validity of these withdrawals by checking the corresponding state on L2.
- Detect Forgeries: The service identifies and reports any invalid withdrawals or potential forgeries.

NOTE: Withdrawal monitor is only working against chains Pre-Faultproof. For chains using Faultproof system please check [faultproof_withdrwals service](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/faultproof_withdrawals/README.md)

```bash
OPTIONS:
--l1.node.url value Node URL of L1 peer Geth node [$WITHDRAWAL_MON_L1_NODE_URL]
--l2.node.url value Node URL of L2 peer Op-Geth node [$WITHDRAWAL_MON_L2_NODE_URL]
--event.block.range value Max block range when scanning for events (default: 1000) [$WITHDRAWAL_MON_EVENT_BLOCK_RANGE]
--start.block.height value Starting height to scan for events (default: 0) [$WITHDRAWAL_MON_START_BLOCK_HEIGHT]
--optimismportal.address value Address of the OptimismPortal contract [$WITHDRAWAL_MON_OPTIMISM_PORTAL]
```
6 changes: 2 additions & 4 deletions op-monitorism/withdrawals/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,12 @@ func CLIFlags(envVar string) []cli.Flag {
return []cli.Flag{
&cli.StringFlag{
Name: L1NodeURLFlagName,
Usage: "Node URL of L1 peer",
Value: "127.0.0.1:8545",
Usage: "Node URL of L1 peer Geth node",
EnvVars: opservice.PrefixEnvVar(envVar, "L1_NODE_URL"),
},
&cli.StringFlag{
Name: L2NodeURLFlagName,
Usage: "Node URL of L2 peer",
Value: "127.0.0.1:9545",
Usage: "Node URL of L2 peer Op-Geth node",
EnvVars: opservice.PrefixEnvVar(envVar, "L2_NODE_URL"),
},
&cli.Uint64Flag{
Expand Down

0 comments on commit fc7037f

Please sign in to comment.