Enclave is now The Interfold.
Build
Installation

Installation

This page is for developers who build E3 programs. It shows how to install the interfold CLI, which other tools the default project template needs, and how to verify the installation. At the end, you have a working interfold command and a computer that is ready for the Quick Start.

To run a ciphernode for the network, read Operator requirements instead.

Supported platforms

Each release publishes prebuilt archives for two platforms.

Operating systemArchitectureCLI archive
Linuxx86_64interfold-linux-x86_64.tar.gz
macOSApple silicon (arm64)interfold-macos-aarch64.tar.gz

The releases do not include archives for other platforms, for example Linux on arm64 or macOS on Intel. On these platforms, build the CLI from source.

Each release also publishes interfold-test-only-skip-proof-aggregation-linux-x86_64.tar.gz. This CLI has the test-only-skip-proof-aggregation Cargo feature, so its nodes can skip recursive proof aggregation. Use it only for tests and CI, for example the end-to-end tests of an E3 program. Do not use it on a network. The install script and interfold update do not install it.

Developer tools

interfold init needs Git and pnpm. The default project template also starts a local chain, compiles Rust code, and runs a web client, so it needs more tools.

ToolVersionThe template uses it to
Git (opens in a new tab)Any recent versionClone the template and make the project repository.
Node.js (opens in a new tab)22Run the client, the coordination server, and Hardhat. The repository CI uses Node.js 22.
pnpm (opens in a new tab)10.7.1Install packages and run scripts. The packageManager field in package.json pins 10.7.1.
Rust (opens in a new tab) (with rustup)1.91.1Build and run the program server. rust-toolchain.toml in the template pins this version.
Foundry (opens in a new tab)Current releaseRun anvil, the local chain that pnpm dev:all starts on port 8545.
A browser wallet, for example MetaMask (opens in a new tab)AnySign the transactions that the client sends to the local chain.

Some tools are necessary only for specific tasks.

ToolWhen you need it
cargo-openvm (opens in a new tab) v2.0.2Real proofs (program.dev: false). interfold program compile builds the guest with it. See Compute provider.
The CUDA toolkit and an NVIDIA GPUOptional. The CUDA build of the OpenVM worker proves on the GPU; without it, the CPU worker proves.
tmux (opens in a new tab)pnpm dev:all --tmux, which opens each process in its own tmux pane.
Noir (opens in a new tab) (nargo)Only to write your own circuits. The repository CI uses v1.0.0-rc.3. See Noir circuits.

For a released node, the setup commands install these components:

  • Barretenberg (bb) and the protocol circuits. interfold noir setup downloads the versions pinned in the CLI. Source builds pin bb 6.0.0. The template scripts run this command for you.
  • The OpenVM guest toolchain. cargo-openvm installs the toolchain it needs. The local scripts run in dev mode by default, so they do not use OpenVM.

Source builds need circuit artifacts that match the checkout and its bb 6.0.0 pin. Pull matching artifacts with pnpm store:circuits pull, or rebuild them. Do not reuse an archive from an older toolchain. See the source toolchain instructions.

When you run cargo in a folder that has a rust-toolchain.toml file, rustup uses the Rust version in that file. With Corepack enabled (corepack enable), pnpm uses the version in the packageManager field.

Install the CLI

Select an installation method. The install script is the recommended method.

Run the install script

curl -fsSL https://raw.githubusercontent.com/theinterfold/interfold/main/install | bash

If curl is not available, use wget:

wget -qO- https://raw.githubusercontent.com/theinterfold/interfold/main/install | bash

The script detects your platform, downloads the interfold archive for the latest release, and installs the binary to ~/.local/bin/interfold. If ~/.local/bin is not in your PATH, the script prints the commands to add it for bash, zsh, and fish.

Select a release (optional)

To install a specific release, give the --version option to the script, or set INTERFOLD_VERSION:

# With the script option
curl -fsSL https://raw.githubusercontent.com/theinterfold/interfold/main/install | bash -s -- --version v0.19.0
 
# With the environment variable
curl -fsSL https://raw.githubusercontent.com/theinterfold/interfold/main/install | INTERFOLD_VERSION=v0.19.0 bash

A tag without the v prefix, for example 0.19.0, also works. To install in another folder, add --dir <folder> or set INTERFOLD_INSTALL_DIR. For a folder that your user cannot write to, run the script with sudo bash instead of bash.

Change the installed version

interfold update replaces the binary that runs the command with another release. It downloads the archive for your platform from the GitHub release. Use the command to upgrade and to downgrade.

CommandResult
interfold updateInstalls the latest release.
interfold update --version v0.19.0Installs the release with that tag, newer or older than the installed release. A tag without the v prefix also works.
interfold update --version devInstalls the most recently published release, stable or pre-release (the dev channel).
interfold uninstallRemoves the interfold binary. The configuration, the keys, and the node data stay.

interfold upgrade is another name for interfold update. When the installed version and the target release are the same, the command prints interfold is already at <tag> and makes no change.

The command writes the new binary to a temporary file in the same folder, and then renames that file to the name of the binary. A running node continues to use the old release until you restart it. If your user cannot write to the folder of the binary, for example /usr/local/bin, run the command with sudo.

⚠️

Release 0.19.0 and earlier do not have the update command. To change the version of such a release, or to go back to a newer release after a downgrade to such a release, run the install script with --version <TAG>. If the binary is not in ~/.local/bin, also give its folder with --dir <folder>.

The interfoldup installer of older releases is not necessary. To remove it, run rm ~/.local/bin/interfoldup.

Verify the installation

Check the version

interfold --version

The command prints the CLI version, for example interfold 0.18.0.

Check the build revision

interfold rev

The command prints the short Git commit hash that the binary was built from. Run it in a folder that is not an Interfold project.

Check the compiled features

interfold rev --features

The CLI from the interfold-<platform> archive prints nothing. A binary built with test-only-skip-proof-aggregation prints that feature name. The CLI from the test-only archive is such a binary.

In a project folder with a running ciphernode, the CLI sends interfold rev to that node. The output is then the revision of the node, which can differ from the revision of your CLI.

Troubleshooting

ProblemCause and fix
command not found: interfoldThe install folder is not in your PATH. Add ~/.local/bin to your PATH.
unrecognized subcommand 'update'The installed CLI is release 0.19.0 or earlier. Run the install script.
No compatible binary found for platform: <platform>The install script found no interfold archive for your platform. Build the CLI from source.
No release archive exists for <os> on <arch>interfold update found no archive for your platform. Build the CLI from source.
GitHub API request for release <tag> failedThe tag does not exist, or GitHub is not available. Check the tag on the releases page.
Permission denied for <folder>interfold update or interfold uninstall cannot write to the folder of the binary. Run the command with sudo.
The source build stops with solc must be installedInstall the Solidity compiler solc and run the build again.

Next steps