Skip to content

Conversation

@auricom
Copy link
Contributor

@auricom auricom commented Jul 2, 2025

evm-single entrypoint

Closes #2412

This changes the entrypoint behavior by proposing arguments for the evm-single binary based on environment variables in the container runtime.

Users can bypass these suggestions by adding their own arguments via command.

The script will initialize the node if needed.
The script allows launching in either sequencer or fullnode mode.

The home directory is predefined as $HOME/.evm-single but users can override it with the --home argument.

The entrypoint behavior is now comparable to celestia-appd while maintaining the automation from Manav's example.

reth volume persistence

The reth docker compose definitions has been updated to persist data across restarts

Summary by CodeRabbit

  • Chores
    • Updated Docker Compose configurations to use a new data directory for node storage and removed log directory mounts.
    • Changed image tag for a service to use the latest main version.
    • Refactored entrypoint script for more flexible and dynamic configuration handling, improving startup and flag management.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 2, 2025

"""

Walkthrough

This change updates Docker Compose configurations for EVM-related services by modifying volume mounts from log directories to new data directories, updating service command-line arguments accordingly, and refactoring the entrypoint.sh script for evm-single to dynamically handle flags and support custom arguments. No exported code entities were changed.

Changes

File(s) Change Summary
apps/evm/single/docker-compose.yml
execution/evm/docker/docker-compose.yml
execution/evm/docker/docker-compose-full-node.yml
Updated volume mounts from log directories to new data directories, adjusted service arguments, and updated volume declarations.
apps/evm/single/entrypoint.sh Refactored to dynamically parse and apply configuration flags, support custom flags, and improve command handling.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Entrypoint.sh
    participant evm-single

    User->>Entrypoint.sh: Provide command and optional flags
    Entrypoint.sh->>Entrypoint.sh: Parse args, set default flags
    Entrypoint.sh->>evm-single: Execute with combined (default + user) flags
    evm-single-->>User: Runs with specified configuration
Loading

Assessment against linked issues

Objective Addressed Explanation
Support custom flags via evm-single docker image entrypoint (#2412)

Possibly related PRs

  • rollkit/rollkit#2373: Modifies Docker Compose for rollkit-reth, similar service config and argument changes.
  • rollkit/rollkit#2258: Adds initial Docker Compose and entrypoint for evm-single, related in setup approach.

Suggested reviewers

  • tac0turtle

Poem

In Docker Compose, a shuffle anew,
Volumes and flags now flex for you.
Entrypoint scripts with logic bright,
Accept your flags, both day and night.
The rabbit hops, the node will run—
Custom commands for everyone!
🐇✨
"""


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ae16775 and c0b2193.

