-
Notifications
You must be signed in to change notification settings - Fork 11
chore: improves readme #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
339d5cb
chore: improves readme
douglance c88f5f2
Update README.md
douglance a82fc52
Update packages/batch-poster-monitor/README.md
douglance f8180a0
Update packages/retryable-monitor/README.md
douglance 2154823
Update packages/batch-poster-monitor/README.md
douglance e32d0a3
Update packages/assertion-monitor/README.md
douglance f57ffa3
respond to pr feedback
douglance cd740ed
last tweaks
douglance File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,4 +5,5 @@ yarn-error.log | |
| dist | ||
| ./*.js | ||
| .DS_Store | ||
| logfile.log | ||
| logfile.log | ||
| config.json | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| { | ||
| "childChains": [ | ||
| { | ||
| "name": "Arbitrum Sepolia", | ||
| "chainId": 421614, | ||
| "parentChainId": 11155111, | ||
| "confirmPeriodBlocks": 45818, | ||
| "parentRpcUrl": "https://sepolia.drpc.org", | ||
| "orbitRpcUrl": "https://sepolia-rollup.arbitrum.io/rpc", | ||
| "explorerUrl": "https://sepolia.arbiscan.io", | ||
| "parentExplorerUrl": "https://sepolia.etherscan.io", | ||
| "ethBridge": { | ||
| "bridge": "0x38f918D0E9F1b721EDaA41302E399fa1B79333a9", | ||
| "inbox": "0xaAe29B0366299461418F5324a79Afc425BE5ae21", | ||
| "outbox": "0x65f07C7D521164a4d5DaC6eB8Fac8DA067A3B78F", | ||
| "rollup": "0x042b2e6c5e99d4c521bd49beed5e99651d9b0cf4", | ||
| "sequencerInbox": "0x6c97864CE4bE1C2C8bB6aFe3A115E6D7Dca82E71" | ||
| } | ||
| }, | ||
| { | ||
TucksonDev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| "name": "Xai Testnet", | ||
| "chainId": 37714555429, | ||
| "parentChainId": 421614, | ||
| "confirmPeriodBlocks": 150, | ||
| "parentRpcUrl": "https://sepolia-rollup.arbitrum.io/rpc", | ||
| "orbitRpcUrl": "https://testnet-v2.xai-chain.net/rpc", | ||
| "explorerUrl": "https://testnet-explorer-v2.xai-chain.net/", | ||
| "parentExplorerUrl": "https://sepolia.arbiscan.io/", | ||
| "ethBridge": { | ||
| "bridge": "0x6c7FAC4edC72E86B3388B48979eF37Ecca5027e6", | ||
| "inbox": "0x6396825803B720bc6A43c63caa1DcD7B31EB4dd0", | ||
| "outbox": "0xc7491a559b416540427f9f112C5c98b1412c5d51", | ||
| "rollup": "0xeedE9367Df91913ab149e828BDd6bE336df2c892", | ||
| "sequencerInbox": "0x529a2061A1973be80D315770bA9469F3Da40D938" | ||
| }, | ||
| "nativeToken": "0x4e6f41acbfa8eb4a3b25e151834d9a14b49b69d2", | ||
| "tokenBridge": { | ||
| "parentCustomGateway": "0x04e14E04949D49ae9c551ca8Cc3192310Ce65D88", | ||
| "parentErc20Gateway": "0xCcB451C4Df22addCFe1447c58bC6b2f264Bb1256", | ||
| "parentGatewayRouter": "0x185b868DBBF41554465fcb99C6FAb9383E15f47A", | ||
| "parentMultiCall": "0xA115146782b7143fAdB3065D86eACB54c169d092", | ||
| "parentProxyAdmin": "0x022c515aEAb29aaFf82e86A10950cE14eA89C9c5", | ||
| "parentWeth": "0x0000000000000000000000000000000000000000", | ||
| "parentWethGateway": "0x0000000000000000000000000000000000000000", | ||
| "childCustomGateway": "0xea1ce1CC75C948488515A3058E10aa82da40cE8F", | ||
| "childErc20Gateway": "0xD840761a09609394FaFA3404bEEAb312059AC558", | ||
| "childGatewayRouter": "0x3B8ba769a43f34cdD67a20aF60d08D54C9C8f1AD", | ||
| "childMultiCall": "0x5CBd60Ae5Af80A42FA8b0F20ADF95A8879844984", | ||
| "childProxyAdmin": "0x7C1BA251d812fb34aF5C2566040C3C30585aFed9", | ||
| "childWeth": "0x0000000000000000000000000000000000000000", | ||
| "childWethGateway": "0x0000000000000000000000000000000000000000" | ||
| } | ||
| } | ||
| ] | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,97 +1,71 @@ | ||
| # Assertion Monitor | ||
|
|
||
| This tool is designed to monitor assertions on Arbitrum chains. It performs comprehensive monitoring of both BOLD (Bounded Liquidity Delay) and Classic rollup chains, with the following checks: | ||
| > For installation and general configuration, see the [main README](../../README.md). | ||
|
|
||
| ## Chain Activity Monitoring | ||
| 1. Tracks chain activity by monitoring block progression | ||
| 2. Verifies the latest confirmed block number from the child chain | ||
| 3. Detects periods of inactivity or stalled chain progress | ||
| ## Overview | ||
|
|
||
| ## Assertion Creation Monitoring | ||
| 1. No assertions created in the last 4 hours when there is chain activity | ||
| 2. Tracks creation events and validates their frequency | ||
| 3. Alerts when chain activity exists without new assertions | ||
| The Assertion Monitor monitors the lifecycle of assertions in both BoLD (Bounded Liquidity Delay) and pre-BoLD rollup chains. [Learn more](https://docs.arbitrum.io/how-arbitrum-works/inside-arbitrum-nitro#arbitrum-rollup-protocol). | ||
|
|
||
| ## Assertion Confirmation Monitoring | ||
| 1. No assertions confirmed within the chain's confirmation period | ||
| 2. Tracks unconfirmed assertions and their age | ||
| 3. Monitors confirmation delays against the chain's configured period | ||
| 4. Validates the time between creation and confirmation events | ||
| ## Command-Line Interface | ||
|
|
||
| ## Alert Types | ||
| The monitor generates alerts for the following conditions: | ||
|
|
||
| 1. Creation Issues: | ||
| - No assertion creation events in the last 7 days | ||
| - Chain activity detected but no new assertions created in the last 4 hours | ||
|
|
||
| 2. Confirmation Issues: | ||
| - Parent chain confirmation issues - assertions not confirming | ||
| - Unconfirmed assertions present | ||
| - Assertion age exceeds confirmation period | ||
| - Confirmation delay exceeds the configured period | ||
|
|
||
| 3. Chain State Issues: | ||
| - Chain stalled or inactive | ||
| - Block synchronization issues | ||
| - Validator whitelist status changes | ||
|
|
||
| Read more about assertions [here](https://docs.arbitrum.io/how-arbitrum-works/inside-arbitrum-nitro#arbitrum-rollup-protocol). | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Before using this tool, make sure you have the following installed: | ||
|
|
||
| - [Node.js](https://nodejs.org/en) | ||
| - [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable) | ||
| ```bash | ||
| yarn assertion-monitor [options] | ||
|
|
||
| Additionally, ensure that you have added your Arbitrum network configuration to the `config.json` file in the `lib` directory; | ||
| Monitor assertion creation and validation on Arbitrum chains | ||
|
|
||
| ## Installation | ||
| Options: | ||
| --help Show help [boolean] | ||
| --version Show version number [boolean] | ||
| --configPath Path to config file [string] [default: "config.json"] | ||
| --enableAlerting Enable Slack alerts [boolean] [default: false] | ||
|
|
||
| From the root directory of the project, run the following command to install dependencies: | ||
| Examples: | ||
| yarn assertion-monitor Run with default config | ||
| yarn assertion-monitor --enableAlerting Enable Slack notifications | ||
| yarn assertion-monitor --configPath=custom.json Use custom config file | ||
|
|
||
| ```bash | ||
| yarn install | ||
| Environment Variables: | ||
| ASSERTION_MONITORING_SLACK_TOKEN Slack API token for alerts | ||
| ASSERTION_MONITORING_SLACK_CHANNEL Slack channel for alerts | ||
| ``` | ||
|
|
||
| ## Execution | ||
| ## Monitor Details | ||
|
|
||
| ### One-off Check | ||
| The Assertion Monitor tracks assertions through their lifecycle, implementing distinct strategies for BoLD and pre-BoLD rollup chains. | ||
|
|
||
| To find assertion events and display their status for a specific block range, execute the following command: | ||
|
|
||
| ```bash | ||
| yarn dev [--configPath=<CONFIG_PATH>] | ||
| ``` | ||
| ### Critical Events Monitored | ||
|
|
||
| - If `--configPath` is not provided, it defaults to `config.json`. | ||
| - This command will identify all assertion events (both creation and confirmation) from the parent chain to your Orbit chain within the specified block range. | ||
| The monitor tracks five categories of blockchain events: | ||
|
|
||
| ### Error Generation and Reporting | ||
| - **Creation Events**: Records when new assertions and nodes are created on the chain to verify transaction execution | ||
| - **Confirmation Events**: Identifies when assertions are confirmed on the parent chain after challenge periods end | ||
| - **Validator Events**: Tracks validator participation metrics including stakes, challenges, and whitelist status | ||
| - **Block Events**: Monitors block production rates, finalization timing, and synchronization between chains | ||
| - **Chain State**: Analyzes the overall consistency between on-chain state and expected protocol behavior | ||
|
|
||
| To enable reporting, use `--enableAlerting` flag. | ||
| ### Alert Scenarios | ||
|
|
||
| This will enable alerts for all the conditions listed above in the Alert Types section. | ||
| The monitor triggers alerts when these conditions are detected: | ||
|
|
||
| Additionally, you might also want to log these errors to Slack, for which you will need to configure, in the `.env` file: | ||
| #### Creation Issues | ||
|
|
||
| - `NODE_ENV=CI` | ||
| - `ASSERTION_MONITORING_SLACK_TOKEN=<your-slack-token>` | ||
| - `ASSERTION_MONITORING_SLACK_CHANNEL=<your-slack-channel-key>` | ||
| - No assertion creation events within configured time window | ||
| - Chain activity without corresponding recent assertions | ||
| - Extended node creation gaps on non-BoLD chains | ||
| - Validator participation below required thresholds | ||
|
|
||
| Check [Slack integration documentation](https://api.slack.com/quickstart) for more information about getting these auth tokens. | ||
| #### Confirmation Issues | ||
|
|
||
| ## Chain Support | ||
| - Parent chain block threshold exceeded | ||
| - Assertions stuck in challenge period | ||
| - Data inconsistencies between confirmation events and confirmed blocks | ||
| - Confirmation events missing despite available creation events | ||
|
|
||
| The monitor automatically detects and adapts to different chain types: | ||
| #### Other Issues | ||
|
|
||
| 1. BOLD (Bounded Liquidity Delay) Chains: | ||
| - Uses BOLD-specific assertion formats and validation | ||
| - Tracks BOLD-specific confirmation processes | ||
| - Monitors BOLD genesis assertion hash | ||
| - Validator whitelist disabled on pre-BoLD chains | ||
| - Base stake below 1 ETH threshold on BoLD chains | ||
| - Parent-child chain synchronization anomalies | ||
| - State inconsistencies between expected and observed chain state | ||
|
|
||
| 2. Classic Rollup Chains: | ||
| - Uses Classic node creation and confirmation events | ||
| - Monitors Classic-specific block validation | ||
| - Tracks node confirmation processes | ||
| For implementation details and thresholds, see `alerts.ts` and `monitoring.ts`. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.