Skip to content

docs: apply community feedback on Blobstream proof queries#1556

Merged
rach-id merged 4 commits intomainfrom
better-proofs-docs
May 1, 2024
Merged

docs: apply community feedback on Blobstream proof queries#1556
rach-id merged 4 commits intomainfrom
better-proofs-docs

Conversation

@rach-id
Copy link
Copy Markdown
Member

@rach-id rach-id commented May 1, 2024

Overview

Apply some community feedback on the blobstream proof queries docs

Summary by CodeRabbit

  • Documentation
    • Enhanced HTTP query examples with details on querying data root inclusion proof.
    • Added a Golang query example and a full example for proving a Celestia block commitment.

@rach-id rach-id marked this pull request as draft May 1, 2024 16:21
@rach-id rach-id self-assigned this May 1, 2024
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented May 1, 2024

Walkthrough

This update enriches an HTTP query example for better understanding, incorporating details on querying data root inclusion proof alongside a JSON response example. It also introduces a Golang query illustration and a comprehensive method to validate a Celestia block commitment using the Blobstream X contract.

Changes

File Path Change Summary
developers/.../blobstream-proof-queries.md Enhanced HTTP query example, added Golang query illustration, and included a method to prove Celestia block commitment.

Poem

🐇✨
In the realm of code and stream,
A bunny hopped, chasing a dream.
With queries bold, in Golang told,
Proving blocks in the fold, oh what a gleam!
🌟📜


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 6a387ed and 11b8948.
Files selected for processing (1)
  • developers/blobstream-proof-queries.md (23 hunks)
Additional Context Used
LanguageTool (144)
developers/blobstream-proof-queries.md (144)

Near line 5: Possible spelling mistake found.
Context: ...lusion proofs used in Blobstream --- # Blobstream proofs queries <!-- markdownlint-disab...


Near line 11: Possible spelling mistake found.
Context: ...10 --> ## Prerequisites - Access to a Celestia [full consensus node](../nodes/full-con...


Near line 15: Possible spelling mistake found.
Context: ...be queried. A full node is enough. For golang snippets, the tendermint RPC client, re...


Near line 15: Possible spelling mistake found.
Context: ...de is enough. For golang snippets, the tendermint RPC client, referred to as trpc, will...


Near line 15: Possible spelling mistake found.
Context: ...e tendermint RPC client, referred to as trpc, will be used for the queries. It can ...


Near line 35: Possible spelling mistake found.
Context: ...<rpc_endpoint> can be retrieved from mainnet for Celestia mai...


Near line 35: Possible spelling mistake found.
Context: ...rom mainnet for Celestia mainnet beta, and [mocha](../nodes/moch...


Near line 36: Possible spelling mistake found.
Context: ...net](../nodes/mainnet.md) for Celestia mainnet beta, and [mocha](../nodes/mocha-testne...


Near line 36: Possible spelling mistake found.
Context: ..../nodes/mocha-testnet.md) for the Mocha testnet. In case the reader wants to interact ...


Near line 39: Possible spelling mistake found.
Context: ... used to verify that data was posted to Celestia, the bindings of that contract are need...


