Skip to content

fix: metrics, reset chain state, restart rollup #593

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 5 commits into from
Jul 16, 2025
Merged

Conversation

pthmas
Copy link
Contributor

@pthmas pthmas commented Jul 16, 2025

Overview

Updated guides:

  • Metrics
  • Reset chain
  • Restart Rollup

Summary by CodeRabbit

  • Documentation

    • Updated guides to reflect new binary names, directory structures, and reset commands for improved clarity and accuracy.
    • Replaced detailed metric listings with a link to external technical specifications.
    • Corrected and standardized command-line flag syntax in documentation and examples.
  • Chores

    • Updated shell scripts to use new flag naming conventions for Rollkit Data Availability configuration.

@pthmas pthmas self-assigned this Jul 16, 2025
Copy link
Contributor

coderabbitai bot commented Jul 16, 2025

Walkthrough

Documentation and shell scripts have been updated to reflect new binary names, directory structures, and command-line flag conventions. Notable changes include replacing rollkit with testapp, updating directory and reset instructions, and standardizing Rollkit DA-related flags from underscore to dot notation across multiple scripts and guides.

Changes

Files/Paths Change Summary
guides/metrics.md Removed detailed metrics enumeration; now references external technical specs. Updated code block to use bash.
guides/reset-state.md Updated binary names, directory structures, and reset instructions to use testapp and new data layout.
guides/restart-rollup.md Changed example commands from rollkit to testapp; corrected DA namespace flag syntax.
public/gm/init-arabica-testnet.sh
public/gm/init-mainnet.sh
public/gm/init-mocha-testnet.sh
Updated Rollkit DA-related flags from underscore to dot notation in both echoed and executed commands.
public/gm/init-local.sh Updated DA and aggregator flags to dot notation; changed aggregator flag to --rollkit.node.aggregator.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant ShellScript
    participant ChainBinary

    User->>ShellScript: Run initialization script
    ShellScript->>ChainBinary: Start chain with updated flags (dot notation)
    ChainBinary-->>ShellScript: Chain process starts with correct config
    ShellScript-->>User: Outputs status and instructions
Loading

Possibly related PRs

Suggested reviewers

  • tuxcanfly
  • Manav-Aggarwal
  • gupadhyaya
  • jcstein

Poem

Hoppity hop, the flags align,
Dots replace underscores—how fine!
Directories change, commands anew,
"testapp" leaps where "rollkit" grew.
Scripts and docs, all fresh and bright,
A bunny’s work, done just right!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this 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.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

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

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @pthmas, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request focuses on updating and correcting documentation guides for Rollkit, specifically addressing metrics, resetting chain state, and restarting rollups. The changes aim to improve accuracy by reflecting current command usage, directory structures, and flag names, and by streamlining information presentation by linking to external specifications where appropriate.

Highlights

  • Metrics Documentation Update: The detailed list of available metrics has been replaced with a link to the comprehensive Technical Specifications, ensuring the documentation remains up-to-date without manual maintenance of metric tables.
  • Chain State Reset Guide Refinement: The guide for resetting chain state has been updated to reflect the testapp binary and its associated .testapp directory structure. It now clarifies that only the data directory's content needs to be deleted, and introduces the testapp unsafe-clean command as an alternative.
  • Rollup Restart Guide Corrections: The guide for restarting rollups has been updated to use the testapp binary in examples and corrects the --rollkit.da_namespace flag to --rollkit.da.namespace for accuracy.
  • Command-line Flag Standardization: Various initialization scripts have been updated to use the standardized dot-notation for Rollkit DA-related flags (e.g., --rollkit.da.namespace instead of --rollkit.da_namespace), improving consistency across the codebase.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

github-actions bot commented Jul 16, 2025

PR Preview Action v1.6.2
Preview removed because the pull request was closed.
2025-07-16 15:09 UTC

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

The pull request includes changes to metrics, chain state reset, and rollup restart procedures. The most notable change is the update of command-line flags to use the new --rollkit.node.aggregator instead of the deprecated --rollkit.aggregator.

@pthmas pthmas marked this pull request as ready for review July 16, 2025 14:46
@pthmas pthmas requested a review from tac0turtle July 16, 2025 14:46
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: 3

♻️ Duplicate comments (1)
public/gm/init-mocha-testnet.sh (1)

57-58: Fix SC2140 & maintain flag consistency (same as Arabica script)

Apply the same quoting refactor suggested for init-arabica-testnet.sh to avoid broken restart script and make maintenance easier.

🧹 Nitpick comments (5)
guides/restart-rollup.md (1)

42-43: Tighten wording & drop redundant “first”

The sentence reads a bit clumsily and triggers a style warning (FIRST_BEGAN). Consider:

-It is important to include any additional flags that you used when you first started your rollup.
+It is important to include any additional flags that you used when you started your rollup.
public/gm/init-mocha-testnet.sh (1)

60-60: Quote variable expansions

Mirror the quoting fix for $AUTH_TOKEN / $DA_BLOCK_HEIGHT.

public/gm/init-mainnet.sh (1)

60-60: Quote variable expansions

Wrap $AUTH_TOKEN and $DA_BLOCK_HEIGHT in double quotes in the live gmd start command.

guides/metrics.md (1)

23-26: Minor Markdown nit – blank line before fenced block

