Skip to content

Commit 3151efd

Browse files
adria0miha-stoparadria0
authored
MPT: Testing & go library fix (privacy-scaling-explorations#1757)
### Description This PR: - Removes the light client (that now is deprecated) and moves its StateUpdate circuit into bin/mpt-test. - `bin/mpt-test` is a tool to prove mainnet tests, see the README inside for more information. - Is not possible to link to external golang libraries in the same binary, so this PR also moves golang MPT code inside `/geth-utils` ### Type of change - [X] New feature (non-breaking change which adds functionality) ### Contents - Removal if `light-client-poc` folder - Move `mpt-witness-generator` into `geth-utils`, this includes also renaming the git action workflow file to geth utils. - Create new `bin/mpt-folder` - `access-lists` contains JSON files of accesslists of mainnet blocks - `src/circuit` contains a circuit and the witness generator to test chained MPT proofs. Well, there's some stuff that is not strictly mandatory to be there - it's taken from light client circuit - but it can be done later. - `src/cache.rs` it's a proxy server with a cache file. There's a lot of RPC calls to execute this tests and this allows to cache them all into a file, this makes the testing being possible without accessing any RPC server and speeding-up it. ### How Has This Been Tested? For the moment, some of the tests are not passing, but the idea is to integrate into CI when tests passes successfully. --------- Co-authored-by: Miha Stopar <[email protected]> Co-authored-by: adria0 <adria0@nowhere>
1 parent 8ba838b commit 3151efd

File tree

101 files changed

+973
-8565
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+973
-8565
lines changed

.github/workflows/mpt-witness-generator.yml .github/workflows/geth-utils.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: MPT Witness Generator Checks
1+
name: Geth-utils Checks
22

33
on:
44
merge_group:
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
cancel_others: 'true'
2121
concurrent_skipping: 'same_content_newer'
22-
paths: '["mpt-witness-generator/**"]'
22+
paths: '["geth-utils/**"]'
2323

2424

2525
build:
@@ -35,15 +35,15 @@ jobs:
3535
- name: Format
3636
uses: Jerome1337/[email protected]
3737
with:
38-
gofmt-path: './mpt-witness-generator'
38+
gofmt-path: './geth-utils'
3939
gofmt-flags: '-l -d'
4040

4141
- name: Build
42-
working-directory: ./mpt-witness-generator
42+
working-directory: ./geth-utils
4343
run: go build -v ./...
4444

4545
- name: Test
46-
working-directory: ./mpt-witness-generator
46+
working-directory: ./geth-utils
4747
env:
4848
NO_GETH: true
4949
run: go test -v ./...

Cargo.lock

+30-154
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ members = [
1111
"external-tracer",
1212
"mock",
1313
"testool",
14-
"mpt-witness-generator/rustlib",
15-
"light-client-poc"
14+
"bin/mpt-test"
1615
]
1716

1817
[patch.crates-io]

bin/mpt-test/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web3_rpc_cache.bin

bin/mpt-test/Cargo.toml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[package]
2+
name = "mpt-test"
3+
version = "0.1.0"
4+
edition = "2021"
5+
6+
[dependencies]
7+
ethers ={ version = "2.0.10", features = ["abigen", "rustls", "ws", "ethers-solc"] }
8+
eth-types = { path = "../../eth-types" }
9+
gadgets = { path = "../../gadgets" }
10+
geth-utils = { path = "../../geth-utils" }
11+
zkevm-circuits = { path = "../../zkevm-circuits", features=["test-circuits"]}
12+
eyre = "0.6.11"
13+
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", features=["circuit-params"], tag = "v0.3.0" }
14+
serde_json = "1.0.111"
15+
tokio = { version= "1.28.2", features = ["macros", "rt-multi-thread"] }
16+
glob = "0.3.1"
17+
lazy_static = "1.4.0"
18+
base64 = "0.21.7"
19+
flate2 = "1.0.28"
20+
hyper = { version="0.14.27", features= ["full"]}
21+
hyper-rustls = "0.24.1"
22+
serde = "1.0.195"
23+
hex = "0.4.3"
24+
25+
[features]
26+
default = ["disable-keccak"]
27+
disable-keccak = []

0 commit comments

Comments
 (0)