Near line 41: Possible spelling mistake found.
Context: ...ntract are needed. For Blobstream, the golang bindings can be found in the [Blobstrea...


Near line 41: Possible spelling mistake found.
Context: ...he golang bindings can be found in the [Blobstream X](https://github.com/succinctlabs/blob...


Near line 43: Possible spelling mistake found.
Context: ...bindings should be generated. Refer to [abigen](https://geth.ethereum.org/docs/tools/a...


Near line 48: Possible spelling mistake found.
Context: ...roof queries To prove the inclusion of PayForBlobs (PFB) transactions, blobs or shares, co...


Near line 49: Possible spelling mistake found.
Context: ...ons, blobs or shares, committed to in a Celestia block, we use the Celestia consensus no...


Near line 49: Possible spelling mistake found.
Context: ...tted to in a Celestia block, we use the Celestia consensus node's RPC to query for proof...


Near line 50: Possible spelling mistake found.
Context: ...ry for proofs that can be verified in a rollup settlement contract via Blobstream. In ...


Near line 50: Possible spelling mistake found.
Context: ...ied in a rollup settlement contract via Blobstream. In fact, when a PFB transaction is inc...


Near line 53: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...wo are split into shares, which are the low level constructs of a Celestia block, and sav...


Near line 54: Possible spelling mistake found.
Context: ...which are the low level constructs of a Celestia block, and saved to the corresponding C...


Near line 54: Possible spelling mistake found.
Context: ...a block, and saved to the corresponding Celestia block. Learn more about shares in the [...


Near line 59: Possible spelling mistake found.
Context: ...ain a PFB transaction, or a part of the rollup data that was posted using a PFB, is co...


Near line 60: Possible spelling mistake found.
Context: ... posted using a PFB, is committed to in Blobstream. The share is highlighted in green. `R...


Near line 62: In American English, abbreviations like “etc.” require a period.
Context: ...are is highlighted in green. R0, R1 etc, represent the respective row and colum...


Near line 70: Possible spelling mistake found.
Context: ...-coding) portion of the specs. ### The Celestia square ![Square](/img/blobstream/blobs...


Near line 78: Possible spelling mistake found.
Context: ... So to prove inclusion of a share to a Celestia block, we use Blobstream as a source of...


Near line 79: Possible spelling mistake found.
Context: ... truth. Currently, we will be using the Blobstream X implementation of Blobstream, more i...


Near line 80: Possible spelling mistake found.
Context: ...ing the Blobstream X implementation of Blobstream, more information on Blobstream X can b...


Near line 80: Possible spelling mistake found.
Context: ...ion of Blobstream, more information on Blobstream X can be found in [the overview](./blob...


Near line 81: Possible spelling mistake found.
Context: ...obstream X can be found in the overview. In a nutshell, Blobstream X attests t...


Near line 82: Possible spelling mistake found.
Context: ...bstream X attests to the data posted to Celestia in the Blobstream X contract via verify...


Near line 82: Possible spelling mistake found.
Context: ...s to the data posted to Celestia in the Blobstream X contract via verifying a zk-proof of ...


Near line 83: Possible spelling mistake found.
Context: ...e Blobstream X contract via verifying a zk-proof of the headers of a batch of Celestia b...


Near line 83: Possible spelling mistake found.
Context: ...a zk-proof of the headers of a batch of Celestia blocks. Then, it keeps reference of tha...


Near line 84: Possible spelling mistake found.
Context: ...rence of that batch of blocks using the merkleized commitment of their `(dataRoot, height)...


Near line 85: Possible spelling mistake found.
Context: ...sing the merkleized commitment of their (dataRoot, height) resulting in a `data root tup...


Near line 88: Possible spelling mistake found.
Context: ...at when unified, contain the PFB or the rollup data blob. - 1: the row and column ro...


Near line 90: Possible spelling mistake found.
Context: ... row and column roots are the namespace merkle tree roots over the shares. More info...


Near line 92: Possible typo: you repeated a whitespace
Context: ...espace%20merkle#namespace-merkle-tree). These commit to the rows and columns con...


Near line 94: Possible spelling mistake found.
Context: ...2: the data roots: which are the binary merkle tree commitment over the row and colu...


Near line 96: Possible spelling mistake found.
Context: ...e is part of a row, using a namespace merkle proof. Then prove that this row is co...


Near line 99: Consider a shorter alternative to avoid wordiness.
Context: ...lished to the corresponding block. - 3: in order to batch multiple blocks into the same com...


Near line 100: Possible spelling mistake found.
Context: ...ment, we create a commitment over the (dataRoot, height) tuple for a batch of blocks, ...


Near line 102: Possible spelling mistake found.
Context: ...is commitment that gets stored in the Blobstream X smart contract. So, if we're able to...


Near line 106: Possible spelling mistake found.
Context: ...oot tuple root, which gets saved to the Blobstream X contract, we can be sure that that sh...


Near line 108: Possible spelling mistake found.
Context: ...e was committed to in the corresponding Celestia block. In this document, we will provi...


Near line 111: Possible spelling mistake found.
Context: ..., and how to adapt them to be sent to a rollup contract for verification. ## Hands-on...


Near line 117: Possible spelling mistake found.
Context: ...ries ready to be consumed by the target rollup contract. :::tip NOTE For the go clien...


Near line 144: Possible spelling mistake found.
Context: ...ve the data root is committed to by the Blobstream X smart contract, we will need to provi...


Near line 145: Possible spelling mistake found.
Context: ...art contract, we will need to provide a Merkle proof of the data root tuple to a data ...


Near line 152: Possible spelling mistake found.
Context: ...end block, then it generates the binary Merkle proof of the DataRootTuple, correspon...


Near line 153: Possible spelling mistake found.
Context: ...enerates the binary Merkle proof of the DataRootTuple, corresponding to that height, to th...


Near line 154: Possible spelling mistake found.
Context: ... corresponding to that height, to the DataRootTupleRoot which is committed to in the Blobstrea...


Near line 154: Possible spelling mistake found.
Context: ...TupleRoot` which is committed to in the Blobstream X contract. #### HTTP query Example H...


Near line 161: Unpaired symbol: ‘]’ seems to be missing
Context: ...he data commitment defined by the range [10, 20). Example response: <div style...


Near line 194: Possible spelling mistake found.
Context: ... endpoint can also be queried using the golang client: <div style="overflow-y: auto; ...


Near line 232: Possible spelling mistake found.
Context: ...--> ### Full example of proving that a Celestia block was committed to by Blobstream X ...


Near line 232: Possible spelling mistake found.
Context: ...at a Celestia block was committed to by Blobstream X contract <div style="overflow-y: aut...


Near line 408: Possible spelling mistake found.
Context: ...action inclusion proof To prove that a rollup transaction is part of the data root, w...


Near line 409: Possible spelling mistake found.
Context: ... to provide two proofs: (1) a namespace Merkle proof of the transaction to a row root....


Near line 411: Possible spelling mistake found.
Context: ...ction to the row root using a namespace Merkle proof. (2) And a binary Merkle proof of...


Near line 412: Possible spelling mistake found.
Context: ...amespace Merkle proof. (2) And a binary Merkle proof of the row root to the data root....


Near line 512: Possible spelling mistake found.
Context: ...rmation. #### Golang client Using the golang client: ```go txHash, err := hex.D...


Near line 525: Add a space between sentences.
Context: ...... } ``` Then, the proof is under tx.Proof. ### Blob inclusion proof using the c...


Near line 530: Possible spelling mistake found.
Context: ...saction hash is possible only using the golang client. Otherwise, the corresponding s...


Near line 531: Possible spelling mistake found.
Context: ...ng share range is required so that the [ProveShares](#specific-share-range-inclusion-proof...


Near line 536: Possible spelling mistake found.
Context: ...be used. #### Golang client Using the golang client: <div style="overflow-y: auto; ...


Near line 580: This sentence does not start with an uppercase letter.
Context: ... != nil { return err } } ``` with the <transaction_hash> being the tran...


Near line 581: The comma may be misplaced. Try moving it before ‘and’, or removing it altogether.
Context: ...tion hash of the PFB containing the blob and, the <blob_index> being the index of t...


Near line 582: Possible spelling mistake found.
Context: ... being the index of the blob. In fact, [PayForBlob](https://github.com/celestiaorg/celesti...


Near line 589: Possible spelling mistake found.
Context: ...m the share range is already known, the [ProveShares](https://github.com/celestiaorg/celest...


Near line 599: Possible spelling mistake found.
Context: ... the shares to the row roots - A binary Merkle proof of the row root to the data root ...


Near line 610: Unpaired symbol: ‘]’ seems to be missing
Context: ...e=1 Which queries the proof of shares[0,1)in block15`. Example response: ...


Near line 665: Possible spelling mistake found.
Context: ... The endpoint can be queried using the golang client: ```go sharesProof, err := trp...


Near line 674: Possible spelling mistake found.
Context: ...nverting the proofs to be usable in the DAVerifier library Smart contracts that use the ...


Near line 676: Possible spelling mistake found.
Context: ...library Smart contracts that use theDAVerifier` library take the following proof forma...


Near line 716: Possible spelling mistake found.
Context: ...lint-enable MD013 --> To construct the SharesProof, we will adapt the queried response ab...


Near line 720: Possible spelling mistake found.
Context: ...s the raw shares that were submitted to Celestia in the bytes format. If we take the e...


Near line 721: Possible spelling mistake found.
Context: ... example blob that was submitted in the [RollupInclusionProofs.t.sol](https://github.com/celestiaorg/...


Near line 739: Possible spelling mistake found.
Context: ...on-inclusion-proof) section. While the NamespaceMerkleMultiproof being: ```solidity /// @notice Namesp...


Near line 753: Possible spelling mistake found.
Context: ...eNodes; } ``` So, we can construct the NamespaceMerkleMultiproof with the following mapping: - `beginK...


Near line 759: Possible spelling mistake found.
Context: ...** nodes in the query response - The NamespaceNode, which is the type of the sideNodes,...


Near line 759: Possible spelling mistake found.
Context: ...amespaceNode, which is the type of the sideNodes`, is defined as follows: ```solidity...


Near line 774: Possible spelling mistake found.
Context: ...tes32 digest; } ``` So, we construct a NamespaceNode via taking the values from the `nodes`...


Near line 801: Possible spelling mistake found.
Context: ...mple of doing this can be found in the [RollupInclusionProofs.t.sol](https://github.com/celestiaorg/b...


Near line 804: Possible spelling mistake found.
Context: ...clusionProofs.t.sol#L465-L477) test. A golang helper that can be used to make this co...


Near line 860: This sentence does not start with an uppercase letter.
Context: ...xNs, Digest: digest, } } ``` with proofs being `sharesProof.ShareProofs...


Near line 861: Add a space between sentences.
Context: ...t, } } ``` with proofs being `sharesProof.ShareProofs`. ### `namespace` Which is the namesp...


Near line 865: Possible spelling mistake found.
Context: ...ce` Which is the namespace used by the rollup when submitting data to Celestia. As de...


Near line 865: Possible spelling mistake found.
Context: ...d by the rollup when submitting data to Celestia. As described above, it can be construc...


Near line 886: Possible spelling mistake found.
Context: ...: id An example can be found in the [RollupInclusionProofs.t.sol](https://github.com/celestiaorg/b...


Near line 902: This sentence does not start with an uppercase letter.
Context: ...byte{version}, Id: id, } } ``` with namespace being `sharesProof.Namespac...


Near line 903: Add a space between sentences.
Context: ... id, } } ``` with namespace being `sharesProof.NamespaceID`. ### `rowRoots` Which are the roots ...


Near line 907: Possible spelling mistake found.
Context: ...he rows where the shares containing the Rollup data are localized. In golang, the pro...


Near line 910: Possible spelling mistake found.
Context: ...ning the Rollup data are localized. In golang, the proof can be converted as follows:...


Near line 921: This sentence does not start with an uppercase letter.
Context: ...oot.Bytes()) } return rowRoots } ``` with roots being `sharesProof.RowProof.Row...


