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

fix(zktrie): fix deletion proofs and collect them in commiting phase #263

Merged
merged 14 commits into from May 8, 2023

Conversation

noel2004
Copy link
Member

@noel2004 noel2004 commented Apr 7, 2023

Here is the second fixing on deletion proof base on issue #253 and it replace PR#247.

With this PR, we:

  1. Search all possible deletion proof for a arbitrary sequence of operations involving deletion of storage slots at the end of tracing a block, with a trivial cost being added to each tx tracing, and no blocking on the parallel executions
  2. The search process itself should be low cost (only travelse among each mpt path, all data is in-memory and only looking up in map is involved, no extra updating on trie or hash calculations
  3. The collected deletion proof should be "barely enough", i.e it is enough for witness generator to deduce state root under any operating sequence, while no extra proof would be included

@HAOYUatHZ HAOYUatHZ changed the title Fix/deletion proof 2 fix: fix deletion proofs and collect them in commiting phase Apr 10, 2023
HAOYUatHZ
HAOYUatHZ previously approved these changes Apr 10, 2023
@HAOYUatHZ HAOYUatHZ changed the title fix: fix deletion proofs and collect them in commiting phase fix(zktrie): fix deletion proofs and collect them in commiting phase Apr 10, 2023
@noel2004
Copy link
Member Author

Has been tested under some artificial contract

HAOYUatHZ
HAOYUatHZ previously approved these changes Apr 12, 2023
core/state/state_prove.go Show resolved Hide resolved
core/state/state_prove.go Outdated Show resolved Hide resolved
core/state/state_prove.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
eth/tracers/api_blocktrace.go Show resolved Hide resolved
trie/zktrie_deletionproof.go Show resolved Hide resolved
@noel2004
Copy link
Member Author

noel2004 commented May 5, 2023

We have run a node with this PR as a patched for a month and it seems to be stable with --mptwitness being enabled. The block trace obtained work as expected.

@HAOYUatHZ HAOYUatHZ merged commit c913b3e into develop May 8, 2023
4 checks passed
@HAOYUatHZ HAOYUatHZ deleted the fix/deletion_proof_2 branch May 8, 2023 07:40
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.

None yet

3 participants