Skip to content

chore(tee): move cluster deploy/test scripts to mpc-private - #3895

Merged
barakeinav1 merged 2 commits into
mainfrom
chore/move-tee-cluster-scripts-to-mpc-private
Jul 27, 2026
Merged

chore(tee): move cluster deploy/test scripts to mpc-private#3895
barakeinav1 merged 2 commits into
mainfrom
chore/move-tee-cluster-scripts-to-mpc-private

Conversation

@barakeinav1

Copy link
Copy Markdown
Contributor

Closes #3894. Replaces #3888.

Removes the TEE cluster deploy/test scripts from localnet/tee/scripts/rust-launcher/ — they move to the internal near/mpc-private repo (tools/tee-cluster/, near/mpc-private#495) where they can change with lighter review:

  • deploy-tee-cluster.sh, set-localnet-env.sh, set-testnet-env.sh, create-and-sweep-to-treasury.sh, test-migration.sh, test-verify-and-upgrade.sh, test-hash-override.sh, how-to-run-deploy-tee-cluster.md

Kept here (the moved scripts reference these via MPC_REPO_ROOT):

  • single-node.sh (+readme) — generates the Rust test fixtures, so it belongs with the code
  • common.sh and the node.*.tpl templates

Also repoints the testnet setup guide's N-node section to the internal tooling and trims the rust-launcher README.

Draft until near/mpc-private#495 lands — so the tooling exists in mpc-private before it's removed here.

Removes the TEE cluster deploy/test scripts (deploy-tee-cluster.sh,
set-*-env.sh, create-and-sweep-to-treasury.sh, test-migration.sh,
test-verify-and-upgrade.sh, test-hash-override.sh, how-to-run doc);
they now live in near/mpc-private tools/tee-cluster and run against a
local mpc checkout via MPC_REPO_ROOT.

Keeps single-node.sh (+ readme), common.sh and the templates here (the
moved scripts reference them via MPC_REPO_ROOT; single-node.sh generates
the Rust test fixtures). Repoints the testnet setup guide and trims the
rust-launcher README accordingly.

Replaces #3888.
@barakeinav1
barakeinav1 force-pushed the chore/move-tee-cluster-scripts-to-mpc-private branch from 636845d to 53d98f8 Compare July 26, 2026 12:26
@barakeinav1
barakeinav1 marked this pull request as ready for review July 26, 2026 12:27
Copilot AI review requested due to automatic review settings July 26, 2026 12:27

Copilot AI 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.

Pull request overview

Moves the TEE cluster deploy/test operational scripts out of the public repo and into the internal near/mpc-private tooling location, while keeping the shared helpers/templates and the single-node test-asset generation script in mpc. This reduces churn and review load in this repo while preserving the in-repo pieces that the private tooling references via MPC_REPO_ROOT.

Changes:

  • Remove the cluster deploy/test scripts and their how-to doc from localnet/tee/scripts/rust-launcher/ (they are intended to live in near/mpc-private/tools/tee-cluster/).
  • Update localnet/tee/scripts/rust-launcher/README.md to reflect the split (cluster tooling moved; shared bits + single-node remain).
  • Repoint the testnet setup guide’s N-node section to the internal tooling.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.

Show a summary per file
File Description
localnet/tee/scripts/rust-launcher/test-verify-and-upgrade.sh Removed (cluster verification/upgrade test script moved to internal tooling).
localnet/tee/scripts/rust-launcher/test-migration.sh Removed (cluster migration test script moved to internal tooling).
localnet/tee/scripts/rust-launcher/test-hash-override.sh Removed (hash override test script moved to internal tooling).
localnet/tee/scripts/rust-launcher/set-testnet-env.sh Removed (testnet env preset moved to internal tooling).
localnet/tee/scripts/rust-launcher/set-localnet-env.sh Removed (localnet env preset moved to internal tooling).
localnet/tee/scripts/rust-launcher/README.md Updated to point cluster scripts to near/mpc-private and document what remains here.
localnet/tee/scripts/rust-launcher/how-to-run-deploy-tee-cluster.md Removed (cluster deploy how-to moved to internal tooling).
localnet/tee/scripts/rust-launcher/deploy-tee-cluster.sh Removed (cluster deploy script moved to internal tooling).
localnet/tee/scripts/rust-launcher/create-and-sweep-to-treasury.sh Removed (testnet funding helper moved to internal tooling).
docs/testnet/setup-guide-for-testnet-with-tee-support.md Updated to direct N-node deployments/scaling to internal tooling.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@claude

claude Bot commented Jul 26, 2026

Copy link
Copy Markdown

Pull request overview

Removes the TEE cluster deploy/test shell scripts (deploy-tee-cluster.sh, set-*-env.sh, create-and-sweep-to-treasury.sh, test-migration.sh, test-verify-and-upgrade.sh, test-hash-override.sh, and how-to-run-deploy-tee-cluster.md) from localnet/tee/scripts/rust-launcher/. They move to near/mpc-private (tools/tee-cluster/) and reach back into this repo via MPC_REPO_ROOT. The single-node test-asset generator, shared helpers, and templates remain. Docs are repointed accordingly.

Changes:

  • Delete 8 shell/markdown files (~3,900 LoC removed)
  • Trim localnet/tee/scripts/rust-launcher/README.md to describe only what stays; add a callout pointing at the mpc-private location
  • Update docs/testnet/setup-guide-for-testnet-with-tee-support.md N-node section to reference the mpc-private tooling instead of the deleted local scripts

Reviewed changes

Per-file summary
File Description
docs/testnet/setup-guide-for-testnet-with-tee-support.md Repoint N-node deploy references from local deploy-tee-cluster.sh to the internal near/mpc-private tools/tee-cluster/ directory.
localnet/tee/scripts/rust-launcher/README.md Add "moved to mpc-private" callout; drop Quick Start / Test Commands sections; trim script table to what remains (single-node.sh, tpl files, common.sh).
localnet/tee/scripts/rust-launcher/create-and-sweep-to-treasury.sh Deleted.
localnet/tee/scripts/rust-launcher/deploy-tee-cluster.sh Deleted (1,763 lines).
localnet/tee/scripts/rust-launcher/how-to-run-deploy-tee-cluster.md Deleted.
localnet/tee/scripts/rust-launcher/set-localnet-env.sh Deleted.
localnet/tee/scripts/rust-launcher/set-testnet-env.sh Deleted.
localnet/tee/scripts/rust-launcher/test-hash-override.sh Deleted.
localnet/tee/scripts/rust-launcher/test-migration.sh Deleted.
localnet/tee/scripts/rust-launcher/test-verify-and-upgrade.sh Deleted.

Findings

Verified: no in-repo file (scripts, Rust, docs, CI configs) still references the deleted scripts as if they were local. single-node.sh and common.sh do not source or invoke any of the removed files. Retained artifacts (single-node.sh, common.sh, node.conf.{localnet,testnet}.toml.tpl, ../node.env.tpl, single-node-readme.md) all still exist and match the README's new "kept here" list.

Non-blocking (nits, follow-ups, suggestions):

  • localnet/tee/scripts/rust-launcher/common.sh:43 — comment "Bob's numbers match deploy-tee-cluster.sh's canonical values" now points to a script no longer in this repo. Consider "match the canonical values used by the mpc-private tools/tee-cluster/deploy-tee-cluster.sh" (or drop the historical aside about older test scripts disagreeing, which is no longer useful context now that those scripts are gone).
  • PR description still says "Draft until near/mpc-private#495 lands," but the PR is no longer marked draft. Please confirm the internal PR has merged (and MPC_REPO_ROOT-based tooling exists there) before this is merged — otherwise operators following the testnet setup guide will hit a dead link.

✅ Approved

Drop the dangling deploy-tee-cluster.sh reference (moved to mpc-private) and the
outdated 'older test scripts disagreed on bob' aside; keep the canonical/shared
IP-layout note.
@barakeinav1

Copy link
Copy Markdown
Contributor Author

Thanks — both fair.

localnet/tee/scripts/rust-launcher/common.sh:43 — comment "Bob's numbers match deploy-tee-cluster.sh's canonical values" now points to a script no longer in this repo … (or drop the historical aside about older test scripts disagreeing…)

Fixed in 77ded7d. Dropped the dangling deploy-tee-cluster.sh reference and the "older test scripts disagreed on bob" aside — both refer to scripts this PR removes from the repo, so that archaeology no longer helps a reader here. Kept the part that's still true: it's the canonical, shared IP layout so single-node.sh and the mpc-private tools/tee-cluster scripts stay in sync.

PR description still says "Draft until near/mpc-private#495 lands," but the PR is no longer marked draft … confirm the internal PR has merged … before this is merged — otherwise operators following the testnet setup guide will hit a dead link.

Correct, and this is the one that matters: #3895 must merge after near/mpc-private#495 (still open), or the testnet setup guide points at tooling that isn't there yet. It's ready for review, but should be held from merge until #495 lands.

@netrome netrome left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks 🙏

Comment on lines +19 to +24
For deploying **N nodes at once** (or scaling up existing networks), the
automated deploy tooling (`deploy-tee-cluster.sh` — resumable and phase-based:
account creation, contract deployment, key generation, attestation, and voting)
lives in the internal `near/mpc-private` repo under `tools/tee-cluster/`. It runs
against a local mpc checkout via `MPC_REPO_ROOT`; see that directory's `README.md`
and `how-to-run-deploy-tee-cluster.md` for the full reference.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nit: This might be confusing for external readers - should we move this doc to our internal repo as well?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

docs/testnet/setup-guide-for-testnet-with-tee-support.md  is similar in nature to docs/localnet/localnet.md or docs/localnet/tee-localnet.md - So I think we should keep it in place.

Hopefully it won't confuse external reviewers too much, since it explains that automated script live in an internal mpc-private repo.

@barakeinav1
barakeinav1 added this pull request to the merge queue Jul 27, 2026
Merged via the queue into main with commit 2a92bc9 Jul 27, 2026
15 checks passed
@barakeinav1
barakeinav1 deleted the chore/move-tee-cluster-scripts-to-mpc-private branch July 27, 2026 08:49
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.

Move TEE cluster deploy/test scripts from mpc to mpc-private

4 participants