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(merkle tree): Provide Merkle proofs for tree entries and entry ranges #119

Conversation

slowli
Copy link
Contributor

@slowli slowli commented Sep 29, 2023

What ❔

  • Enables the Merkle tree to provide proofs for entries. The procedure efficiently handles batched requests.
  • Allows to verify range proofs using a streaming approach.

Why ❔

These are preparation steps for snapshot syncing. "Plain" Merkle tree proofs could be used in eth_getProof implementation.

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Attention: 65 lines in your changes are missing coverage. Please review.

Comparison is base (8df1127) 31.57% compared to head (82e4cf7) 31.74%.
Report is 13 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #119      +/-   ##
==========================================
+ Coverage   31.57%   31.74%   +0.17%     
==========================================
  Files         477      480       +3     
  Lines       25429    25531     +102     
==========================================
+ Hits         8028     8106      +78     
- Misses      17401    17425      +24     
Files Coverage Δ
core/lib/merkle_tree/src/domain.rs 93.33% <ø> (+2.02%) ⬆️
core/lib/merkle_tree/src/hasher/nodes.rs 81.94% <ø> (ø)
core/lib/merkle_tree/src/lib.rs 77.50% <ø> (ø)
core/lib/merkle_tree/src/storage/mod.rs 89.74% <100.00%> (-0.58%) ⬇️
core/lib/merkle_tree/src/types/internal.rs 75.00% <ø> (ø)
...e/lib/merkle_tree/tests/integration/merkle_tree.rs 89.71% <100.00%> (+1.17%) ⬆️
core/lib/merkle_tree/src/storage/patch.rs 81.81% <96.15%> (+3.52%) ⬆️
core/lib/merkle_tree/src/storage/proofs.rs 83.09% <66.66%> (-2.16%) ⬇️
core/lib/merkle_tree/src/types/mod.rs 64.28% <64.28%> (ø)
core/lib/merkle_tree/src/errors.rs 59.37% <0.00%> (-13.71%) ⬇️
... and 3 more

... and 6 files with indirect coverage changes

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

@slowli slowli requested a review from RomanBrodetski October 2, 2023 07:47
@slowli slowli marked this pull request as ready for review October 2, 2023 07:47
@slowli slowli requested a review from a team as a code owner October 2, 2023 07:47
@slowli slowli force-pushed the aov-pla-593-provide-merkle-proofs-for-tree-entries-and-entry-ranges branch from c3fa628 to a75c2e9 Compare October 3, 2023 12:29
core/lib/merkle_tree/src/errors.rs Outdated Show resolved Hide resolved
core/lib/merkle_tree/src/hasher/proofs.rs Show resolved Hide resolved
core/lib/merkle_tree/src/types/mod.rs Outdated Show resolved Hide resolved
@slowli slowli requested a review from a team as a code owner October 5, 2023 13:20
@slowli slowli added this pull request to the merge queue Oct 6, 2023
Merged via the queue into main with commit 1e30d0b Oct 6, 2023
@slowli slowli deleted the aov-pla-593-provide-merkle-proofs-for-tree-entries-and-entry-ranges branch October 6, 2023 14:17
github-merge-queue bot pushed a commit that referenced this pull request Oct 11, 2023
🤖 I have created a release *beep* *boop*
---


##
[16.0.0](core-v15.1.1...core-v16.0.0)
(2023-10-11)


### ⚠ BREAKING CHANGES

* **vm:** Update Refund model
([#181](#181))

### Features

* change chainId to u64
([#167](#167))
([f14bf68](f14bf68))
* **merkle tree:** Provide Merkle proofs for tree entries and entry
ranges ([#119](#119))
([1e30d0b](1e30d0b))
* **storage:** save enum indices in RocksDB
([#162](#162))
([bab099d](bab099d))
* **vm:** Update Refund model
([#181](#181))
([92b6f59](92b6f59))


### Bug Fixes

* **db:** drop constraint prover_jobs_fri_l1_batch_number_fkey
([#173](#173))
([fa71650](fa71650))
* **vm:** Make execution status and stop reason public
([#169](#169))
([f98c4fa](f98c4fa))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
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.

2 participants