Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/celestia da client #44

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open

Feat/celestia da client #44

wants to merge 23 commits into from

Conversation

heemankv
Copy link
Contributor

TL;DR : This PR includes code for utilising Celestia as a DA client || Resolves Issue #43.

celestia-node - Steps :

  1. Run celestia-node, preferred impl here.
  2. Ensure to safely note down the account information provided to use later on.
  3. Ensure to manually fund the account, see here.
  4. Ensure that the account is detected by celestia-node, see here.

Shortcut method to run Celestia as DA :

  • define $NETWORK, $RPC_URL, $NODE_TYPE, see here.
  • skips Auth, setup from here.
  • exposes 26658 for RPC communication, binds it to 8000 of host.
docker run --expose 26658 -p 8000:26658 -e NODE_TYPE=$NODE_TYPE -e P2P_NETWORK=$NETWORK -v $HOME/Work/Karnot/docker-celestia-node:/home/celestia ghcr.io/celestiaorg/celestia-node:v0.14.0 celestia light start --core.ip $RPC_URL --p2p.network $NETWORK --rpc.port 26658 --rpc.addr 0.0.0.0 --rpc.skip-auth
  • [only for testnet/devnet] Then copy paste all files from .celestia-light-<network_type>/keys to .celestia-light/keys, check if account is getting detected, see here.

Insomnia Json for RPC calls

Celestia Da Client :

Implements 4 methods from Da_Client_Interface.

  • publish_state_diff : converts state_diff to blobs and publishes them to celestia, waits for height_id, sends height_id back as external_id. Uses blob.Submit.

    • Currently Fire and Forget implementation, we assume that Celestia will get it's blob validated on L1 automatically.
  • verify_inclusion : picks up external_id and converts it to height_id, fetches inclusion status. Uses blob.GetAll.

    • Currently uses blob.GetAll since it doesn't need Commitment id.
  • max_blob_per_txn : returns predefined value for max blobs to use per transaction. Defaults to 1, No Docs found.

  • max_bytes_per_blob : returns predefined value for max bytes in a blob. Uses 1974272.

Tests :

Current Status :

  • Ignored, because of manual intervention.
  • verify_inclusion fails with un-synced Blocks. stuck at 1507551.
  • rest all works as expected.
Screenshot 2024-07-19 at 9 24 23 AM

@heemankv heemankv added the enhancement New feature or request label Jul 19, 2024
@heemankv heemankv self-assigned this Jul 19, 2024
@heemankv heemankv linked an issue Jul 19, 2024 that may be closed by this pull request
@heemankv
Copy link
Contributor Author

Should we not have a Result<String,Error> as return value of publish_state_diff function, to let the worker know that the blob Submit call has failed ?
@apoorvsadana
Screenshot 2024-07-19 at 12 23 14 PM

crates/da-clients/celestia/src/config.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/config.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
@heemankv heemankv force-pushed the feat/celestia-da-client branch 2 times, most recently from 21de5fb to 4ae07a0 Compare July 20, 2024 06:48
@heemankv heemankv linked an issue Jul 20, 2024 that may be closed by this pull request
.env.example Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
crates/da-clients/celestia/src/lib.rs Outdated Show resolved Hide resolved
@heemankv heemankv added the deferred This PR is ready but should not be merged at the current time, contact manager to know more. label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deferred This PR is ready but should not be merged at the current time, contact manager to know more. enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: celestia blob integration
2 participants