Implementation of zero-knowledge proof circuits for Blobstream, Celestia's data availability solution for Ethereum.
Blobstream X's core contract is BlobstreamX
, which stores commitments to ranges of data roots from Celestia blocks. Users can query for the validity of a data root of a specific block height via verifyAttestation
, which proves that the data root is a leaf in the Merkle tree for the block range the specific block height is in.
Add env variables to .env
, following the .env.example
. You do not need to fill out the local configuration, unless you're planning on doing local proving.
Run BlobstreamX
script to request updates to the specified light client continuously. For the cadence of requesting updates, update LOOP_DELAY_MINUTES
.
In /
, run
cargo run --bin blobstreamx --release
To deploy the BlobstreamX
contract:
-
Get the genesis parameters for a
BlobstreamX
contract from a specific Celestia block.cargo run --bin genesis -- --block <genesis_block>
-
Add .env variables to
contracts/.env
, followingcontracts/.env.example
. -
Initialize
BlobstreamX
contract with genesis parameters. Incontracts
, runforge install source .env forge script script/Deploy.s.sol --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast --verify --verifier etherscan --etherscan-api-key $ETHERSCAN_API_KEY
Set the whitelist status of a functionID to Default (0), Custom (1) or Disabled (2).
cast calldata "setWhitelistStatus(bytes32,uint8)" <YOUR_FUNCTION_ID> <WHITELIST_STATUS>
Add a custom prover for a specific functionID.
cast calldata "addCustomProver(bytes32,address)" <FUNCTION_ID> <CUSTOM_PROVER_ADDRESS>