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

updating verify proof range to handle empty proof keys #1901

Merged
merged 32 commits into from
Jun 28, 2024

Conversation

rianhughes
Copy link
Contributor

@rianhughes rianhughes commented Jun 7, 2024

This PR implements VerifyRangeProof.

It builds on an old PR (1873) which didn't handle empty proof keys, hence the name of this PR.

closes #1895
replaces / closes: #1873

Copy link

codecov bot commented Jun 7, 2024

Codecov Report

Attention: Patch coverage is 71.50538% with 106 lines in your changes missing coverage. Please review.

Project coverage is 75.51%. Comparing base (ad21b2e) to head (f3b20cd).

Files Patch % Lines
core/trie/proof.go 67.35% 31 Missing and 32 partials ⚠️
core/trie/trie.go 77.85% 16 Missing and 15 partials ⚠️
core/trie/node.go 69.23% 7 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1901      +/-   ##
==========================================
- Coverage   75.72%   75.51%   -0.21%     
==========================================
  Files          97       97              
  Lines        8337     8651     +314     
==========================================
+ Hits         6313     6533     +220     
- Misses       1487     1534      +47     
- Partials      537      584      +47     

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

@rianhughes rianhughes changed the base branch from main to rianhughes/proof-range June 7, 2024 17:04
@rianhughes rianhughes changed the base branch from rianhughes/proof-range to main June 7, 2024 17:05
@rianhughes rianhughes marked this pull request as ready for review June 12, 2024 07:57
@rianhughes rianhughes mentioned this pull request Jun 12, 2024
@rianhughes rianhughes force-pushed the rianhughes/proof-range-test branch 2 times, most recently from db9bf2c to 66e7d38 Compare June 12, 2024 08:25
@rianhughes rianhughes marked this pull request as draft June 12, 2024 08:40
@rianhughes rianhughes marked this pull request as ready for review June 12, 2024 09:16
@rianhughes rianhughes requested a review from kirugan June 12, 2024 09:17
core/trie/proof.go Outdated Show resolved Hide resolved
core/trie/proof.go Outdated Show resolved Hide resolved
@rianhughes rianhughes requested a review from pnowosie June 12, 2024 13:01
@rianhughes rianhughes requested a review from asdacap June 14, 2024 11:18
@rianhughes
Copy link
Contributor Author

@asdacap, @pnowosie in geth, the VerifyRangeProof executes the verification logic, but also logic to determine if there are more leaves to the right (see here). Imo it would be neater to separate these out into two different functions, hence why I didn't insert it in this implementation of VerifyRangeProof. What are your thoughts?

@asdacap
Copy link
Contributor

asdacap commented Jun 27, 2024

You can separate them internally if you want. But at high level, I think its easier to combine them, otherwise, need to pass the keys of proof explicitly, which is implementation details IMO.

Due security reasons, we had to stop using the dispatch token and
start using the GitHub App in order to trigger the deployment in
argo.  Because argo is a private repository, we can't trigger from
a public one (juno), so then we start to change the approach to first
push the docker images to jFrog Artifactory, then argo will be notified
that a new image was pushed, then it will trigger the deployment

Extra Tasks:
- Run YAML formatter on build-and-deploy workflow:
Having a well formated file makes it easier to read and for people
to contribute

- Remove unnecessary IMAGE_TAG from build-and-deploy.yml:
Instead of using both env.DOCKER_IMAGE_TAG and output.IMAGE_TAG, only
use one of them.

- Improve readability of stages in build-and-deploy.yml:
Rename stages to make it easier to understand what's going on.
For example from 'deploy_to_dev' to 'validate_dev' in order to
include that some tests will be run on the environment

- Set common env var in the root of the file:
Some of the env vars are being used in multiple stages,
so instead of having to hard-code some small differences
in multiple places, bring it all back to a root level
where it's easier to see what changes for what environment.
Copy link
Contributor

@pnowosie pnowosie left a comment

Choose a reason for hiding this comment

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

✅ Great

@rianhughes rianhughes merged commit 3d9d038 into main Jun 28, 2024
10 checks passed
@rianhughes rianhughes deleted the rianhughes/proof-range-test branch June 28, 2024 13:35
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.

VerifyProofRange non-set and inner nodes
4 participants