Near line 922: Add a space between sentences.
Context: ...turn rowRoots } ``` with roots being `sharesProof.RowProof.RowRoots`. ### `rowProofs` These are ...


Near line 926: Possible spelling mistake found.
Context: ...rows to the data root. They are of type BinaryMerkleProof: ```solidity /// @notice Merkle Tree ...


Near line 947: Possible spelling mistake found.
Context: ... in the query response The type of the sideNodes is a bytes32. An example can be fou...


Near line 950: Possible spelling mistake found.
Context: ...es32`. An example can be found in the [RollupInclusionProofs.t.sol](https://github.com/celestiaorg/b...


Near line 953: Possible spelling mistake found.
Context: ...clusionProofs.t.sol#L479-L484) test. A golang helper to convert the row proofs is as ...


Near line 977: This sentence does not start with an uppercase letter.
Context: ... } } return rowProofs } ``` with proofs being `sharesProof.RowProof.Pr...


Near line 978: Add a space between sentences.
Context: ...roofs } ``` with proofs being `sharesProof.RowProof.Proofs`. ### `attestationProof` This ...


Near line 982: Please check whether ‘route’ (an established line of travel) might be the correct word here instead of ‘root’ (underground organ of a plant).
Context: ...onProof` This is the proof of the data root to the data root tuple root, which is c...


Near line 983: Possible spelling mistake found.
Context: ...uple root, which is committed to in the Blobstream X contract: ```solidity /// @notice Co...


