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).
We use mise to track and manage dependencies. Please first install mise, and then run mise install to install the dependencies.
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.
A complete overview of the integration pipeline can be found in the documentation. For zkVM integration details, refer to the following sections:
- Overview on data transformation for secure integration with zkVM
- Three implementation of EigenDAPreimageProvider trait and their differences
For a practical example of how the library can be integrated with a zkVM, see example/preloader/main.rs. (Note: this example includes mock elements for demonstration purposes.)
For real-world implementations, both Op-succinct and Kailua integrate Hokulea in their zkVM workflows:
documentation is also applicable for other integrations, and pay special attention on the trust assumption on certain data structure.
Hokulea relies on eigenda proxy for fetching preimage values, including recency_window, cert_validity and encoded_payload. For cert validity and encode payload, the preimage comes from proxy and is verified later, whereas the recency window value is set in hokulea directly. However, the proxy maintains its own recency_window to process the eigenda blob derivation. For all trustless integrations, this number must be kept consistent on every proxy run by op-nodes.
Currently, each rollup is free to choose the recency_window value, and it determines the staleness of AltDA commitments (DA certificates). If a DA Certificate is stale based on the recency value, it is dropped from the derivation pipeline. For more info see our spec. We recommend it be set to the seq_window_size from the rollup config.
Currently on proxy, the recency window is set to 0 by default, which ignores any recency check entirely. If recency is configured to some other value (like seq_window_size), the following components need to share the same value or history of values
- when starting the hokulea host, by setting
recency_window - and implementing
RecencyWindowProvidertrait - ensure all proxy are using the same recency config
To prevent misconfiguration, hokulea has required user to enter the recency_window which would be checked against the implementation of RecencyWindowProvider trait when creating the hokulea ELF file. If the provided host argument is different from the RecencyWindowProvider implementation, the proving system would abort. There is planned work on proxy to expose its public config, such that all proxy users (like hokulea host) can retrieve the recency window from the proxy.
We use kurtosis to start an optimism-package devnet, and run the hokulea host and client against it.
just run-kurtosis-devnet-with-eigenlabs-packageHokulea now supports Mainnet, Sepolia and Holesky. More in the future. However, chain id 3151908 is explicitly not supported for trustless secure integration. Hokulea uses kurtosis devnet with chain id 3151908 for testing. Proving against 3151908 will generate a ZK proof that cannot be verified by the CanoeVerifier implementation in this repo.
# 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':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-asteriscThen you can run
just run-client-against-devnet 'asterisc'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:
- Steel(Risc0)
- under canoe/steel feature.
- Requires installing the Risc0 toolchain, see rzup.
- Sp1-contract-call(Succinct)
- under canoe/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.
cd example/preloader
just run-preloader .devnet.envMore information at ./example/preloader/README.md
just generate-deps-graphvizYou 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
# No need to fill L1_CONFIG_PATH as sepolia can be inferred from l2 rollup config
just run-client-against-sepolia 'native'