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

api: Make the api consistent #59

Open
evan-forbes opened this issue May 30, 2022 · 1 comment
Open

api: Make the api consistent #59

evan-forbes opened this issue May 30, 2022 · 1 comment
Labels

Comments

@evan-forbes
Copy link
Member

evan-forbes commented May 30, 2022

When we push data to the tree, we are using prefixed data, but when we verify proofs, we are using non-prefixed data. Whatever the API ends up being, we should probably make it consistent.

This also applies to creating and verifying proofs. When creating proofs, we have two different functions, one for creating a ranged proof, and another for creating a proof to a single leaf. When verifying proofs, we are only using a single function to verify proofs of a single leaf or a range of leaves. Whatever we choose, we should probably make this consistent as well.

relevant comment #58 (comment)

related to #55

@evan-forbes evan-forbes changed the title Make the api consistent api: Make the api consistent May 30, 2022
@staheri14
Copy link
Contributor

staheri14 commented May 8, 2023

When we push data to the tree, we are using prefixed data, but when we verify proofs, we are using non-prefixed data. Whatever the API ends up being, we should probably make it consistent.

A quick note on this point: in the current state of the nmt, the VerifyNamespace accepts namespaced leaves (which is consistent with the Push in terms of accepting namespaced data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants