jellyfish icon indicating copy to clipboard operation
jellyfish copied to clipboard

feat: add method to verify consistent precomputed data

Open akonring opened this issue 10 months ago • 1 comments

Description

This PR adds another method is_consistent_precompute to the Precompute trait interface. A client can use this method to verify that the precomputed data contains the same underlying commitment as the output of commit_only_precompute.

This is useful if a party (builder) is generating the precompute_data and commitment using commit_only_precompute and subsequently sends the precompute_data to a leader (disperser) and shares the commitment with the network. Instead of trusting the builder, the leader now merely checks (using is_consistent_precompute) that the precomputed_data agrees with the commitment before dispersing.

closes: #560


Before we can merge this PR, please make sure that all the following items have been checked off. If any of the checklist items are not applicable, please leave them but write a little note why.

  • [x] Targeted PR against correct branch (main)
  • [x] Linked to GitHub issue with discussion and accepted design OR have an explanation in the PR that describes this work.
  • [x] Wrote unit tests
  • [x] Re-reviewed Files changed in the GitHub PR explorer

akonring avatar Apr 19 '24 07:04 akonring

Thanks for the feedback. I've rebased on top of the (refactored) main. Let me know if more changes should be considered. Awaiting @nyospe response here: https://github.com/EspressoSystems/jellyfish/pull/561#discussion_r1572693686 before moving forward.

akonring avatar Apr 25 '24 07:04 akonring