📒 Files selected for processing (1)
  • execution/evm/docker/docker-compose.yml (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • execution/evm/docker/docker-compose.yml
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: test / Run Unit Tests
  • GitHub Check: test / Build Rollkit EVM Single Docker Image
  • GitHub Check: test / Build All Rollkit Binaries
  • GitHub Check: test / Build Rollkit Docker Image
  • GitHub Check: Analyze (go)
  • GitHub Check: Summary

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.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 2, 2025

The latest Buf updates on your PR. Results from workflow CI and Release / buf-check (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJul 2, 2025, 9:49 AM

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 @auricom, 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 significantly refactors the Docker entrypoint for the evm-single application, enhancing its configurability and flexibility within containerized deployments. The changes allow for dynamic argument generation based on environment variables while preserving the ability for users to provide custom command-line arguments, making the startup process more adaptable and comparable to other ecosystem tools.

Highlights

  • Refactored Entrypoint Script: The entrypoint.sh script for evm-single has been significantly refactored to provide a more flexible and robust startup mechanism. It now dynamically constructs init and start commands based on environment variables, allowing for easier configuration within containerized environments.
  • User Argument Overrides: The updated entrypoint script now allows users to pass their own arguments directly to the evm-single binary. These user-provided arguments will be appended to, or can override, the default arguments automatically generated from environment variables, providing greater control.
  • Conditional Node Initialization: The script now intelligently checks for the existence of node_key.json (previously signer.json) before attempting to initialize the evm-single node, preventing unnecessary re-initialization. The init command's arguments are also dynamically built based on available environment variables.
  • Enhanced DA Configuration: Data Availability (DA) related parameters (DA_ADDRESS, DA_AUTH_TOKEN, DA_NAMESPACE) are now seamlessly integrated into the dynamic argument building for the evm-single start command, streamlining DA configuration via environment variables.
  • Docker Image Update: The docker-compose.yml file has been updated to reference the main branch image for rollkit-evm-single, ensuring the use of the latest stable build.
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.

@codecov
Copy link

codecov bot commented Jul 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.71%. Comparing base (620ed4f) to head (c0b2193).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2434   +/-   ##
=======================================
  Coverage   72.71%   72.71%           
=======================================
  Files          67       67           
  Lines        6395     6395           
=======================================
  Hits         4650     4650           
  Misses       1347     1347           
  Partials      398      398           
Flag Coverage Δ
combined 72.71% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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 refactors the entrypoint script for the evm-single binary to propose arguments based on environment variables. It initializes the node if needed and allows launching in either sequencer or fullnode mode. The home directory is predefined but can be overridden with the --home argument. The entrypoint behavior is now comparable to celestia-appd while maintaining the automation from Manav's example. I've provided feedback on quoting the command when echoing it and using the defined variable in the exec command.

@auricom auricom force-pushed the claude/entrypoints branch 2 times, most recently from e1ce64e to 75689b2 Compare July 2, 2025 09:29
@auricom auricom changed the title chore: refactor evm-single entrypoint chore: refactor evm-single entrypoint & reth volume persistence Jul 2, 2025
@auricom auricom force-pushed the claude/entrypoints branch from 75689b2 to 8381fe7 Compare July 2, 2025 09:45
@auricom auricom marked this pull request as ready for review July 2, 2025 09: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: 0

🧹 Nitpick comments (4)
execution/evm/docker/docker-compose.yml (1)

67-67: Add missing newline at end-of-file to satisfy yamllint.

yamllint is failing with no new line character at the end of file.

   reth:
+
apps/evm/single/docker-compose.yml (1)

55-56: Consider pinning the rollkit-evm-single image by digest for reproducibility.

Using the moving :main tag makes builds non-deterministic and can break deployments when the tag is updated upstream.

-    image: ghcr.io/rollkit/rollkit-evm-single:main
+    # pin to a digest for reproducibility
+    image: ghcr.io/rollkit/rollkit-evm-single@sha256:<digest>

(Substitute the latest digest.)

apps/evm/single/entrypoint.sh (2)

97-100: Fix shell-quoting issue flagged by ShellCheck (SC2145).

Mixing a quoted string with $@ inside the same double-quoted expression results in the entire $@ array being collapsed into one argument in the echo.
Use separate arguments instead:

-  echo "$START_COMMAND \"$@\""
+  echo "$START_COMMAND" "$@"

(The exec line is fine — word-splitting there is intended.)


72-74: Duplicate --rollkit.node.aggregator flag.

You append --rollkit.node.aggregator=true once during init (line 38) and again during start (line 73).
While harmless, the duplication is noisy. Consider dropping it from one of the flag sets.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 620ed4f and ae16775.

📒 Files selected for processing (4)
  • apps/evm/single/docker-compose.yml (3 hunks)
  • apps/evm/single/entrypoint.sh (1 hunks)
  • execution/evm/docker/docker-compose-full-node.yml (2 hunks)
  • execution/evm/docker/docker-compose.yml (2 hunks)
🧰 Additional context used
🧠 Learnings (3)
apps/evm/single/docker-compose.yml (2)
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors, so no error handling is needed when calling these methods.
execution/evm/docker/docker-compose-full-node.yml (1)
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
execution/evm/docker/docker-compose.yml (1)
Learnt from: chatton
PR: rollkit/rollkit#2378
File: test/docker-e2e/base_test.go:22-32
Timestamp: 2025-06-18T12:52:25.919Z
Learning: In the rollkit codebase test/docker-e2e, the StartBridgeNode and StartRollkitNode methods in DockerTestSuite do not return errors. They handle error checking internally using s.Require().NoError(err) for their operations, so no external error handling is needed when calling these methods.
🪛 Shellcheck (0.10.0)
apps/evm/single/entrypoint.sh

[error] 99-99: Argument mixes string and array. Use * or separate argument.

(SC2145)

🪛 GitHub Check: lint / yamllint
execution/evm/docker/docker-compose.yml

[failure] 67-67:
67:8 [new-line-at-end-of-file] no new line character at the end of file

🪛 YAMLlint (1.37.1)
execution/evm/docker/docker-compose.yml

[error] 67-67: no new line character at the end of file

(new-line-at-end-of-file)

⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: test / Run Integration Tests
  • GitHub Check: test / Run Unit Tests
  • GitHub Check: test / Build All Rollkit Binaries
  • GitHub Check: test / Build Rollkit Docker Image
  • GitHub Check: test / Build Rollkit EVM Single Docker Image
  • GitHub Check: Summary
  • GitHub Check: Analyze (go)
🔇 Additional comments (3)
execution/evm/docker/docker-compose-full-node.yml (1)

37-45: Volume mount & --datadir flag are aligned — good call.

The named volume reth correctly backs /home/reth/eth-home, and the --datadir flag now points at the same path.
This should give the node durable state across container restarts without any additional tweaks. 👍

execution/evm/docker/docker-compose.yml (1)

37-46: Volume ↔ --datadir alignment looks solid.

The service now persists its chain data in /home/reth/eth-home, matching the --datadir flag.
No functional issues spotted here.

apps/evm/single/docker-compose.yml (1)

17-24: Good switch to persistent reth volume and --datadir.

The mount and flag pair up correctly; this brings the single-node compose in line with the full-node setup.

@auricom auricom enabled auto-merge July 2, 2025 13:13
Copy link
Contributor

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

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

utACK

@auricom auricom added this pull request to the merge queue Jul 3, 2025
Merged via the queue into main with commit 6c7d24b Jul 3, 2025
27 of 28 checks passed
@auricom auricom deleted the claude/entrypoints branch July 3, 2025 13:09
@github-project-automation github-project-automation bot moved this to Done in Evolve Jul 3, 2025
@tac0turtle tac0turtle removed this from Evolve Aug 25, 2025
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.

[FEATURE] Support custom flags via evm-single docker image entrypoint

3 participants