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: Add support for the DAVerifier #138

Merged
merged 12 commits into from
Jul 26, 2023

Conversation

rach-id
Copy link
Member

@rach-id rach-id commented Mar 23, 2023

Overview

Closes #133

Depends on: #137 to be able to create the wrappers

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@rach-id rach-id self-assigned this Mar 23, 2023
@rach-id rach-id marked this pull request as draft March 24, 2023 09:05
@rach-id
Copy link
Member Author

rach-id commented Jun 20, 2023

@adlerjohn Does it make sense to revive this PR?
It provides a way to verify that shares were committed to in the QGB smart contract. It requires sending the data, which is not the mechanism we will use to prove inclusion for rollups, but I guess it might be good to also have the ability to verify the proofs generated inside the app in here

@rach-id rach-id marked this pull request as ready for review July 25, 2023 10:16
@rach-id
Copy link
Member Author

rach-id commented Jul 25, 2023

@adlerjohn @evan-forbes As part of the fraud proof mechanism that will be used, we will need to have this DAVerifier wrapper around the NMT and binary merkle tree proofs to verify the inclusion proofs correctly.
Thus, we can revive this PR again.

Makefile Show resolved Hide resolved
src/DAVerifier.sol Outdated Show resolved Hide resolved
@@ -65,7 +65,7 @@ jobs:

- name: Check Go wrapper match
run: |
if [ "$(git diff --ignore-space-at-eol wrappers/QuantumGravityBridge.sol/wrapper.go | wc -l)" -gt "0" ]; then
if [ "$(git diff --ignore-space-at-eol wrappers/QuantumGravityBridge.sol/wrapper.go wrappers/DAVerifier.sol/wrapper.go | wc -l)" -gt "0" ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Can this be done programmatically instead of hard-coding? E.g. by looping over CONTRACTS.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could definitely do that, but I am inclined towards having the makefile also format the sol files in that step, and check for the diff on the whole repo.

This way we would be able to also check if the sol files are not well formatted and ask the contributor to format them.

What do you think about doing this in a subsequent PR?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah sure, follow-up PR is fine

@rach-id rach-id merged commit 907f7bf into celestiaorg:master Jul 26, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create wrapper contract for NMT
2 participants