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

chore: export NewShareInclusionProofFromEDS #3460

Merged
merged 1 commit into from
May 14, 2024

Conversation

rach-id
Copy link
Member

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

Overview

Exports NewShareInclusionProofFromEDS so that I can use when generating the proofs in Celestia-node side.

@rach-id rach-id added the x/blobstream item is directly relevant to the blob module label May 10, 2024
@rach-id rach-id self-assigned this May 10, 2024
@rach-id rach-id requested a review from a team as a code owner May 10, 2024 13:00
@rach-id rach-id requested review from rootulp and ninabarbakadze and removed request for a team May 10, 2024 13:00
Copy link
Contributor

coderabbitai bot commented May 10, 2024

Walkthrough

Walkthrough

The modifications in the code primarily involve the enhancement of the proof.go file in the pkg/proof directory. The update includes the addition of a new import and the transformation of the NewShareInclusionProof function into NewShareInclusionProofFromEDS. This function now utilizes an extended data square to compute the NMT inclusion proof, focusing on specific share ranges and namespaces.

Changes

File Changes
.../proof/proof.go Added github.com/celestiaorg/rsmt2d import. Updated NewShareInclusionProof to NewShareInclusionProofFromEDS, enhancing functionality to use an extended data square (EDS).

Recent Review Details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits Files that changed from the base of the PR and between 171a547 and 53d6f8d.
Files selected for processing (1)
  • pkg/proof/proof.go (2 hunks)
Additional comments not posted (2)
pkg/proof/proof.go (2)

9-9: The addition of the rsmt2d import is appropriate for the new functionality introduced in NewShareInclusionProofFromEDS.


75-87: The function NewShareInclusionProofFromEDS has been correctly updated to handle an ExtendedDataSquare. Ensure that all calls to this function are updated to pass the correct type.

Verification successful

The verification process has confirmed that the function NewShareInclusionProofFromEDS is called with the correct parameter type *rsmt2d.ExtendedDataSquare. The function call within pkg/proof/proof.go uses eds as the first argument, which is of the type *rsmt2d.ExtendedDataSquare, as required.

  • Location of the verified call: pkg/proof/proof.go
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all function calls to `NewShareInclusionProofFromEDS` pass an `ExtendedDataSquare`.

# Test: Search for the function usage. Expect: Only occurrences of the new signature.
rg --type go $'NewShareInclusionProofFromEDS'

Length of output: 267



Script:

#!/bin/bash
# Description: Extract the specific line where `NewShareInclusionProofFromEDS` is called to verify the parameter types.

# Test: Use `rg` to find the line with the function call and include a few lines of context for clarity.
rg --type go -C 3 'NewShareInclusionProofFromEDS' pkg/proof/proof.go

Length of output: 530


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:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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.

@celestia-bot celestia-bot requested a review from a team May 10, 2024 13:01
@rach-id rach-id added the backport:v1.x PR will be backported automatically to the v1.x branch upon merging label May 10, 2024
@rach-id rach-id removed the backport:v1.x PR will be backported automatically to the v1.x branch upon merging label May 10, 2024
rach-id added a commit that referenced this pull request May 10, 2024
<!--
Please read and fill out this form before submitting your PR.

Please make sure you have reviewed our contributors guide before
submitting your
first PR.
-->

## Overview

Manually backports #3460
to v1.x because there were so many diffs between the two branches.
@rach-id rach-id merged commit ce2c099 into main May 14, 2024
35 checks passed
@rach-id rach-id deleted the export-NewShareInclusion-Proof branch May 14, 2024 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x/blobstream item is directly relevant to the blob module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants