Skip to content

Quick Start

Clone the Boundless repo

To get started, first clone the Boundless monorepo on your proving machine, and change directory locally:

git clone https://github.com/boundless-xyz/boundless
cd boundless

Setup Dependencies

To run a Boundless prover, you'll need the following dependencies:

For a quick set up of Boundless dependencies on Ubuntu 22.04 LTS (see Operating System Requirements), please run:

sudo ./scripts/setup.sh

Running Boundless

The recommended place to start is the scripts/boundless_service.sh script. This script which will run everything you need to start proving.

Boundless is comprised of two major components:

  1. Bento is the local proving infrastructure. Bento will take requests, prove them and return the result
  2. The Broker interacts with the Boundless market. Broker can submit or request proves from the market.

To get started, run:

Terminal
sudo scripts/boundless_service.sh start

To stop all services, run:

Terminal
sudo scripts/boundless_service.sh stop

boundless_service.sh --help
Usage: scripts/boundless_service.sh [command] [options]
 
Commands:
  start   Start Docker Compose services
  stop    Stop and remove Docker Compose services
 
Options:
  -e, --env-file FILE    Specify a custom environment file (default: ./.env-compose)
  -h, --help             Display this help message
 
Examples:
  scripts/boundless_service.sh start
  scripts/boundless_service.sh start --env-file ./.env.production
  scripts/boundless_service.sh stop
  scripts/boundless_service.sh stop --env-file ./.env.production

Configuration

The compose.yml file defines all services within Bento. The Boundless repo includes a starter compose.yml which you can see here. For Broker configuration options, please see Broker.toml.

CUDA Compute Capability Detection

When working with NVIDIA GPUs, it's crucial to compile CUDA code with the correct compute capability to ensure optimal performance. The compute capability (e.g., sm_86 for Ampere architecture) defines the features and instructions supported by the GPU.

To automatically detect and set the correct NVCC flags for your system, please run:

Terminal
sudo scripts/set_nvcc_flags.sh

Multi GPU

In compose.yml, you can configure the number of GPU's via adding new gpu_agent<I> and changing the device_ids to map to specific physical GPUs (if on a single host, multi-GPU config).

Multi Host

Services can be run on other hosts, as long as the IP addresses for things link PostgreSQL / Redis / MinIO are updated on the remote host. See the .env-compose HOST configuration options here to adjust them.

Segment Size

Under the exec_agent service you can configure the segment size with the --segment-po2 flag. Bigger segments are preferable for performance but do impact the proving systems conjectured security bits slightly.

Segment sizes are specified in powers-of-two (po2). In order to pick the right segment po2 for your GPU VRAM see the performance optimization page.

Sending a Test Proof to Bento

Once everything is up, you can send a test proof to Bento to see if everything works. There are two options for test proofs:

  1. The Bento CLI allows for a simple test vector with a specified cycle count via the -c flag:
Terminal
RUST_LOG=info cargo run --bin bento_cli -- -c 32
  1. The Bento CLI also accepts existing ELF / input files for Boundless programs:
Terminal
RUST_LOG=info cargo run --bin bento_cli -- -f ./crates/bento-client/method_name -i /tmp/input.bin

Depositing Funds to the Market

Once the proving stack is running, the next step is to deposit funds to the Boundless market contract. This is for the Broker to be able to cover staking during lock-in. Currently, this will require depositing special non-transferable hitpoints (HP) tokens which are sent to whitelisted provers.

What next?

Next, you'll need to tune your Broker's settings, please see Broker Optimization. If you'd like to learn more about the technical design of Bento, please see the Bento Technical Design Reference.

To see your prover market statistics, check out the provers page on the Boundless Indexer.