|
1 | 1 | # Monitorism
|
| 2 | + |
2 | 3 | A blockchain surveillance tool that supports monitoring for the OP Stack and EVM-compatible chains.
|
3 | 4 |
|
4 |
| -⚠️ Caution: *Monitorism* is currently in its beta phase and is under active migration 🔨. This implies that *Monitorism* is presently not fully stable. ⚠️ |
| 5 | +## Monitors Component |
5 | 6 |
|
6 |
| -## Development |
7 |
| -After cloning, please run `./bootstrap.sh` to set up the development environment correctly. |
| 7 | +The list of all the monitors currently built into monitorism is below. |
8 | 8 |
|
9 |
| -## Intro |
10 |
| -The cli has the ability to spin up a monitor for varying activities, each emmitting metrics used to setup alerts. |
11 |
| -``` |
12 |
| -COMMANDS: |
13 |
| - multisig Monitors OptimismPortal pause status, Safe nonce, and Pre-Signed nonce stored in 1Password |
14 |
| - fault Monitors output roots posted on L1 against L2 |
15 |
| - withdrawals Monitors proven withdrawals on L1 against L2 |
16 |
| - balances Monitors account balances |
17 |
| - secrets Monitors secrets revealed in the CheckSecrets dripcheck |
18 |
| -``` |
| 9 | +### Global Events Monitor |
19 | 10 |
|
20 |
| -Each monitor has some common configuration, configurable both via cli or env with defaults. |
21 |
| -``` |
22 |
| -OPTIONS: |
23 |
| - --log.level value [$MONITORISM_LOG_LEVEL] The lowest log level that will be output (default: INFO) |
24 |
| - --log.format value [$MONITORISM_LOG_FORMAT] Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', (default: text) |
25 |
| - --log.color [$MONITORISM_LOG_COLOR] Color the log output if in terminal mode (default: false) |
26 |
| - --metrics.enabled [$MONITORISM_METRICS_ENABLED] Enable the metrics server (default: false) |
27 |
| - --metrics.addr value [$MONITORISM_METRICS_ADDR] Metrics listening address (default: "0.0.0.0") |
28 |
| - --metrics.port value [$MONITORISM_METRICS_PORT] Metrics listening port (default: 7300) |
29 |
| - --loop.interval.msec value [$MONITORISM_LOOP_INTERVAL_MSEC] Loop interval of the monitor in milliseconds (default: 60000) |
30 |
| -``` |
| 11 | + |
| 12 | + |
| 13 | +The Global Events Monitor is made for to taking YAML rules as configuration and monitoring the events that are emitted on the chain. |
31 | 14 |
|
32 |
| -## Monitors |
| 15 | +| `op-monitorism/global_events` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/global_events/README.md) | |
| 16 | +| ----------------------------- | --------------------------------------------------------------------------------------------------------- | |
33 | 17 |
|
34 |
| -In addition the common configuration, each monitor also has their specific configuration |
| 18 | +### Liveness Expiration Monitor |
35 | 19 |
|
36 |
| -* **Note**: The environment variable prefix for monitor-specific configuration is different than the global monitor config described above. |
| 20 | + |
| 21 | + |
| 22 | +The Liveness Expiration Monitor is made for monitoring the liveness expiration on Safes. |
| 23 | + |
| 24 | +| `op-monitorism/liveness_expiration` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/liveness_expiration/README.md) | |
| 25 | +| ----------------------------------- | --------------------------------------------------------------------------------------------------------------- | |
37 | 26 |
|
38 | 27 | ### Fault Monitor
|
39 | 28 |
|
40 |
| -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 |
41 |
| -``` |
42 |
| -OPTIONS: |
43 |
| - --l1.node.url value [$FAULT_MON_L1_NODE_URL] Node URL of L1 peer (default: "127.0.0.1:8545") |
44 |
| - --l2.node.url value [$FAULT_MON_L2_NODE_URL] Node URL of L2 peer (default: "127.0.0.1:9545") |
45 |
| - --start.output.index value [$FAULT_MON_START_OUTPUT_INDEX] Output index to start from. -1 to find first unfinalized index (default: -1) |
46 |
| - --optimismportal.address value [$FAULT_MON_OPTIMISM_PORTAL] Address of the OptimismPortal contract |
47 |
| -``` |
| 29 | +The fault monitor checks for changes in output roots posted to the `L2OutputOracle` contract. |
| 30 | +On change, reconstructing the output root from a trusted L2 source and looking for a match. |
48 | 31 |
|
49 |
| -On mismatch the `isCurrentlyMismatched` metrics is set to `1`. |
| 32 | +| `op-monitorism/fault` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/fault/README.md) | |
| 33 | +| --------------------- | ------------------------------------------------------------------------------------------------- | |
50 | 34 |
|
51 | 35 | ### Withdrawals Monitor
|
52 | 36 |
|
53 |
| -The withdrawals monitor checks for new withdrawals that have been proven to the `OptimismPortal` contract. Each withdrawal is checked against the `L2ToL1MessagePasser` contract |
54 |
| -``` |
55 |
| -OPTIONS: |
56 |
| - --l1.node.url value [$WITHDRAWAL_MON_L1_NODE_URL] Node URL of L1 peer (default: "127.0.0.1:8545") |
57 |
| - --l2.node.url value [$WITHDRAWAL_MON_L2_NODE_URL] Node URL of L2 peer (default: "127.0.0.1:9545") |
58 |
| - --event.block.range value [$WITHDRAWAL_MON_EVENT_BLOCK_RANGE] Max block range when scanning for events (default: 1000) |
59 |
| - --start.block.height value [$WITHDRAWAL_MON_START_BLOCK_HEIGHT] Starting height to scan for events |
60 |
| - --optimismportal.address value [$WITHDRAWAL_MON_OPTIMISM_PORTAL] Address of the OptimismPortal contract |
61 |
| -``` |
| 37 | +The withdrawals monitor checks for new withdrawals that have been proven to the `OptimismPortal` contract. |
| 38 | +Each withdrawal is checked against the `L2ToL1MessagePasser` contract. |
62 | 39 |
|
63 |
| -If a proven withdrawal is missing from L2, the `isDetectingForgeries` metrics is set to `1`. |
| 40 | +| `op-monitorism/withdrawals` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/withdrawals/README.md) | |
| 41 | +| --------------------------- | ------------------------------------------------------------------------------------------------------- | |
64 | 42 |
|
65 | 43 | ### Balances Monitor
|
66 | 44 |
|
67 | 45 | The balances monitor simply emits a metric reporting the balances for the configured accounts.
|
68 |
| -``` |
69 |
| -OPTIONS: |
70 |
| - --node.url value [$BALANCE_MON_NODE_URL] Node URL of a peer (default: "127.0.0.1:8545") |
71 |
| - --accounts address:nickname [ --accounts address:nickname ] [$BALANCE_MON_ACCOUNTS] One or accounts formatted via address:nickname |
72 |
| -``` |
| 46 | + |
| 47 | +| `op-monitorism/balances` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/balances/README.md) | |
| 48 | +| ------------------------ | ---------------------------------------------------------------------------------------------------- | |
73 | 49 |
|
74 | 50 | ### Multisig Monitor
|
75 | 51 |
|
76 |
| -The multisig monitor reports the paused status of the `OptimismPortal` contract. If set, the latest nonce of the configued `Safe` address. And also if set, the latest presigned nonce stored in One Password. The latest presigned nonce is identifyed by looking for items in the configued vault that follow a `ready-<nonce>.json` name. The highest nonce of this item name format is reported. |
| 52 | +The multisig monitor reports the paused status of the `OptimismPortal` contract. |
| 53 | +If set, the latest nonce of the configued `Safe` address. And also if set, the latest presigned nonce stored in One Password. |
| 54 | +The latest presigned nonce is identifyed by looking for items in the configued vault that follow a `ready-<nonce>.json` name. |
| 55 | +The highest nonce of this item name format is reported. |
77 | 56 |
|
78 |
| -* **NOTE**: In order to read from one password, the `OP_SERVICE_ACCOUNT_TOKEN` environment variable must be set granting the process permission to access the specified vault. |
79 |
| - |
80 |
| -``` |
81 |
| -OPTIONS: |
82 |
| - --l1.node.url value [$MULTISIG_MON_L1_NODE_URL] Node URL of L1 peer (default: "127.0.0.1:8545") |
83 |
| - --optimismportal.address value [$MULTISIG_MON_OPTIMISM_PORTAL] Address of the OptimismPortal contract |
84 |
| - --nickname value [$MULTISIG_MON_NICKNAME] Nickname of chain being monitored |
85 |
| - --safe.address value [$MULTISIG_MON_SAFE] Address of the Safe contract |
86 |
| - --op.vault value [$MULTISIG_MON_1PASS_VAULT_NAME] 1Pass Vault name storing presigned safe txs following a 'ready-<nonce>.json' item name format |
87 |
| -``` |
| 57 | +| `op-monitorism/multisig` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/multisig/README.md) | |
| 58 | +| ------------------------ | ---------------------------------------------------------------------------------------------------- | |
88 | 59 |
|
89 | 60 | ### Drippie Monitor
|
90 | 61 |
|
91 | 62 | The drippie monitor tracks the execution and executability of drips within a Drippie contract.
|
92 | 63 |
|
93 |
| -``` |
94 |
| -OPTIONS: |
95 |
| - --l1.node.url value Node URL of L1 peer (default: "127.0.0.1:8545") [$DRIPPIE_MON_L1_NODE_URL] |
96 |
| - --drippie.address value Address of the Drippie contract [$DRIPPIE_MON_DRIPPIE] |
97 |
| - --log.level value The lowest log level that will be output (default: INFO) [$MONITORISM_LOG_LEVEL] |
98 |
| - --log.format value Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', (default: text) [$MONITORISM_LOG_FORMAT] |
99 |
| - --log.color Color the log output if in terminal mode (default: false) [$MONITORISM_LOG_COLOR] |
100 |
| - --metrics.enabled Enable the metrics server (default: false) [$MONITORISM_METRICS_ENABLED] |
101 |
| - --metrics.addr value Metrics listening address (default: "0.0.0.0") [$MONITORISM_METRICS_ADDR] |
102 |
| - --metrics.port value Metrics listening port (default: 7300) [$MONITORISM_METRICS_PORT] |
103 |
| - --loop.interval.msec value Loop interval of the monitor in milliseconds (default: 60000) [$MONITORISM_LOOP_INTERVAL_MSEC] |
104 |
| -``` |
| 64 | +| `op-monitorism/drippie` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/multisig/README.md) | |
| 65 | +| ----------------------- | ---------------------------------------------------------------------------------------------------- | |
105 | 66 |
|
106 | 67 | ### Secrets Monitor
|
107 | 68 |
|
108 | 69 | The secrets monitor takes a Drippie contract as a parameter and monitors for any drips within that contract that use the CheckSecrets dripcheck contract. CheckSecrets is a dripcheck that allows a drip to begin once a specific secret has been revealed (after a delay period) and cancels the drip if a second secret is revealed. It's important to monitor for these secrets being revealed as this could be a sign that the secret storage platform has been compromised and someone is attempting to exflitrate the ETH controlled by that drip.
|
109 | 70 |
|
| 71 | +| `op-monitorism/secrets` | [README](https://github.com/ethereum-optimism/monitorism/blob/main/op-monitorism/multisig/README.md) | |
| 72 | +| ----------------------- | ---------------------------------------------------------------------------------------------------- | |
| 73 | + |
| 74 | +## CLI and Docs |
| 75 | + |
| 76 | +## Development |
| 77 | +After cloning, please run `./bootstrap.sh` to set up the development environment correctly. |
| 78 | + |
| 79 | +## Intro |
| 80 | +The cli has the ability to spin up a monitor for varying activities, each emmitting metrics used to setup alerts. |
| 81 | + |
| 82 | +``` |
| 83 | +COMMANDS: |
| 84 | + multisig Monitors OptimismPortal pause status, Safe nonce, and Pre-Signed nonce stored in 1Password |
| 85 | + fault Monitors output roots posted on L1 against L2 |
| 86 | + withdrawals Monitors proven withdrawals on L1 against L2 |
| 87 | + balances Monitors account balances |
| 88 | + secrets Monitors secrets revealed in the CheckSecrets dripcheck |
| 89 | +``` |
| 90 | + |
| 91 | +Each monitor has some common configuration, configurable both via cli or env with defaults. |
| 92 | + |
110 | 93 | ```
|
111 | 94 | OPTIONS:
|
112 |
| - --l1.node.url value Node URL of L1 peer (default: "127.0.0.1:8545") [$SECRETS_MON_L1_NODE_URL] |
113 |
| - --drippie.address value Address of the Drippie contract [$SECRETS_MON_DRIPPIE] |
114 |
| - --log.level value The lowest log level that will be output (default: INFO) [$MONITORISM_LOG_LEVEL] |
115 |
| - --log.format value Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', (default: text) [$MONITORISM_LOG_FORMAT] |
116 |
| - --log.color Color the log output if in terminal mode (default: false) [$MONITORISM_LOG_COLOR] |
117 |
| - --metrics.enabled Enable the metrics server (default: false) [$MONITORISM_METRICS_ENABLED] |
118 |
| - --metrics.addr value Metrics listening address (default: "0.0.0.0") [$MONITORISM_METRICS_ADDR] |
119 |
| - --metrics.port value Metrics listening port (default: 7300) [$MONITORISM_METRICS_PORT] |
120 |
| - --loop.interval.msec value Loop interval of the monitor in milliseconds (default: 60000) [$MONITORISM_LOOP_INTERVAL_MSEC] |
| 95 | + --log.level value [$MONITORISM_LOG_LEVEL] The lowest log level that will be output (default: INFO) |
| 96 | + --log.format value [$MONITORISM_LOG_FORMAT] Format the log output. Supported formats: 'text', 'terminal', 'logfmt', 'json', 'json-pretty', (default: text) |
| 97 | + --log.color [$MONITORISM_LOG_COLOR] Color the log output if in terminal mode (default: false) |
| 98 | + --metrics.enabled [$MONITORISM_METRICS_ENABLED] Enable the metrics server (default: false) |
| 99 | + --metrics.addr value [$MONITORISM_METRICS_ADDR] Metrics listening address (default: "0.0.0.0") |
| 100 | + --metrics.port value [$MONITORISM_METRICS_PORT] Metrics listening port (default: 7300) |
| 101 | + --loop.interval.msec value [$MONITORISM_LOOP_INTERVAL_MSEC] Loop interval of the monitor in milliseconds (default: 60000) |
121 | 102 | ```
|
0 commit comments