Skip to content

Conversation

@hanabi1224
Copy link
Contributor

@hanabi1224 hanabi1224 commented Dec 8, 2025

Summary of changes

Changes introduced in this pull request:

Reference issue to close (if applicable)

Closes

Other information and links

Change checklist

  • I have performed a self-review of my own code,
  • I have made corresponding changes to the documentation. All new code adheres to the team's documentation standards,
  • I have added tests that prove my fix is effective or that my feature works (if possible),
  • I have made sure the CHANGELOG is up-to-date. All user-facing changes should be reflected in this document.

Summary by CodeRabbit

  • Chores
    • Updated development environment configuration for improved stability and consistency.
    • Modernized container image references and standardized environment variable naming conventions.
    • Enhanced health monitoring for development services with improved initialization checks.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Walkthrough

The changes update environment variable naming conventions across Docker Compose services (removing underscores from GOLDEN_WEEK_HEIGHT), switch the Lotus container image to a Filecoin all-in-one variant, modify the API bump workflow to use hardcoded tag formats, and replace the lotus_node healthcheck from curl-based JSON-RPC to shell-based lotus CLI commands.

Changes

Cohort / File(s) Summary
Workflow configuration
.github/workflows/lotus-api-bump.yml
Removed NETWORK=calibnet assignment; updated three sed commands to use TAG-calibnet and added a new sed replacement for TAG-2k in devnet environment file instead of dynamic TAG-$NETWORK pattern.
Development environment setup
scripts/devnet/.env, scripts/devnet/docker-compose.yml
Updated Lotus image from ChainSafe devnet to Filecoin all-in-one variant; renamed environment variables by removing underscores (GOLDEN_WEEK_HEIGHTGOLDENWEEK_HEIGHT) across lotus_init, lotus_node, lotus_miner, and lotus_config services; changed lotus_node healthcheck from curl-based JSON-RPC call to shell-based lotus chain head command with 60s start_period.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • elmattic
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective: switching to the official lotus image for devnet CI checks, as evidenced by changes to the devnet .env file and CI workflow.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c672b5d and f9f4b53.

📒 Files selected for processing (3)
  • .github/workflows/lotus-api-bump.yml
  • scripts/devnet/.env
  • scripts/devnet/docker-compose.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 5930
File: build.rs:64-77
Timestamp: 2025-08-13T09:43:20.301Z
Learning: hanabi1224 prefers hard compile-time errors in build scripts rather than runtime safeguards or collision detection, believing it's better to fail fast and fix root causes of issues like malformed snapshot names.
Learnt from: hanabi1224
Repo: ChainSafe/forest PR: 6057
File: src/cli/subcommands/f3_cmd.rs:0-0
Timestamp: 2025-09-09T10:37:17.947Z
Learning: hanabi1224 prefers having default timeouts (like 10m for --no-progress-timeout) to prevent commands from hanging indefinitely, even when the timeout flag isn't explicitly provided by users. This fail-fast approach is preferred over requiring explicit flag usage.
⏰ 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). (3)
  • GitHub Check: Coverage
  • GitHub Check: Build forest binaries on Linux AMD64
  • GitHub Check: tests-release
🔇 Additional comments (4)
.github/workflows/lotus-api-bump.yml (1)

24-27: LGTM!

The hardcoded suffixes correctly differentiate between environments: -calibnet for API comparison tests (which need calibration network compatibility) and -2k for devnet (which uses 2k sector sizes). Removing the $NETWORK variable simplifies the workflow without losing clarity.

scripts/devnet/docker-compose.yml (2)

54-59: LGTM! Healthcheck improved for official image compatibility.

The switch from curl-based JSON-RPC to lotus chain head CLI is appropriate since the official image may not include curl. The 60s start_period gives adequate time for daemon initialization before health probes begin.


29-29: No action needed—the environment variable naming difference is intentional and correct.

Lotus and Forest are separate applications with independent environment variable schemas. The naming follows each application's conventions: LOTUS_GOLDENWEEK_HEIGHT for Lotus services and FOREST_GOLDEN_WEEK_HEIGHT for Forest services. Both are deployment-specific variables appropriate for their respective containers.

scripts/devnet/.env (1)

1-1: Image tag verified on Docker Hub.

The switch to filecoin/lotus-all-in-one:v1.34.3-2k is confirmed to exist and is current (last updated 2025-12-03), making it appropriate for devnet use.


Comment @coderabbitai help to get the list of available commands and usage tips.

@hanabi1224 hanabi1224 force-pushed the hm/offical-lotus-image-devnet-check branch 2 times, most recently from 7411419 to 4a60199 Compare December 10, 2025 11:13
@hanabi1224 hanabi1224 force-pushed the hm/offical-lotus-image-devnet-check branch from 4a60199 to 23f9017 Compare December 10, 2025 11:17
@LesnyRumcajs
Copy link
Member

@hanabi1224 what do we do with this draft?

@hanabi1224
Copy link
Contributor Author

I will need to investigate the failure

@LesnyRumcajs
Copy link
Member

@hanabi1224 as far as I remember, I'm not using an official lotus image because it doesn't contain some binaries; I don't remember which ones (lotus-seed maybe?)

@hanabi1224
Copy link
Contributor Author

test: >-
curl -s -x post -h "content-type: application/json"
--data '{ "jsonrpc": "2.0", "method": "filecoin.chainhead", "params": [], "id": 1 }'
http://lotus_node:${LOTUS_RPC_PORT}/rpc/v0 || exit 1
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The DNS name should be lotus instead of lotus_node. Not sure how this worked : )

Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem correct. DNS name should be taken from the service name (lotus_node or overridden by hostname). Let me double check.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://github.com/ChainSafe/forest/blob/main/scripts/devnet/lotus.env#L4

LOTUS_API_LISTENADDRESS=/dns/lotus/tcp/1234/http

Copy link
Member

Choose a reason for hiding this comment

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

ah no, container_name also overrides it. All good.

- LOTUS_TEEP_HEIGHT=${TEEP_HEIGHT}
- LOTUS_TOCK_HEIGHT=${TOCK_HEIGHT}
- LOTUS_GOLDEN_WEEK_HEIGHT=${GOLDEN_WEEK_HEIGHT}
- LOTUS_GOLDENWEEK_HEIGHT=${GOLDEN_WEEK_HEIGHT}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hanabi1224 hanabi1224 force-pushed the hm/offical-lotus-image-devnet-check branch from 4feb544 to f9f4b53 Compare January 12, 2026 11:48
@hanabi1224 hanabi1224 marked this pull request as ready for review January 12, 2026 12:32
@hanabi1224 hanabi1224 requested a review from a team as a code owner January 12, 2026 12:32
@hanabi1224 hanabi1224 requested review from LesnyRumcajs and akaladarshi and removed request for a team January 12, 2026 12:32
@hanabi1224
Copy link
Contributor Author

@LesnyRumcajs could you remind me why we needed a custom Lotus image for network upgrade?

@LesnyRumcajs
Copy link
Member

@LesnyRumcajs could you remind me why we needed a custom Lotus image for network upgrade?

I think it was either because of missing binaries and/or lack of 2k network image. Probably the latter, which was resolved in filecoin-project/lotus#12911.

That said, we still should keep our Lotus Dockerfile and workflows in case we need to work on a specific Lotus commit with some patches.

@hanabi1224 hanabi1224 added this pull request to the merge queue Jan 12, 2026
Merged via the queue into main with commit 7eb7569 Jan 12, 2026
47 checks passed
@hanabi1224 hanabi1224 deleted the hm/offical-lotus-image-devnet-check branch January 12, 2026 13:48
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.

3 participants