Skip to content
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

Create chain-monitoring.mdx #764

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Create chain-monitoring.mdx #764

wants to merge 4 commits into from

Conversation

cpengilly
Copy link
Collaborator

No description provided.

Copy link

netlify bot commented Jun 21, 2024

Deploy Preview for docs-optimism ready!

Name Link
🔨 Latest commit 21a29f8
🔍 Latest deploy log https://app.netlify.com/sites/docs-optimism/deploys/66fd554da151d20008e452ac
😎 Deploy Preview https://deploy-preview-764--docs-optimism.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@cpengilly cpengilly added the documentation Improvements or additions to documentation label Aug 20, 2024
@sbvegan
Copy link
Collaborator

sbvegan commented Sep 13, 2024

Here's some helpful context on dispute-mon

  • Other Useful Notes
    • op-dispute-mon is set up to be built and run the same way as the op-challenger. Just make op-dispute-mon in its directory.

    • Since op-dispute-mon inherits the same metrics + logging configuration, the config from above can be used with an OP_DISPUTE_MON prefix.

    • A potential configuration for this chain could look like the following

      OP_DISPUTE_MON_LOG_FORMAT=logfmt
      OP_DISPUTE_MON_METRICS_ENABLED=true
      OP_DISPUTE_MON_METRICS_ADDR=0.0.0.0
      OP_DISPUTE_MON_METRICS_PORT=7300
      
      OP_DISPUTE_MON_L1_ETH_RPC=..
      OP_DISPUTE_MON_ROLLUP_RPC=..
      OP_DISPUTE_MON_GAME_FACTORY_ADDRESS=..
      
      OP_DISPUTE_MON_HONEST_ACTORS=..

      Where OP_DISPUTE_MON_HONEST_ACTORS is a CSV (no spacing) list of addresses that are used for the honest op-challenger instance(s).

      Note, you may also ignore specific game instances with OP_DISPUTE_MON_IGNORED_GAMES, though you shouldn’t have to do this.

    • Additional Flags

      • OP_DISPUTE_MON_GAME_WINDOW: This is the window of time to report on games. It should leave a buffer beyond the max game duration for bond claiming. If Fault Proof game parameters are not changes (e.g. MAX_CLOCK_DURATION), it is recommended to leave this as the default.
      • OP_DISPUTE_MON_MONITOR_INTERVAL: The interval at which to check for new games. Defaults to 30 seconds currently.
      • OP_DISPUTE_MON_MAX_CONCURRENCY: The max thread count. Defaults to 5 currently.

@sbvegan
Copy link
Collaborator

sbvegan commented Sep 23, 2024

This PR addresses: #345

@sbvegan sbvegan marked this pull request as ready for review October 2, 2024 15:22
@sbvegan sbvegan requested a review from a team as a code owner October 2, 2024 15:22
Copy link
Contributor

coderabbitai bot commented Oct 2, 2024

Walkthrough

The pull request introduces a new key-value pair in the _meta.json file, adding "chain-monitoring": "Chain Monitoring". Additionally, a new documentation file, chain-monitoring.mdx, is created, providing an extensive guide on monitoring options for OP Stack chains, covering both onchain and offchain services and tools.

Changes

File Path Change Summary
pages/builders/chain-operators/tools/_meta.json Added key "chain-monitoring": "Chain Monitoring" to the JSON object.
pages/builders/chain-operators/tools/chain-monitoring.mdx New file created with a guide on monitoring options for OP Stack chains, including onchain and offchain services.

Possibly related PRs

  • challenger docs #759: The changes in this PR involve updates to the documentation for op-challenger, which is related to monitoring and operational aspects similar to the new chain-monitoring documentation introduced in the main PR.
  • adding op-conductor documentation #818: This PR adds a new key-value pair for op-conductor in the _meta.json file, which is relevant as it relates to the overall structure and configuration of tools, similar to the changes made in the main PR's _meta.json file.

Suggested reviewers

  • bradleycamacho

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Outside diff range and nitpick comments (3)
pages/builders/chain-operators/tools/chain-monitoring.mdx (3)

