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

TODO Verkle Trie Proof #66

Open
3 of 23 tasks
ControlCplusControlV opened this issue Dec 24, 2022 · 0 comments
Open
3 of 23 tasks

TODO Verkle Trie Proof #66

ControlCplusControlV opened this issue Dec 24, 2022 · 0 comments

Comments

@ControlCplusControlV
Copy link
Contributor

ControlCplusControlV commented Dec 24, 2022

proof.rs

  • - We use the IO Result while we do not have a dedicated Error enum
  • - We could probably not use ExtPresent and use KeyState directly, need to check if this is fine with the Verifier algorithm, Note KeyState holds more information
  • - Check the commitments are in the correct subgroup possibly will be done with Decaf
  • - remove need for this Clone, by splitting off the IPA proof object, here and sending the rest of the struct to create_verifier_queries

opening_data.rs

  • - get_branch_child should use a range query
  • - storage.get_leaf(leaf_key) should use a range query

verifier.rs

  • - create_verifier_queries Document this better and refactor
  • - Check if this stem already has an extension proof this was taken from python, redo It's left here for compatibility, but it might not be needed
  • - Remove panic!, return error instead when we change the func signature to return Result instead of bool
  • - We may need to rewrite the prover/verifier algorithm to fix this if statement properly. This is a special case. If the depth == 1 and the there is no stem to prove the proof of absence then this means that the path should point to the root node. Fix in python codebase and check for this in go code

state_updater.rs

  • - Fix all panics and return Results instead
  • - This needs to be modified more, ie to return a correct error variant and to refactor panics into error variants
  • - Replace Clone with references if possible
  • - Remove this TODO
  • - Check root against the root in commitments by path
  • - Prefix can be &'a [u8] instead of Vec which avoids unnecessary allocations... This may be unneeded when we switch to SmallVec32
  • - abstract this into a function, since it's duplicated (for (suffix, (old_value, new_value)) in suffix_update)
  • - We could take this for loop out of the if statement and then use the if statement for the rest
  • - we could take this for loop out of the if statement and then use the if statement for the rest
  • - let stem_comm_0 = Fr::one(); // TODO: We can get rid of this and just add SRS[0]
  • - We can rewrite build_subtree to place the node commitments in the tree and then recursively sweep up the tree, updating each node using commit_sparse
  • - Removed this TODO
  • - Check if there is a similar method in itertools for seeing if an iter has has_unique_elements
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

No branches or pull requests

1 participant