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: validate posted data to celestia using inclusion proofs #527 #589

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

Conversation

srene
Copy link
Contributor

@srene srene commented Feb 22, 2024

Description

  • PR that adds validation capabilities of batches submitted to celestia for fraud proving.
  • The code includes validation of celestia inclusion proofs and non-inclusion proofs
  • Two new messages are created for non-available batches in celesta or batches committed by the sequencer with mismatching information (wrong commitment)
  • It supports submission of inclusion/non-inclusion proofs for batches submitted by the sequencer using cli and inclusion proofs stored in a json file.

Closes #527

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow-up issues.

PR review checkboxes:

I have...

  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Targeted PR against the correct branch
  • included the correct type prefix in the PR title
  • Linked to the GitHub issue with discussion and accepted design
  • Targets only one GitHub issue
  • Wrote unit and integration tests
  • Wrote relevant migration scripts if necessary
  • All CI checks have passed
  • Added relevant godoc comments

SDK Checklist

  • Import/Export Genesis
  • Registered Invariants
  • Registered Events
  • Updated openapi.yaml
  • No usage of go map
  • No usage of time.Now()
  • Used fixed point arithmetic and not float arithmetic
  • Avoid panicking in Begin/End block as much as possible
  • No unexpected math Overflow
  • Used sendCoin and not SendCoins
  • Out-of-block compute is bounded
  • No serialized ID at the end of store keys

Full security checklist here

For Reviewer:

  • Confirmed the correct type prefix in the PR title
  • Reviewers assigned
  • Confirmed all author checklist items have been addressed

---;

After reviewer approval:

  • In case the PR targets the main branch, PR should not be squash merge in order to keep meaningful git history.
  • In case the PR targets a release branch, PR must be rebased.

@srene srene self-assigned this Feb 22, 2024
@srene srene requested a review from a team as a code owner February 22, 2024 08:47
@srene srene linked an issue Feb 22, 2024 that may be closed by this pull request
@srene srene marked this pull request as draft February 22, 2024 08:47
@srene srene force-pushed the srene/527-validate-fraud-proof-data-against-celestia branch from 8f3553a to dc42454 Compare February 22, 2024 09:13
Copy link

codecov bot commented Feb 22, 2024

Codecov Report

Attention: Patch coverage is 15.08845% with 1632 lines in your changes are missing coverage. Please review.

Project coverage is 29.83%. Comparing base (4168eb0) to head (39c22ac).
Report is 128 commits behind head on main.

Files Patch % Lines
x/rollapp/types/tx.pb.go 7.85% 1379 Missing and 28 partials ⚠️
x/rollapp/client/cli/tx_submit_nonavailable.go 0.00% 36 Missing ⚠️
x/rollapp/client/cli/tx_submit_wrongcommitment.go 0.00% 36 Missing ⚠️
x/rollapp/types/message_nonavailable_batch.go 38.29% 26 Missing and 3 partials ⚠️
app/dainclusionproofs/inclusion.go 57.89% 16 Missing and 8 partials ⚠️
x/rollapp/types/message_wrongcommitment_batch.go 48.93% 23 Missing and 1 partial ⚠️
x/rollapp/keeper/wrongcommitmentbatch.go 46.42% 10 Missing and 5 partials ⚠️
...rollapp/keeper/msg_server_wrongcommitment_batch.go 44.00% 10 Missing and 4 partials ⚠️
x/rollapp/types/dapath.go 67.50% 10 Missing and 3 partials ⚠️
x/rollapp/keeper/msg_server_nonavailable_batch.go 56.00% 8 Missing and 3 partials ⚠️
... and 4 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #589      +/-   ##
==========================================
- Coverage   30.78%   29.83%   -0.95%     
==========================================
  Files         201      212      +11     
  Lines       28491    30252    +1761     
==========================================
+ Hits         8770     9026     +256     
- Misses      18322    19791    +1469     
- Partials     1399     1435      +36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

Copy link

This pull request has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you!

@github-actions github-actions bot added Stale and removed Stale labels May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate fraud proof data against celestia
2 participants