14-35: Improve grammar and consistency in the Onchain Monitoring Services section.

The content provides valuable information about monitorism and its monitors. However, there are some areas for improvement:

  1. Line 20: Consider rephrasing "Monitorism is a tooling suite that supports monitoring and active remediation actions for the OP Stack chain." to "Monitorism is a tooling suite that supports monitoring and active remediation actions for OP Stack chains."

  2. Line 22: Change "Currently. the list of monitors includes:" to "Currently, the list of monitors includes:"

  3. Line 24: Correct "made for to taking" to "designed for taking"

  4. Lines 24-32: Ensure consistent capitalization at the beginning of each monitor description. For example, change "checks for new withdrawals" to "Checks for new withdrawals" in line 26.

  5. Line 29: Change "configued" to "configured"

  6. Line 30: Consider rephrasing "And also if set, the latest presigned nonce stored in One Password." to "If configured, it also reports the latest presigned nonce stored in OnePassword."

  7. Line 31: Add a comma after "being revealed" for better readability.

These changes will improve the overall clarity and consistency of the document.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~20-~20: Possible missing comma found.
Context: ...in. Monitorism uses monitors as passive security providing automated monitoring for the ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~29-~29: Possible missing comma found.
Context: ...once of the configued Safe address. And also if set, the latest presigned nonce stor...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~31-~31: Possible missing comma found.
Context: ...tant to monitor for these secrets being revealed as this could be a sign that the secret...

(AI_HYDRA_LEO_MISSING_COMMA)


36-66: Enhance clarity and consistency in the dispute-mon section.

The section provides valuable information about dispute-mon and its configuration. Consider the following improvements:

  1. Line 38: Replace "Chain operators should consider running op-dispute-mon. It's an incredibly useful securities monitoring service" with "Chain operators should consider running op-dispute-mon, an essential security monitoring service"

  2. Line 40: Change "This means that you can run it the same way (run make op-dispute-mon in the directory)." to "Run it using the command make op-dispute-mon in the appropriate directory."

  3. Lines 44-55: Use a code block with a specific language identifier for the configuration example, such as shell or ini

  4. Line 56: Change "CSV (no spacing)" to "comma-separated list (without spaces)"

  5. Line 60: Correct "changes" to "changed" in "(e.g. MAX_CLOCK_DURATION)"

  6. Lines 60-61: Use consistent punctuation at the end of each flag description (either all periods or no periods)

  7. Line 65: Change "Chain operators can easily create their grafana dashboard" to "Chain operators can easily create their Grafana dashboard"

These changes will improve the overall clarity and consistency of the document while adhering to the coding guidelines.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~60-~60: Loose punctuation mark.
Context: ...ult. - OP_DISPUTE_MON_MONITOR_INTERVAL: The interval at which to check for new ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~61-~61: Loose punctuation mark.
Context: ...ntly. - OP_DISPUTE_MON_MAX_CONCURRENCY: The max thread count. Defaults to 5 cur...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~61-~61: A different word order might sound more natural.
Context: ...MAX_CONCURRENCY: The max thread count. Defaults to 5 currently. You can find more info on op-dispute...

(AI_HYDRA_LEO_WORD_ORDER)


78-98: Enhance consistency in individual component sections.

The sections for op-node, op-geth, op-proposer, and op-batcher provide consistent information about enabling metrics. Consider the following improvements for better consistency:

  1. Use consistent language across all component sections. For example:

    • Change "To enable metrics, pass the --metrics.enabled flag to the op-geth." to "To enable metrics, pass the --metrics.enabled flag to op-geth." (apply similar changes to other components)
  2. Add links to additional documentation for op-geth, similar to what's provided for other components.

  3. Consider adding a brief description of each component's function, similar to what's provided for op-node in line 80.

  4. Use consistent capitalization for "Proposer" and "Batcher" in the link text (lines 91 and 97).

These changes will improve the overall consistency and informativeness of the document.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between aaaeeec and 21a29f8.

