Skip to content

feat(docker): add checkpoint-sync node image and CI#1940

Draft
bewakes wants to merge 1 commit into
mainfrom
STR-3720-ckpt-sync-image
Draft

feat(docker): add checkpoint-sync node image and CI#1940
bewakes wants to merge 1 commit into
mainfrom
STR-3720-ckpt-sync-image

Conversation

@bewakes
Copy link
Copy Markdown
Contributor

@bewakes bewakes commented Jun 4, 2026

Description

This PR creates a new docker config for checkpoint sync node. This is done by passing --no-default-features while building strata as default feature is sequencer and we don't want that for a checkpoint sync node.

AI Usage
This is created by using claude code I request to have more eyes on this.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature/Enhancement (non-breaking change which adds functionality or enhances an existing one)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactor
  • New or updated tests
  • Dependency Update

Notes to Reviewers

Is this PR addressing any specification, design doc or external reference document?

  • Yes
  • No

If yes, please add relevant links:

Checklist

  • I have performed a self-review of my code.
  • I have commented my code where necessary.
  • I have updated the documentation if needed.
  • My changes do not introduce new warnings.
  • I have added (where necessary) tests that prove my changes are effective or that my feature works.
  • New and existing tests pass with my changes.
  • I have disclosed my use of AI in the body of this PR.

Related Issues

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 4, 2026

Commit: beddfd3

SP1 Execution Results

program cycles gas
EVM EE Chunk 824,732 969,394
EVM EE Account 404,056 498,593
Checkpoint 2,601,550 3,007,194

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.41%. Comparing base (b5d34b8) to head (9e40b7d).

@@            Coverage Diff             @@
##             main    #1940      +/-   ##
==========================================
- Coverage   84.42%   84.41%   -0.01%     
==========================================
  Files         637      637              
  Lines       76805    76805              
==========================================
- Hits        64840    64838       -2     
- Misses      11965    11967       +2     
Flag Coverage Δ
functional 66.50% <ø> (-0.01%) ⬇️
unit 69.52% <ø> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
crates/config/src/btcio.rs 56.81% <ø> (ø)

... and 4 files with indirect coverage changes

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

Comment on lines +65 to +88
# Patch rollup-params.json: update genesis_l1_view.blk
PATCHED_PARAMS="/app/data/rollup-params.json"
jq --argjson h "${TIP_HEIGHT}" --arg id "${TIP_HASH}" \
'.genesis_l1_view.blk.height = $h | .genesis_l1_view.blk.blkid = $id' \
"${PARAM_PATH}" > "${PATCHED_PARAMS}"
PARAM_PATH="${PATCHED_PARAMS}"

# Patch ol-params.json if provided
if [ -n "${OL_PARAMS_PATH}" ] && [ -f "${OL_PARAMS_PATH}" ]; then
PATCHED_OL="/app/data/ol-params.json"
jq --argjson h "${TIP_HEIGHT}" --arg id "${TIP_HASH}" \
'.last_l1_block.height = $h | .last_l1_block.blkid = $id' \
"${OL_PARAMS_PATH}" > "${PATCHED_OL}"
OL_PARAMS_PATH="${PATCHED_OL}"
fi

# Patch asm-params.json if provided
if [ -n "${ASM_PARAMS_PATH}" ] && [ -f "${ASM_PARAMS_PATH}" ]; then
PATCHED_ASM="/app/data/asm-params.json"
jq --argjson h "${TIP_HEIGHT}" --arg id "${TIP_HASH}" \
'.l1_view.blk.height = $h | .l1_view.blk.blkid = $id' \
"${ASM_PARAMS_PATH}" > "${PATCHED_ASM}"
ASM_PARAMS_PATH="${PATCHED_ASM}"
fi
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.

@bewakes lets not patch params here because OL genesis blk ID is a function of L1 genesis height, blkid, ... so that must be recomputed and injected in asm-params. Its easier to expect correct params must be loaded.

Comment on lines +89 to +91
elif [ "${CURRENT_GENESIS_HEIGHT}" -gt 0 ]; then
echo "genesis height is ${CURRENT_GENESIS_HEIGHT} — params already initialized, skipping patching"
fi
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.

We may not neeed this with above assumption.

Comment on lines +47 to +82
# Checkpoint-sync (non-sequencer) node. Reconstructs OL state from L1-buried
# checkpoints. Built without the sequencer feature; reuses the sequencer's
# generated params and the same bitcoind.
strata-checkpoint-sync:
build:
context: ..
dockerfile: docker/strata-checkpoint-sync/Dockerfile
image: strata-checkpoint-sync:latest
env_file:
- .env
environment:
CONFIG_PATH: /app/configs/config.sync.toml
PARAM_PATH: /app/configs/generated/rollup-params.json
OL_PARAMS_PATH: /app/configs/generated/ol-params.json
ASM_PARAMS_PATH: /app/configs/generated/asm-params.json
RUST_BACKTRACE: 1
volumes:
# Committed config:
- ./configs/config.sync.toml:/app/configs/config.sync.toml:ro
# Generated by init:
- ./configs/generated/rollup-params.json:/app/configs/generated/rollup-params.json:ro
- ./configs/generated/ol-params.json:/app/configs/generated/ol-params.json:ro
- ./configs/generated/asm-params.json:/app/configs/generated/asm-params.json:ro
- strata-checkpoint-sync-data:/app/data
ports:
- "8433:8432"
- "9616:9615"
networks:
- alpen_network
entrypoint: ["/usr/local/bin/entrypoint.sh"]
healthcheck:
test: ["CMD-SHELL", "curl -sf http://localhost:8080/healthz"]
interval: 5s
timeout: 5s
retries: 30
start_period: 10s
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.

I think checkpoint sync node should not be placed in this file because it only depends on a bitcoin chain so its better to separate it out.

Comment on lines +39 to +41
[exec.reth]
rpc_url = "reth:8551"
secret = "configs/jwt.hex"
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.

This is misleading for checkpoint sync node. If these are non-optional then lets add a ticket to clean this up later.

Comment on lines +12 to +14
admin_rpc_host = "0.0.0.0"
admin_rpc_port = 8434
admin_rpc_bearer_token = "dev-only-change-me"
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.

These should be removed from here as checkpoint-sync won't need it and it either has defaults or is optional?

RUN --mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,sharing=private,target=/app/target \
cargo chef cook --release --recipe-path recipe.json
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.

We may not need to cook non-default dependencies.

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