Near line 998: Loose punctuation mark.
Context: ...leProof proof; } ``` - tupleRootNonce: the nonce at which Blobstream X committ...


Near line 998: Possible spelling mistake found.
Context: ... - tupleRootNonce: the nonce at which Blobstream X committed to the batch containing t...


Near line 1000: Loose punctuation mark.
Context: ...the block containing the data. - tuple: the DataRootTuple of the block: ```s...


Near line 1000: Possible spelling mistake found.
Context: ...ock containing the data. - tuple: the DataRootTuple of the block: ```solidity /// @notice...


Near line 1016: This sentence does not start with an uppercase letter.
Context: ...Data root. bytes32 dataRoot; } ``` which comprises a dataRoot, i.e. the block ...


Near line 1017: Possible spelling mistake found.
Context: ...es32 dataRoot; } ``` which comprises a dataRoot, i.e. the block containing the Rollup ...


Near line 1017: Possible spelling mistake found.
Context: ...ataRoot, i.e. the block containing the Rollup data data root, and the height` which ...


Near line 1017: Possible typo: you repeated a word
Context: ..., i.e. the block containing the Rollup data data root, and the heightwhich is thehe...


Near line 1020: Loose punctuation mark.
Context: ...s the height of that block. - proof: the BinaryMerkleProof of the data roo...


