Hyli is the new proof-powered L1 to build the next generation of apps onchain.
This repository hosts the Rust node client for the Hyli chain.
Important
main is the development branch.
When building applications or running examples, use the latest release instead.
With Hyli, developers can build fast, composable, and verifiable apps without dealing with the usual pains of blockchain.
On Hyli, instead of executing transactions onchain, you run your app logic anywhere off-chain, in Rust, Noir, or even multiple languages at once. You only need to send a proof for onchain settlement.
📚 Website | Docs | Hyli Guide | Quickstart | Tooling
Follow on X | LinkedIn | Telegram | YouTube | Blog & Newsletter
Clone this repository.
Run:
git checkout v0.13.1
rm -rf data_node && RISC0_DEV_MODE=true SP1_PROVER=mock cargo run -- --pgYou can now use the Hyli explorer. Select localhost in the upper-right corner.
Use our quickstart guide to start building!
Click to open Cargo instructions.
To launch a local node for building and debugging smart contracts, without indexer:
cargo build
HYLI_RUN_INDEXER=false cargo runIf you need sp1 verifier, enable the feature: sp1
cargo run -F sp1To auto-start a temporary PostgreSQL instance and run the indexer, use the --pg flag:
cargo run -- --pgIf you want data persistence, you can run the PostgreSQL server:
# Start PostgreSQL with default configuration:
docker run -d --rm --name pg_hyli -p 5432:5432 -e POSTGRES_PASSWORD=postgres postgresand then in the hyli root:
cargo runClick to open Docker instructions.
# Build the dependency image, this is a cache layer for faster iteration builds
docker build -f Dockerfile.dependencies -t hyli-dep .
# Build the node image
docker build -t hyli .If you are building for an architecture different than your host machine (e.g., building arm64 on an amd64 host), make sure to set up your environment accordingly:
# 1. Enable Docker BuildKit (recommended)
export DOCKER_BUILDKIT=1
# 2. Create and use a buildx builder (only needed once)
docker buildx create --use --name hyli-builder
docker buildx inspect --bootstrap
# 3. Install QEMU for cross-platform builds
docker run --privileged --rm tonistiigi/binfmt --install all# Build the dependency image, this is a cache layer for faster iteration builds
docker buildx build --platform linux/arm64 -f Dockerfile.dependencies -t hyli-dep .
# Build the node image
docker buildx build --platform linux/arm64 -t hyli .docker run -v ./db:/hyli/data -e HYLI_RUN_INDEXER=false -p 4321:4321 -p 1234:1234 hyli🛠️ Note: If you build on MacOS (Apple Silicon), add
--platform linux/arm64to run script. 🛠️ Note: If you encounter permission issues with the/hyli/datavolume, add the--privilegedflag.
You can configure Hyli using environment variables or a configuration file.
Read the configuration files and environment variables reference in our docs.
Once your node is running, use our Quickstart guide to run the node, wallet, and scaffold and to start building easily.
To start the monitoring stack:
docker compose -f tools/docker-compose.yml up -dGrafana is accessible at: http://localhost:3000
To stop the monitoring stack:
docker compose -f tools/docker-compose.yml downRun the following command to enable the profiling profile, which is optimised but retains debug symbols:
cargo run --profile profiling- For advanced analysis, we recommend Samply.
Hyli includes built-in support for the dhat crate, which uses the Valgrind DHAT viewer for memory profiling.
To enable this feature, add the dhat feature flag. Use it selectively, as it has a runtime performance cost.