A lightweight registry for ZKVM binaries (ELFs). Applications upload their built contract binaries and later download them by contract + program_id at runtime. The registry supports both local filesystem and Google Cloud Storage backends, keeps a single JSON index at the root, and exposes a simple HTTP API plus a small web UI.
- Upload API (authenticated) for ELFs + metadata.
- Public read APIs to list contracts/programs and download ELFs.
- Delete APIs (admin key) to remove a program or an entire contract.
- Storage backends: local data dir or GCS bucket/prefix.
- Index file stored at the storage root; rebuilt if missing.
- Caching: in-memory LRU for index and recent binaries to reduce GCS calls.
- Prometheus metrics exposed by the existing
/v1/metricsstack. - Uploader CLI/Lib for sending binaries from CI or tooling.
server/– HTTP API + storage backendsfront/– registry UIhyli-registry-uploader/– CLI + lib to upload binaries
cargo run -p serverBy default, it uses local storage under data/ and a development API key.
cd front
bun install
bun run devAll config values can be set via TOML or HYLI__... env vars.
Key settings:
api_key: required for upload endpoints.admin_key: required for delete endpoints.storage_backend:"local"or"gcs".gcs_bucket: required when using GCS.gcs_prefix: optional prefix inside the bucket.data_directory: base directory (defaultdata).local_storage_directory: optional override for local storage path.rest_server_max_body_size: set0for unlimited upload size.
Example env:
export HYLI_API_KEY="dev-api"
export HYLI_ADMIN_KEY="dev-admin"
export HYLI_STORAGE_BACKEND="local"POST /api/elfs/:contract
Headers:
x-api-key: upload API key
Form fields (multipart):
program_id: string (no validation)metadata: JSON stringtoolchaincommitzkvm
file: ELF binary
Behavior:
- Overwrites if
(contract, program_id)already exists. program_idis hashed for storage file names (prevents long filename issues).- Contract name must be lowercase with no slashes.
GET /api/elfs– list all contracts + programsGET /api/elfs/:contract– list programs for a contractGET /api/elfs/:contract/:program_id– download ELF
Headers:
-
x-api-key: admin key -
DELETE /api/elfs/:contract/:program_id– delete one program -
DELETE /api/elfs/:contract– delete whole contract
- Objects are stored under
:contract/folder. - Each program stores:
- ELF binary:
:contract/:hash.elf - Metadata:
:contract/:hash.json
- ELF binary:
- Root
index.jsonmaps contracts to program entries. - Index is rebuilt by scanning metadata if
index.jsonis missing.
- Index cache: keeps latest in memory.
- Binary cache: keeps the 2 latest binaries per contract in memory.
The uploader can be used as a binary or imported as a library in other crates.
Library entrypoints:
upload(UploadRequest)– send a binary to the registryprogram_id_hex_from_file(path)– read bytes and hex-encode (SP1-style)program_id_from_file(path)– read raw program id from file
CLI subcommands:
sp1– takes an ELF + vk file, hex-encodes program_id from vkrisc0– takes an ELF + explicit program_id
The frontend provides:
- Contract list + program listing
- Simple stats
- Download links
- Admin login (secret only) + delete actions
Admin key is stored in localStorage as hyli_registry_admin_key.
Prometheus metrics are served by the existing /v1/metrics endpoint. No extra setup is required; exporters are configured in the stack.
- No file size limits, no content-type restrictions.
- Timestamps are server-generated.
program_idis stored in the index but not used as a filename.