For consistency with the rest of the doc, add a blank line before the fenced code block:

-1. Accessing the metrics endpoint directly:
-```bash
+1. Accessing the metrics endpoint directly:
+
+```bash
guides/reset-state.md (1)

65-71: Offer an explicit one-liner for manual clean-up

Some users may prefer a direct rm over the helper sub-command. Consider adding:

rm -rf $HOME/.testapp/data/*

right before or after the testapp unsafe-clean snippet.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0e5ef38 and 449961c.

📒 Files selected for processing (7)
  • guides/metrics.md (1 hunks)
  • guides/reset-state.md (2 hunks)
  • guides/restart-rollup.md (3 hunks)
  • public/gm/init-arabica-testnet.sh (1 hunks)
  • public/gm/init-local.sh (1 hunks)
  • public/gm/init-mainnet.sh (1 hunks)
  • public/gm/init-mocha-testnet.sh (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
guides/reset-state.md (2)
Learnt from: assafmo
PR: rollkit/docs#390
File: guides/assets/hyperlane-use-tia-for-gas/relayer.json:1-5
Timestamp: 2024-10-11T19:05:20.591Z
Learning: In the file `guides/assets/hyperlane-use-tia-for-gas/relayer.json`, the settings `"allowLocalCheckpointSyncers": "true"` and `"gasPaymentEnforcement": [{ "type": "none" }]` are intentional.
Learnt from: assafmo
PR: rollkit/docs#390
File: guides/assets/hyperlane-use-tia-for-gas/relayer.json:1-5
Timestamp: 2024-10-08T09:25:31.642Z
Learning: In the file `guides/assets/hyperlane-use-tia-for-gas/relayer.json`, the settings `"allowLocalCheckpointSyncers": "true"` and `"gasPaymentEnforcement": [{ "type": "none" }]` are intentional.
🪛 LanguageTool
guides/restart-rollup.md

[style] ~42-~42: This phrase is redundant. Consider writing “started”.
Context: ...additional flags that you used when you first started your rollup. For example, if you used t...

(FIRST_BEGAN)

🪛 Shellcheck (0.10.0)
public/gm/init-arabica-testnet.sh

[warning] 57-57: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?

(SC2140)

public/gm/init-mocha-testnet.sh

[warning] 57-57: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?

(SC2140)

public/gm/init-mainnet.sh

[warning] 57-57: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?

(SC2140)

public/gm/init-local.sh

[warning] 93-93: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?

(SC2140)

🔇 Additional comments (5)
public/gm/init-arabica-testnet.sh (1)

60-60: Quote variables to survive spaces & subshells

$AUTH_TOKEN can legally contain spaces. Wrap expansions:

-gmd start --rollkit.aggregator --rollkit.da_auth_token=$AUTH_TOKEN ...
+gmd start --rollkit.aggregator --rollkit.da_auth_token="$AUTH_TOKEN" ...
guides/metrics.md (1)

15-16: Link may cover only Block-Manager metrics

The URL points to block-manager.html#metrics, which currently lists Block Manager metrics only. If other subsystems (P2P, Sequencer, etc.) expose metrics, consider linking to a higher-level index or adding multiple links.

public/gm/init-local.sh (1)

95-96: Flag migration looks good

Nice catch updating --rollkit.aggregator and the DA flags to their dot-notation counterparts. Aligns this script with the rest of the repo.

guides/reset-state.md (2)

21-33: Consistent binary & directory rename acknowledged

The switch from .rollkit.testapp and rollkit starttestapp start is clear and matches other docs. No issues spotted.


139-145: Verify the new comet sub-command

Previous Cosmos-SDK builds expose tendermint unsafe-reset-all; recent versions sometimes alias this to comet, but support isn’t universal.

Please confirm that the built gmd binary indeed provides:

gmd comet unsafe-reset-all

and update the guide if the correct invocation remains tendermint unsafe-reset-all.

Comment on lines +57 to 58
echo "gmd start --rollkit.aggregator --rollkit.da.auth_token=\$AUTH_TOKEN --rollkit.da.namespace 00000000000000000000000000000000000000000008e5f679bf7116cb --rollkit.da.start_height \$DA_BLOCK_HEIGHT --rpc.laddr tcp://127.0.0.1:36657 --grpc.address 127.0.0.1:9290 --p2p.laddr \"0.0.0.0:36656\" --minimum-gas-prices="0.025stake"" >> restart-mainnet.sh

Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Broken quoting in generated restart script

The restart script suffers from the same SC2140 pattern. Refactor with a here-doc as shown for the Arabica script.

🧰 Tools
🪛 Shellcheck (0.10.0)

[warning] 57-57: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?

(SC2140)

🤖 Prompt for AI Agents
In public/gm/init-mainnet.sh around lines 57 to 58, the echo command appending
to restart-mainnet.sh has broken quoting causing SC2140 issues. Refactor this by
replacing the echo with a here-doc to properly handle the complex quoting and
variable expansions, similar to the approach used in the Arabica script,
ensuring the generated restart script is correctly formatted and free of quoting
errors.

@pthmas pthmas merged commit dda588f into main Jul 16, 2025
8 checks passed
@pthmas pthmas deleted the pierrick/organize-4 branch July 16, 2025 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants