Skip to content

Update localnet deploy scripts for Rust launcher#2524

Open
barakeinav1 wants to merge 189 commits into2262-port-node-launcher-to-rust-v2from
update-localnet-deploy-scripts
Open

Update localnet deploy scripts for Rust launcher#2524
barakeinav1 wants to merge 189 commits into2262-port-node-launcher-to-rust-v2from
update-localnet-deploy-scripts

Conversation

@barakeinav1
Copy link
Copy Markdown
Contributor

Summary

Test plan

  • Run deploy-tee-localnet.sh with MODE=localnet N=2 end-to-end
  • Verify rendered .toml files match expected structure
  • Verify launcher hash and measurement votes land on contract

🤖 Generated with Claude Code

DSharifi and others added 27 commits March 17, 2026 17:07
The tee-launcher now expects a structured TOML config instead of flat
key=value env files. Update deploy-tee-localnet.sh and single-node.sh
to render TOML configs matching the new Config struct, and rename the
old template to .bak.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Match the updated sam.toml which now includes [mpc_config.near_init]
with chain_id, boot_nodes, and genesis_path fields.

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

claude bot commented Mar 19, 2026

PR title type suggestion: This PR changes deployment scripts and configuration templates, which are maintenance/tooling changes. The type prefix should be chore: instead of starting with Update.

Suggested title: chore: update localnet deploy scripts for Rust launcher

@claude
Copy link
Copy Markdown

claude bot commented Mar 19, 2026

Code Review

This PR updates localnet deploy scripts for the Rust launcher: TOML config generation, path updates, and new voting phases. Overall the changes are straightforward and well-structured.

Issues found:

  • ports_to_toml missing space after = (both deploy-tee-localnet.sh:160 and single-node.sh:144): The generated TOML looks like { host =8080, container =8080 } — asymmetric spacing (space=value instead of space = value). While technically valid TOML, this is cosmetically inconsistent and could cause confusion. Consider { host = $host_port, container = $container_port } for consistency.

  • ports_to_toml duplicated across two scripts (deploy-tee-localnet.sh and single-node.sh): The function is identical in both files. If these scripts grow further, consider extracting shared helpers to a common sourced file. Not blocking, but worth noting.

  • set-localnet-env.sh contains hardcoded user-specific values: MACHINE_IP=51.68.219.1 and BASE_PATH=/mnt/data/barak/dstack appear to be specific to one developer's environment. This file is meant as a convenience template, but having a specific developer's IP and path committed could be confusing. Consider using placeholder values (e.g., MACHINE_IP=<your-ip>) or adding a comment that these must be customized.

  • extract_measurement_from_tcb_info uses printf with unsanitized jq output (deploy-tee-localnet.sh:~1135): The hex strings extracted by jq are interpolated directly into a JSON string via printf. If any field contained quotes or special characters, it would produce malformed JSON. Since these come from controlled tcb_info.json asset files (hex strings), the practical risk is low, but using jq -n to construct the JSON would be more robust:

    jq -n --arg mrtd "$mrtd" --arg rtmr0 "$rtmr0" --arg rtmr1 "$rtmr1" \
          --arg rtmr2 "$rtmr2" --arg kp "$kp_digest" \
      '{mrtd: $mrtd, rtmr0: $rtmr0, rtmr1: $rtmr1, rtmr2: $rtmr2, key_provider_event_digest: $kp}'

None of these are merge-blocking for a localnet deployment script. The logic is correct and the new voting phases are properly ordered.

✅ Approved — localnet-only script changes look correct. Minor suggestions above for robustness.

@netrome netrome force-pushed the 2262-port-node-launcher-to-rust-v2 branch from 51b916c to f16a291 Compare March 23, 2026 12:53
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