Rust implementation of Celestia's data availability node able to run natively and in browser-based environments.
Supported features:
- Synchronize and verify
ExtendedHeaders from genesis to the network head - Header exchange (
header-ex) client and server - Listening for, verifying and redistributing extended headers on gossip protocol (
header-sub) - Persistent store for Headers
- Integration tests with Go implementation
- Data Availability Sampling
- Creating, distributing, and listening for Fraud proofs
Install the node. Note that currently to serve lumina to run it from the browser, you need to compile lumina-cli manually.
cargo install lumina-cli --lockedRun the node
lumina node --network mochaInstall common dependencies
# install dependencies
sudo apt-get install -y build-essential curl git protobuf-compiler
# install rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# open a new terminal or run
source "$HOME/.cargo/env"
# clone the repository
git clone https://github.com/eigerco/lumina
cd lumina
# install lumina
cargo install --path cliTo build lumina-cli with support for serving wasm-node to browsers, currently
you need to compile wasm node manually. Follow these additional steps:
# install wasm-pack
cargo install wasm-pack
# compile lumina to wasm
wasm-pack build --target web node-wasm
# install lumina-cli
cargo install --path cli --features browser-node# run lumina node
lumina node --network mocha
# check out help for more configuration options
lumina node --help# serve lumina node on default localhost:9876
lumina browser
# check out help from more configuration options
lumina browser --helpFor security reasons, browsers only allow WebTransport to be used in Secure Context. When running Lumina in a browser make sure to access it either locally or over HTTPS.
Follow this guide to authorize yourself in github's container registry.
Starting a celestia network with single validator and bridge
docker compose -f ci/docker-compose.yml up --build --force-recreate -d
# and to stop it
docker compose -f ci/docker-compose.yml downNote: You can run more bridge nodes by uncommenting/copying the bridge service definition in
ci/docker-compose.yml.
To get a JWT token for a topped up account (coins will be transferred in block 2):
export CELESTIA_NODE_AUTH_TOKEN=$(docker compose -f ci/docker-compose.yml exec bridge-0 celestia bridge auth admin --p2p.network private)Accessing json RPC api with Go celestia cli:
celestia rpc blob Submit 0x0c204d39600fddd3 '"Hello world"' --print-requestExtracting blocks for test cases:
celestia rpc header GetByHeight 27 | jq .resultMake sure you have the celestia network running inside docker compose from the section above.
Generate authentication tokens
./tools/gen_auth_tokens.shRun tests
cargo test