Skip to content

chore: port node launcher to Rust#2618

Open
barakeinav1 wants to merge 13 commits intomainfrom
barak/port-node-launcher-to-rust-v3
Open

chore: port node launcher to Rust#2618
barakeinav1 wants to merge 13 commits intomainfrom
barak/port-node-launcher-to-rust-v3

Conversation

@barakeinav1
Copy link
Copy Markdown
Contributor

@barakeinav1 barakeinav1 commented Mar 25, 2026

closes #2262
replaces #2326 (keeping #2326 as base line for reviews)

Summary

  • Port the TEE node launcher from Python to Rust (crates/tee-launcher/)
  • Config format changed from .env to TOML with [launcher_config] and [mpc_node_config] sections
  • MPC config delivery changed from docker run --env flags to TOML file at /mnt/shared/mpc-config.toml
  • Container launch changed from docker run to docker compose up -d
  • dstack interaction changed from curl to native dstack-sdk Rust crate
  • Updated CI with launcher build verification and non-TEE smoke test
  • Old Python launcher files are intentionally kept and will be removed in a dedicated follow-up ([rust-launcher] Remove old Python launcher #2615)

Supersedes #2326. See #2598 for detailed analysis and follow-up issue tracking.

Test plan

  • Existing Rust tests pass (cargo nextest run -p tee-launcher)
  • CI launcher build and verification passes
  • Non-TEE launcher smoke test passes
  • Python launcher files are preserved (verified by checking tee_launcher/ exists)
  • measurements are updated
  • 2 cluster node works

🤖 Generated with Claude Code

netrome and others added 3 commits March 23, 2026 13:53
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore all tee_launcher/ files and old .conf configs from main branch.
These coexist alongside the new Rust launcher and deployment configs.
The old files will be removed in a dedicated follow-up PR (#2615).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…her-to-rust-v3

# Conflicts:
#	Cargo.toml
#	crates/contract/src/lib.rs
#	crates/test-utils/assets/README.md
#	crates/test-utils/assets/app_compose.json
#	crates/test-utils/assets/collateral.json
#	crates/test-utils/assets/launcher_image_compose.yaml
#	crates/test-utils/assets/mpc_image_digest.txt
#	crates/test-utils/assets/near_account_public_key.pub
#	crates/test-utils/assets/near_p2p_public_key.pub
#	crates/test-utils/assets/public_data.json
#	crates/test-utils/assets/quote.json
#	crates/test-utils/assets/tcb_info.json
#	crates/test-utils/src/attestation.rs
#	docs/UPDATING_LAUNCHER.md
#	docs/updating-launcher-internal-guide.md
#	localnet/tee/scripts/single-node-readme.md
#	tee_launcher/UPDATING_LAUNCHER.md
@claude
Copy link
Copy Markdown

claude bot commented Mar 25, 2026

PR title type suggestion: This PR includes significant source code changes (new crates/tee-launcher/ crate), so the type prefix should probably be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

barakeinav1 and others added 2 commits March 25, 2026 17:22
- Regenerate Cargo.lock after merge with main (reqwest 0.12 -> 0.13 for tee-launcher)
- Fix link to renamed docs/updating-launcher-internal-guide.md in test-utils README

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: Since this PR substantially restructures existing launcher code (porting from Python to Rust) with significant new source code in crates/tee-launcher/src/, the type prefix should probably be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

- Regenerate test assets from real CVM running Rust launcher
  (nearone/mpc-launcher@sha256:02ba8096...) with MPC node main-9515e18
  (sha256:6a5700fc...) on dstack-dev-0.5.8
- Update VALID_ATTESTATION_TIMESTAMP
- Update attestation/assets/tcb_info.json
- Fix rust-launcher scripts: CONF_TPL path, OS_IMAGE default,
  NEAR_RPC_URL unbound variable, BASE_PATH in set-localnet-env.sh
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR restructures and ports an existing launcher component to Rust, which involves significant source code changes across a new crate. The type prefix should probably be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

The workspace uses reqwest 0.13 which defaults to
rustls-platform-verifier (loads CA certs from the system). The launcher
Docker image is a minimal container without system CA certs, causing
a "No CA certificates were loaded from the system" panic at startup.

Pin tee-launcher to reqwest 0.12 with rustls-tls feature which bundles
Mozilla's root certs into the binary via webpki-roots, making TLS work
without any system dependencies and preserving reproducible builds.

Also revert the ca-certificates addition to Dockerfile-launcher since
it's no longer needed.
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR makes substantial source code changes by porting the launcher to Rust, so the type prefix should probably be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

- Update launcher compose hash to f0d8146a (built from this branch
  with reqwest 0.12 / bundled webpki-roots fix)
- Regenerate test assets from real CVM running the updated Rust launcher
  with MPC node main-9515e18 on dstack-dev-0.5.8
- Update VALID_ATTESTATION_TIMESTAMP and attestation/assets/tcb_info.json
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR ports the launcher to Rust and updates build/deployment infrastructure (Dockerfiles, deployment scripts), so the type prefix should probably be build: instead of chore:.

Suggested title: build: port node launcher to Rust

@barakeinav1 barakeinav1 changed the base branch from main to 2262-port-node-launcher-to-rust-v2 March 26, 2026 09:05
@barakeinav1 barakeinav1 changed the base branch from 2262-port-node-launcher-to-rust-v2 to main March 26, 2026 09:06
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR restructures the launcher subsystem by porting from Python to Rust — a significant code refactoring. The type prefix should probably be refactor: instead of chore:

Suggested title: refactor: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR rewrites the launcher from another language to Rust. The type prefix should probably be refactor: instead of chore: since you're restructuring code without changing behavior.

Suggested title: refactor: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR adds substantial new source code to port the launcher from Python to Rust, so the type should be refactor: instead of chore:

Suggested title: refactor: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR involves significant source code implementation. Since it's restructuring existing functionality (porting the launcher to Rust), the type prefix should probably be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR restructures the launcher implementation into Rust, which is fundamentally a refactoring. The type prefix should be refactor: instead of chore:.

Suggested title: refactor: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR adds a new launcher as build/deployment infrastructure, so the type prefix would be more precise as build: instead of chore:.

Suggested title: build: port node launcher to Rust

@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR is porting the launcher to Rust—a significant restructuring of existing functionality. The type prefix should probably be refactor: instead of chore:.
Suggested title: refactor: port node launcher to Rust

The Python launcher code is still in tee_launcher/ (to be removed
separately in #2615). Restore the pytest job so the Python launcher
tests continue to run in CI.
@claude
Copy link
Copy Markdown

claude bot commented Mar 26, 2026

PR title type suggestion: This PR is primarily a source code change (porting the launcher to Rust), so the type prefix should probably be refactor instead of chore. A port is restructuring code without changing behavior.

Suggested title: refactor: port node launcher to Rust

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.

port node launcher to rust

2 participants