Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Port MPT witness generator #1589

Merged
merged 2 commits into from
Sep 9, 2023
Merged

Port MPT witness generator #1589

merged 2 commits into from
Sep 9, 2023

Conversation

ChihChengLiang
Copy link
Collaborator

@ChihChengLiang ChihChengLiang commented Sep 8, 2023

Description

MPT witness generator was developed here. We now port them to here.

Issue Link

#1566

Type of change

New feature (non-breaking change which adds functionality)

Contents

Rationale

  • We port the raw repo content here. No modification except removing .git folder. This way, we don't hide any modifications in the big diffs.
  • We expect further changes in the following PR

How Has This Been Tested?

No test

@ChihChengLiang ChihChengLiang linked an issue Sep 8, 2023 that may be closed by this pull request
@ChihChengLiang ChihChengLiang marked this pull request as ready for review September 8, 2023 07:30
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This CI does nothing in this repo yet. Will fix them in the following PRs.

@miha-stopar miha-stopar self-requested a review September 8, 2023 11:24
Copy link
Member

@ed255 ed255 left a comment

Choose a reason for hiding this comment

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

LGTM following the rationale described in the PR (which is just moving the external repo to zkevm-circuits, and iterate the implementation in future PRs)

From the quick look here are some comments that could be addressed in future PRs:

  1. Make it explicit which files come from go-ethereum and which ones are new. Also mention the go-ethereum version used (or the commit hash). For the files that come from go-ethereum, make it explicit which functions/types have been changed or introduced.
  2. I noticed lines of commented code. I think some of that comes from go-ethereum file; maybe the desire was to disable some functionality. Comments on why that is disabled would be helpful
  3. In some of the test files I noticed many functions that look very similar but have different input-ouputs. I think there's a big opportunity of reusing code there.
  4. Are all the files and functions strictly needed? For types and public functions that are not modified, could we instead import them from go-ethereum instead of copying them?

Regarding possible formatting of the code in future PRs, I think it would be ideal if the files imported from go-ethereum are not formatted differently than they appear in go-ethereum, so we can quickly diff both sides to see the differences without noise.

@adria0
Copy link
Member

adria0 commented Sep 8, 2023

LGTM for dropping the go code into the repo.

Note that I will be working on the rust wrapper because I need it for the light client.
Follow https://github.com/privacy-scaling-explorations/zkevm-circuits/tree/zklight for the changes.

@adria0 adria0 self-requested a review September 8, 2023 16:14
@ChihChengLiang ChihChengLiang added this pull request to the merge queue Sep 9, 2023
Merged via the queue into main with commit acc6a4b Sep 9, 2023
11 checks passed
@ChihChengLiang ChihChengLiang deleted the port-mptwg branch September 9, 2023 02:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Port mpt-witness-generator back to zkevm-circuits
3 participants