Skip to content

Layr-Labs/hokulea

Repository files navigation

Hokulea

Hokulea is a Polynesian double-hulled voyaging canoe. Hōkūle‘a (“Star of Gladness”), a zenith star of Hawai‘i, which appeared to him growing ever brighter in a dream. Source

Hokulea is a library to provide the altda providers for a derivation pipeline built with kona to understand eigenDA blobs, following the kona book recommendation (also see this comment).

Dependencies

We use mise to track and manage dependencies. Please first install mise, and then run mise install to install the dependencies.

SRS points

Hokulea's proving client currently computes a challenge proof that validates the correctness of the eigenda blob against the provided kzg commitment. Such computation requires the proving client to have access to sufficient KZG G1 SRS points. Currently the SRS points are (hardcoded) assumed to be located at resources/g1.point. You can download the SRS points to that location by running just download-srs, which downloads the g1.point file from the eigenda repo.

Local Manual Testing

We use kurtosis to start an optimism-package devnet, and run the hokulea host and client against it.

just run-kurtosis-devnet

Running the native client

# Before running the client, it will download the needed g1.point SRS file
# and the rollup.json config file. Temporary env variables are stored at
# .devnet.env and .run.devnet.env
just run-client-against-devnet 'native'

Running on Asterisc

:Warning: Building the client to run on asterisc currently doesn't work. We are spending most of our current effort on zk approaches instead, but we will eventually fix this.

You will first need to build the client against the correct arch. Run

just build-client-for-asterisc

Then you can run

just run-client-against-devnet 'asterisc'

Risc0 and Sp1 toolchain installation

Canoe takes advantage of zkvm to create a validity proof that attestes the validity of DA certificates. The proof generation requires compiling rust code into a ELF file runnable within zkVM. The canoe crate in Hokulea is dedicated for such purpose. Canoe currently supports two backends:

  1. Steel(Risc0)
    • Gated behind the hokulea-proof steel feature.
    • Requires installing the Risc0 toolchain, see rzup.
  2. Sp1-contract-call(Succinct)
    • Gated behind the hokulea-proof sp1-cc feature.
    • Requires installing Sp1 toolchain, see sp1up.

Trying to build the hokulea client binary with either zkvm backend feature will fail if the respective toolchain is not installed.

Running the example preloaded client with Steel or Sp1-contract-call

cd example/preloader
just run-preloader .devnet.env

More information at ./example/preloader/README.md

If you are interested in looking at the dependancy graph of crates

just generate-deps-graphviz

Run Against Sepolia

You will need to run an instance of eigenda-proxy with V2 support. Then populate the .sepolia.env file, see a template at .example.env.

# To download a `sepolia.rollup.json` from a rollup consensus node, you can use the command
cast rpc "optimism_rollupConfig" --rpc-url $ROLLUP_NODE_RPC | jq > sepolia.rollup.json
# Before running the client, it will download the needed g1.point SRS file
# and the rollup.json config file. Temporary env variables are stored at
# .sepolia.env and .run.sepolia.env
just run-client-against-sepolia 'native'

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •