Skip to content

hyli-org/hyli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hyli Build Status Code Coverage

Hyli

Hyli is a high-performance blockchain with built-in privacy.

This repository hosts the Rust node client for the Hyli chain.

Telegram Chat Twitter

Important

main is the development branch. When building applications or running examples, use the latest release instead.

🍊 What is Hyli?

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.

πŸš€ Getting Started

Quickstart with Cargo

Clone this repository.

Run:

git checkout v0.13.1
rm -rf data_node && RISC0_DEV_MODE=true SP1_PROVER=mock cargo run -- --pg

You can now use the Hyli explorer. Select localhost in the upper-right corner.

Use our quickstart guide to start building!

πŸ“¦ [Alternative] Getting started with Cargo

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 run

If you need sp1 verifier, enable the feature: sp1

cargo run -F sp1

To auto-start a temporary PostgreSQL instance and run the indexer, use the --pg flag:

cargo run -- --pg

If 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 postgres

and then in the hyli root:

cargo run

🐳 [Alternative] Getting started with Docker

Click to open Docker instructions.

Build Locally

# Build the node image
docker build -t hyli .

# To build with the base image including the noir verifier, run with
docker build --build-arg BASE_IMAGE=ghcr.io/hyli-org/base:main -t hyli-noir .

# Optional: build the dependency image, this is a cache layer for faster iteration builds
docker build -f .github/docker/Dockerfile.dependencies -t hyli-dep .
# You can then build with:
docker build --build-arg DEP_IMAGE=hyli-dep -t hyli .

Run Locally with Docker

docker run -v ./db:/hyli/data -e HYLI_RUN_INDEXER=false -p 4321:4321 -p 1234:1234 hyli

πŸ› οΈ Note: If you encounter permission issues with the /hyli/data volume, add the --privileged flag.

Configuration

You can configure Hyli using environment variables or a configuration file.

Read the configuration files and environment variables reference in our docs.

🧰 Build with Hyli

Once your node is running, use our Quickstart guide to run the node, wallet, and scaffold and to start building easily.

πŸ“Š Monitoring with Grafana and Prometheus

Starting Services

To start the monitoring stack:

docker compose -f tools/docker-compose.yml up -d

Access Grafana

Grafana is accessible at: http://localhost:3000

Stopping Services

To stop the monitoring stack:

docker compose -f tools/docker-compose.yml down

πŸ› οΈ Profiling and Debugging

Profiling Build

Run the following command to enable the profiling profile, which is optimised but retains debug symbols:

cargo run --profile profiling

CPU Profiling

  • For advanced analysis, we recommend Samply.

Memory Profiling

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.

About

Hyli is a high-performance blockchain with built-in privacy.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors 19

Languages