Near line 1020: Possible spelling mistake found.
Context: ...height of that block. - proof: the BinaryMerkleProof of the data root tuple to the data roo...


Near line 1021: Possible typo: you repeated a whitespace
Context: ...ot tuple to the data root tuple root. Constructing it is similar to constructi...


Near line 1023: Possible spelling mistake found.
Context: ... row roots to data root proof in the rowProofs section. An example can b...


Near line 1026: Possible spelling mistake found.
Context: ...ction. An example can be found in the [RollupInclusionProofs.t.sol](https://github.com/celestiaorg/b...


Near line 1029: Possible spelling mistake found.
Context: ...lupInclusionProofs.t.sol#L488) test. A golang helper to create an attestation proof: ...


Near line 1063: Possible spelling mistake found.
Context: ...ion nonce, which can be retrieved using BlobstreamX contract events. Check below for an ex...


Near line 1064: Possible spelling mistake found.
Context: ... for an example. And height being the Celestia Block height that contains the rollup d...


Near line 1065: Possible spelling mistake found.
Context: ...Celestia Block height that contains the rollup data, along with the blockDataRoot be...


Near line 1065: Possible spelling mistake found.
Context: ...ontains the rollup data, along with the blockDataRoot being the data root of the block heigh...


Near line 1066: Possible spelling mistake found.
Context: ...data root of the block height. Finally, dataRootInclusionProof is the Celestia block data root inclus...


Near line 1066: Possible spelling mistake found.
Context: ...inally, dataRootInclusionProof is the Celestia block data root inclusion proof to the ...


Near line 1070: Possible spelling mistake found.
Context: ... at the beginning of this page. If the dataRoot or the tupleRootNonce is unknown dur...


Near line 1070: Possible spelling mistake found.
Context: ...of this page. If the dataRoot or the tupleRootNonce is unknown during the verification: -...


Near line 1072: Loose punctuation mark.
Context: ...n during the verification: - dataRoot: can be queried using the `/block?height...


Near line 1075: Loose punctuation mark.
Context: ...ld from the response. - tupleRootNonce: can be retried via querying the `Blob...


Near line 1075: Possible spelling mistake found.
Context: ...Nonce: can be retried via querying the BlobstreamXDataCommitmentStored` events from the BlobstreamX contract...


Near line 1076: Possible spelling mistake found.
Context: ...mXDataCommitmentStored` events from the BlobstreamX contract and looking for the nonce at...


Near line 1148: Possible spelling mistake found.
Context: ...data commitments For listening for new BlobstreamXDataCommitmentStored events, sequencers can use the `WatchD...


Near line 1149: Possible spelling mistake found.
Context: ...tStoredevents, sequencers can use theWatchDataCommitmentStored` as follows: <div style="overflow-y: a...


Near line 1198: Possible spelling mistake found.
Context: ...ed in the received events. ### Example rollup that uses the DAVerifier An example ro...


Near line 1198: Possible spelling mistake found.
Context: ...ents. ### Example rollup that uses the DAVerifier An example rollup that uses the DAVeri...


Near line 1200: Possible spelling mistake found.
Context: ...up that uses the DAVerifier An example rollup that uses the DAVerifier can be as simp...


Near line 1200: Possible spelling mistake found.
Context: ...rifier An example rollup that uses the DAVerifier can be as simple as: <!-- markdownlint...


Near line 1230: Possible spelling mistake found.
Context: ...n, you can submit the fraud proof using golang as follows: <div style="overflow-y: au...


Near line 1469: Possible spelling mistake found.
Context: ...`` For the step (2), check the [rollup inclusion proofs documentation](https:/...


Near line 1473: Possible spelling mistake found.
Context: ...the above proof queries, checkout the [blobstreamx-example](https://github.com/CryptoKass/blobstre...


Near line 1480: Possible spelling mistake found.
Context: ...y inclusion proof of the transaction to Celestia data root 2. Prove that the data root t...


Near line 1481: Possible spelling mistake found.
Context: ... data root tuple is committed to by the Blobstream X smart contract We can be sure tha...


Near line 1484: Possible spelling mistake found.
Context: ... be sure that the data was published to Celestia, and then rollups can proceed with thei...


Near line 1484: Possible spelling mistake found.
Context: ...ata was published to Celestia, and then rollups can proceed with their normal fraud pro...

Additional comments not posted (2)
developers/blobstream-proof-queries.md (2)

35-36: The documentation references to other markdown files (mainnet and mocha-testnet) are correctly linked. Ensure these files are up-to-date and accessible to avoid broken links in the documentation.

Verification successful

The shell script execution confirms that both mainnet.md and mocha-testnet.md files exist in the nodes directory, as referenced in the documentation. This verification aligns with the review comment's concern about ensuring the existence and accessibility of these files to avoid broken links in the documentation.

Since the files are confirmed to exist, there are no issues regarding broken links due to missing files. However, the review comment also suggests ensuring that these files are "up-to-date," which is not something that can be verified through the current script or without additional context about what constitutes being "up-to-date."

Given the information available and the results from the script execution, the existence and accessibility part of the verification is successful.


Files confirmed to exist and are accessible:

  • nodes/mainnet.md
  • nodes/mocha-testnet.md
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify the existence and accessibility of linked markdown files.

# Check for 'mainnet.md'
if ! [ -f "nodes/mainnet.md" ]; then
  echo "Missing 'mainnet.md' file."
else
  echo "'mainnet.md' exists."
fi

# Check for 'mocha-testnet.md'
if ! [ -f "nodes/mocha-testnet.md" ]; then
  echo "Missing 'mocha-testnet.md' file."
else
  echo "'mocha-testnet.md' exists."
fi

Length of output: 191


41-44: The external link to the Blobstream X Golang bindings is provided, which is helpful. However, ensure that this repository is maintained and the link does not lead to a 404 page in the future, which could frustrate users.

Verification successful

The verification script has confirmed that the link to the Blobstream X Golang bindings is currently accessible and does not lead to a 404 page. This addresses the concern raised in the review comment about the potential unavailability of the repository in the future.

Conclusion:

  • The link to the Blobstream X Golang bindings is verified to be accessible as of now.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Check if the GitHub repository for Blobstream X is accessible.

if curl --head --silent --fail "https://github.com/succinctlabs/blobstreamx/blob/main/bindings/BlobstreamX.go" 2>&1 | grep -q "404 Not Found"; then
  echo "The link to Blobstream X bindings leads to a 404 page."
else
  echo "The Blobstream X bindings link is accessible."
fi

Length of output: 234


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented May 1, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-05-01 18:30 UTC

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Out of diff range and nitpick comments (3)
developers/blobstream-proof-queries.md (3)

Line range hint 5-5: Possible spelling mistake in the description.

Consider revising "inclusion proofs used in Blobstream" to "inclusion proofs used with Blobstream" for better clarity.


Line range hint 22-22: Consider using a hyphen for compound adjectives.

- low level constructs
+ low-level constructs

Line range hint 31-31: In American English, abbreviations like "etc." require a period.

- R0, R1 etc
+ R0, R1 etc.

@rach-id rach-id marked this pull request as ready for review May 1, 2024 18:14
@rach-id rach-id requested a review from jcstein May 1, 2024 18:14
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Out of diff range and nitpick comments (2)
developers/blobstream-proof-queries.md (2)

158-162: The HTTP query example is clear and demonstrates how to use the endpoint effectively. However, consider adding a note about potential errors or common issues that might arise when using this endpoint to better prepare developers.

Consider adding error handling examples or common pitfalls in using the data_root_inclusion_proof endpoint to enhance the documentation's utility.


Line range hint 234-402: The full example provided for proving a Celestia block commitment is comprehensive and includes good error handling and resource management practices. However, ensure that the ethClient.Close() and eventsIterator.Close() calls are handled even if an error occurs earlier in the function.

func verify() error {
	ctx := context.Background()
	ethClient, err := ethclient.Dial("evm_rpc_endpoint")
	if err != nil {
		return err
	}
	defer ethClient.Close()

	// Existing code...

	if event == nil {
		return fmt.Errorf("couldn't find range containing the transaction height")
	}

	// Existing code...
}

Comment thread developers/blobstream-proof-queries.md
Comment thread developers/blobstream-proof-queries.md
@rach-id rach-id merged commit b518e7e into main May 1, 2024
@rach-id rach-id deleted the better-proofs-docs branch May 1, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

2 participants