📒 Files selected for processing (2)
  • pages/builders/chain-operators/tools/_meta.json (1 hunks)
  • pages/builders/chain-operators/tools/chain-monitoring.mdx (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • pages/builders/chain-operators/tools/_meta.json
🧰 Additional context used
📓 Path-based instructions (1)
pages/builders/chain-operators/tools/chain-monitoring.mdx (1)

Pattern **/*.mdx: "ALWAYS review Markdown content THOROUGHLY with the following criteria:

  • Use proper nouns in place of personal pronouns like 'We' and 'Our' to maintain consistency in communal documentation.
  • Avoid gender-specific language and use the imperative form.
  • Monitor capitalization for emphasis. Use bold for prominence instead of all caps or italics.
  • Ensure proper nouns are capitalized in sentences.
  • Apply the Oxford comma.
  • Use proper title case for headers, buttons, tab names, page names, and links. Sentence case should be used for body content and short phrases, even in links.
  • Use correct spelling and grammar at all times (IMPORTANT).
    "
🪛 LanguageTool
pages/builders/chain-operators/tools/chain-monitoring.mdx

[uncategorized] ~20-~20: Possible missing comma found.
Context: ...in. Monitorism uses monitors as passive security providing automated monitoring for the ...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~29-~29: Possible missing comma found.
Context: ...once of the configued Safe address. And also if set, the latest presigned nonce stor...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~31-~31: Possible missing comma found.
Context: ...tant to monitor for these secrets being revealed as this could be a sign that the secret...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~60-~60: Loose punctuation mark.
Context: ...ult. - OP_DISPUTE_MON_MONITOR_INTERVAL: The interval at which to check for new ...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~61-~61: Loose punctuation mark.
Context: ...ntly. - OP_DISPUTE_MON_MAX_CONCURRENCY: The max thread count. Defaults to 5 cur...

(UNLIKELY_OPENING_PUNCTUATION)


[uncategorized] ~61-~61: A different word order might sound more natural.
Context: ...MAX_CONCURRENCY: The max thread count. Defaults to 5 currently. You can find more info on op-dispute...

(AI_HYDRA_LEO_WORD_ORDER)

🔇 Additional comments (4)
pages/builders/chain-operators/tools/chain-monitoring.mdx (4)

1-13: Frontmatter and introduction are well-structured and informative.

The frontmatter provides clear metadata for the document, and the introduction effectively distinguishes between onchain and offchain monitoring. The content adheres to the coding guidelines, using proper nouns and avoiding gender-specific language.


67-77: Offchain Component Monitoring introduction is well-structured and informative.

The section effectively introduces offchain monitoring and provides clear, concise steps for enabling it across various components. The content adheres to the coding guidelines and uses proper terminology.


99-115: The op-challenger section is well-structured and informative.

This section effectively explains the role of op-challenger and provides clear instructions for enabling metrics. The included code block with configuration options is well-formatted and easy to understand. The content adheres to the coding guidelines and uses appropriate terminology.


117-119: Next Steps section provides appropriate guidance.

The Next Steps section, although brief, offers a valuable resource for developers who may need additional support. The content is clear and adheres to the coding guidelines.


Monitorism is a tooling suite that supports monitoring and active remediation actions for the OP Stack chain. Monitorism uses monitors as passive security providing automated monitoring for the OP Stack. They are used to monitor the OP stack and alert on specific events that could be a sign of a security incident.

Currently. the list of monitors includes:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would divide this list in two parts:

  1. Security Integrity Monitor: These are monitors necessary for making sure Bridges between L2 and L1 are safe and work as expected. These monitors are divided in two subgroup:
  2. a Pre-Faultproof chain monitors: Fault Monitor, Withdrawals Monitor
    2.b Faultproof chain monitors: Faulproof Withdrawals
  3. Security monitors: Those tools monitor other aspects of several contracts used in optimism.
    Global Events Monitor,Liveness Expiration Monitor,Balances Monitor,Multisig Monitor,Drippie Monitor,Secrets Monitor

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants