Skip to content

fix: evm single docker compose startup - #2455

Merged
tac0turtle merged 2 commits into
mainfrom
claude/fix_docker_compose_evm_single
Jul 10, 2025
Merged

fix: evm single docker compose startup#2455
tac0turtle merged 2 commits into
mainfrom
claude/fix_docker_compose_evm_single

Conversation

@auricom

@auricomauricom commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

rollkit container was crashing because of wrong startup orchestration. This PR fixes it.

Summary by CodeRabbit

  • Chores
    • Added a 5-second startup delay before launching the service.
    • Configured the service to always restart automatically.
    • Specified an explicit startup command for the service.

@coderabbitai

coderabbitaiBot commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This update introduces a 5-second startup delay at the beginning of the entrypoint script and explicitly sets the container command to start for the rollkit-evm-single service in the Docker Compose configuration. Additionally, a restart: always policy was added to the service. No other environment, volume, or dependency changes are included.

Changes

File(s)Change Summary
apps/evm/single/docker-compose.ymlAdded restart: always and command: start to rollkit-evm-single service.
apps/evm/single/entrypoint.shInserted a 5-second delay at script start; added trailing newline.

Sequence Diagram(s)

sequenceDiagram
participant User
participant DockerCompose
participant Container
participant EntrypointScript
User->>DockerCompose: Launch rollkit-evm-single service
DockerCompose->>Container: Start container with entrypoint.sh and command 'start'
Container->>EntrypointScript: Run entrypoint.sh
EntrypointScript->>EntrypointScript: Sleep 5 seconds
EntrypointScript->>EntrypointScript: Continue startup process
Loading

Possibly related PRs

Suggested reviewers

  • tac0turtle

Poem

A rabbit waits, five seconds still,
Before the EVM starts to thrill.
Compose commands now clear and smart,
"Start" is the word to play its part.
With patience set and scripts anew,
The blockchain hops—onward, true!
🐇⏳✨


📜 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 785fab3 and e949664.

📒 Files selected for processing (1)
  • apps/evm/single/docker-compose.yml (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • apps/evm/single/docker-compose.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: test / Docker E2E Tests
  • 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

github-actionsBot commented Jul 10, 2025

Copy link
Copy Markdown
Contributor

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

BuildFormatLintBreakingUpdated (UTC)
✅ passed⏩ skipped✅ passed✅ passedJul 10, 2025, 1:20 PM

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

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 aims to resolve a critical startup issue within the evm single docker compose environment where the rollkit container was crashing due to improper startup orchestration. The changes ensure a more robust and reliable initialization sequence for the services, allowing them to come online in the correct order and preventing premature connection attempts.

Highlights

  • Docker Compose Configuration: I've explicitly added the command: start instruction to the evm-single service in docker-compose.yml. This ensures the container executes the intended startup command defined in its entrypoint script.
  • Startup Orchestration Delay: I've introduced a 5-second sleep at the beginning of the entrypoint.sh script for the evm-single container. This delay is crucial to allow dependent services, such as rollkit-reth, sufficient time to fully initialize before evm-single attempts to connect to them, preventing startup crashes.
  • Script Formatting: I've addressed a minor formatting issue in entrypoint.sh by ensuring the file ends with a newline character.
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.

FeatureCommandDescription
Code Review/gemini reviewPerforms a code review for the current pull request in its current state.
Pull Request Summary/gemini summaryProvides a summary of the current pull request in its current state.
Comment@gemini-code-assistResponds in comments when explicitly tagged, both in issue comments and review comments.
Help/gemini helpDisplays 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.

@gemini-code-assistgemini-code-assistBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request fixes a startup orchestration issue in the EVM single-node docker-compose setup by adding the start command. My review focuses on improving the robustness of service dependency handling. I've identified that using a fixed sleep to wait for other services is fragile and can lead to intermittent failures. I've suggested replacing it with an active polling mechanism using curl to ensure services are ready before proceeding. This will make the startup process more reliable.

Comment threadapps/evm/single/entrypoint.sh

@coderabbitaicoderabbitaiBot left a comment

Copy link
Copy Markdown
Contributor

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 (2)
apps/evm/single/entrypoint.sh (1)

4-5: Parameterize the startup delay instead of hard-coding 5 s

A fixed sleep may still race with slow hosts or needlessly stall on fast ones. Prefer an env-driven or dependency-aware wait:

-# crude fixed delay-sleep 5+# configurable (defaults to 5 s) – override with STARTUP_DELAY or set to 0 to skip+sleep "${STARTUP_DELAY:-5}"

Even better, replace the delay entirely with Docker-Compose health-checks (depends_on: condition: service_healthy) or a small “wait-for” helper that polls the Reth / DA endpoints.

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

64-64: Use list syntax for single-word command for YAML clarity

While command: start works, the array form is less error-prone and avoids implicit string parsing by Compose:

- command: start+ command: ["start"]

Minor readability win; feel free to ignore if you prefer the scalar style.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e74ae1f and 785fab3.

📒 Files selected for processing (2)
  • apps/evm/single/docker-compose.yml (1 hunks)
  • apps/evm/single/entrypoint.sh (2 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: tzdybal
PR: rollkit/rollkit#1641
File: node/full_node_test.go:266-321
Timestamp: 2024-06-10T19:23:16.839Z
Learning: Issue #1663 was created to address adding comprehensive tests for error scenarios in `TestVoteExtension` in the rollkit repository.
Learnt from: tzdybal
PR: rollkit/rollkit#1641
File: node/full_node_test.go:266-321
Timestamp: 2024-10-08T18:35:32.960Z
Learning: Issue #1663 was created to address adding comprehensive tests for error scenarios in `TestVoteExtension` in the rollkit repository.
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.
apps/evm/single/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, so no error handling is needed when calling these methods.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: lint / markdown-lint
  • GitHub Check: test / Build All Rollkit Binaries
  • GitHub Check: test / Run Unit Tests
  • GitHub Check: test / Run Integration Tests
  • GitHub Check: test / Build Rollkit Docker Image
  • GitHub Check: test / Build Rollkit EVM Single Docker Image
  • GitHub Check: Summary
  • GitHub Check: Analyze (rust)
  • GitHub Check: Analyze (go)
🔇 Additional comments (1)
apps/evm/single/entrypoint.sh (1)

107-107: No issues – newline only
The trailing newline keeps POSIX shells happy.

@codecov

codecovBot commented Jul 10, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.09%. Comparing base (e74ae1f) to head (e949664).
Report is 1 commits behind head on main.

Additional details and impacted files
@@ Coverage Diff @@## main #2455 +/- ##
==========================================
- Coverage 73.20% 73.09% -0.11% 
==========================================
Files 68 68 Lines 6542 6542 ==========================================
- Hits 4789 4782 -7 - Misses 1357 1362 +5 - Partials 396 398 +2 
FlagCoverage Δ
combined73.09% <ø> (-0.11%)⬇️

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.

@auricom
auricom marked this pull request as draft July 10, 2025 12:26
@auricom
auricom marked this pull request as ready for review July 10, 2025 13:34
@tac0turtle
tac0turtle added this pull request to the merge queueJul 10, 2025
Merged via the queue into main with commit b85650aJul 10, 2025
30 of 31 checks passed
@tac0turtle
tac0turtle deleted the claude/fix_docker_compose_evm_single branch July 10, 2025 18:29
@tac0turtletac0turtle removed this from EvolveAug 25, 2025
Sign up for freeto 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

@auricom@tac0turtle