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

Bring main up to date with latest branch #101

Closed
wants to merge 340 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
340 commits
Select commit Hold shift + click to select a range
4c3ce8a
wip
Mar 6, 2023
a7494ec
wip
Mar 7, 2023
6af5605
wip
Mar 15, 2023
8ad3680
Rename add_lookup
Mar 15, 2023
8d68fdc
wip
Mar 15, 2023
e7d02ed
fix
Mar 15, 2023
057b073
wip
Mar 16, 2023
6fbc3a3
Add byte_representation
Mar 17, 2023
bc5ce89
wip
Mar 17, 2023
cd8fb1e
cleanup
Mar 17, 2023
2e8bc91
implement lookups
Mar 17, 2023
a3977a7
Add rlc and byte lookup
Mar 23, 2023
fae8e2c
wip
Mar 27, 2023
33009c9
Assign poseidon table
Mar 27, 2023
219c9ac
Tests compile
Mar 27, 2023
439e4f9
Implement MptUpdateLookup
Mar 27, 2023
5a64334
Begin synthesize implementation for MptUpdate test
Mar 28, 2023
32b378d
cleanup
Mar 28, 2023
03a1d4d
Add comments for where conditional constraints will go
Mar 28, 2023
3b4258f
fmt
Mar 28, 2023
68449ac
Update Query to be Clone
Mar 28, 2023
6b8341d
cleanup
Mar 28, 2023
cb77d57
Add condition method
Mar 28, 2023
9f44c85
Implement OneHot
Mar 28, 2023
ffd9791
wip
Mar 28, 2023
4b1fa2d
Fill out some lookup and segment type conditional constraints
Apr 3, 2023
a9c9adb
Add depth and key transition constraints
Apr 3, 2023
3c9a998
Add direction lookups
Apr 7, 2023
964cdf4
Add AccountLeaf0-4 and StorageLeaf0-1 segment types
Apr 11, 2023
2c30b92
Add constraints for nonce and code size packing
Apr 11, 2023
a7cc3c2
Merge `main` branch into `feat/refactor`. (#26)
silathdiir Apr 13, 2023
2cc63d2
Add `.gitignore` to integration-tests. (#30)
silathdiir Apr 14, 2023
9e2aed5
Add state transition vectors
Apr 11, 2023
b96ba5a
Add assigment and tests for key_bit
Apr 13, 2023
1953886
WIP constraint poisoned error for nonce updates
Apr 14, 2023
4aa07de
Wip Fix test
Apr 14, 2023
8d991f3
wip
Apr 14, 2023
f65de06
wip
Apr 16, 2023
fe7053b
Fix canonical representation
Apr 16, 2023
0790234
Fix indexing for key bit
Apr 16, 2023
e3fe958
cleanup
Apr 16, 2023
0e23646
Add todos
Apr 16, 2023
79a5b2b
fix
Apr 16, 2023
b28d7a6
Test passes
Apr 16, 2023
4fe4ac7
Add old and new keys
Apr 16, 2023
1962c0f
Remove first column for OneHot so that assigning all zeros is valid
Apr 18, 2023
5d304bd
Update one hot calls
Apr 18, 2023
504f4f8
wip nonce_existing_account
Apr 23, 2023
00cdea5
wip re-enable more constraints
Apr 23, 2023
09429ea
wip re-enable more constraints
Apr 23, 2023
c89e786
Add constraints for extensionnew/old
Apr 24, 2023
636ddd1
Nonce write for existing account passes
Apr 25, 2023
e88d782
Fix bug where matches was wrong for first variant
Apr 25, 2023
4c52967
Add constraints for nonce leaf changes
Apr 25, 2023
0559029
Add todo comment
Apr 25, 2023
9fd0fc7
Byte value is 256, not 8
Apr 25, 2023
1b0ee8d
wip need to fix naming
Apr 26, 2023
7173511
fix address_high/low naming
Apr 26, 2023
7a6fd79
wip type_2 empty account nonce write
Apr 27, 2023
37c62ca
all three nonce write tests pass
Apr 27, 2023
e9a4a16
add mock_prove test helper
Apr 27, 2023
55ce067
Add constraints for type 1 nonexistence proofs
Apr 28, 2023
d426d7c
All three account types verify
May 1, 2023
8c7a29d
Fix transposition
May 1, 2023
6fb6a04
cleanup
May 1, 2023
03c728e
Add MPTProofType to conversion to make it 1-1
May 1, 2023
d4a9b3a
Simplify ClaimKind
May 1, 2023
67a46ce
Move account leaf hash assigments to proof.rs
May 1, 2023
5095260
Add IsEqaulGadget
May 2, 2023
02cdcac
Add key != other_key check for type 1 accounts and direction lookup f…
May 2, 2023
436e38c
Fixes lookup and code_size nonce packing
May 2, 2023
f017150
Add tests generated from fill_state_roots
May 3, 2023
47521fa
Add nonce_update_type_2 test
May 3, 2023
34c2d3d
Add nonce_update_existing test
May 3, 2023
5e9283f
Add test traces for non-storage updates
May 3, 2023
4006d82
Handle balance updates
May 4, 2023
9c3dab8
Add code size constraints
May 4, 2023
4e94e6a
Support poseidon code hash updates
May 4, 2023
8f65667
Add Fr to byte_representation
May 8, 2023
1a0d507
Update balance traces to use larger values
May 8, 2023
b8b87e8
Rlc balance
May 8, 2023
dd92228
Keccak code hash for new value
May 10, 2023
a9af83a
Add read keccak code hash read test
May 11, 2023
95b7b95
Add storage trie rows
May 18, 2023
1d105c2
cleanup
May 18, 2023
03d8dfd
Assign storage leaf values
May 18, 2023
84d48b1
cleanup
May 18, 2023
072cb2c
expand StorageEntry to StorageLeaf
May 18, 2023
bf89130
Distinguish between mpt and storage keys
May 18, 2023
63011f2
Handle type 1 empty storage slots
May 22, 2023
de3a2c9
Constrain Type 1 xor Type 2 for extension new
May 22, 2023
c1a24d0
Remove redundant constraint
May 22, 2023
578fc9c
Use key and other key for storage leaf
May 23, 2023
7fc111b
Add assignments and constraints for `AccountDoesNotExist` (#40)
silathdiir May 23, 2023
828572e
Add intermediate values
May 24, 2023
376d2a8
Move address to intermediate values
May 24, 2023
1958a65
Remove dedicated key_equals_other_key gadget
May 25, 2023
3e3f077
Only assign on accountleaf0
May 25, 2023
a939f4e
Remove hash_is_zero gadgets
May 29, 2023
8c6f55b
Fix rebase
May 29, 2023
ea37250
[Feat] Induce poseidon lookup (#39)
noel2004 May 29, 2023
f6e1782
Use challenge api (#41)
z2trillion May 30, 2023
359792f
Add non-zero hash constraints
May 30, 2023
c3d17ce
Remove unused column
May 30, 2023
b6826d3
Remove other_key_hash and other_leaf_data_hash columns
May 30, 2023
1bdd5f4
Add constraints for columns that can't change
May 30, 2023
933cc5a
Remove unused assigment
May 30, 2023
987fe39
Handle Storage ExtensionNew/Old
May 30, 2023
2146782
Handle case where there are no account trie rows
May 30, 2023
3fb4a49
Simply storage leaf assigment
May 30, 2023
60f7d78
Constrain path_type transitions
May 30, 2023
6c2a555
Constraint segment transitions
May 30, 2023
8117544
Remove redundant constraints
May 30, 2023
9a8be34
update comments
May 30, 2023
e567180
Remove old tests
May 30, 2023
0e33226
delete more tests
May 30, 2023
4c5ec34
Delete most of mpt_table
May 30, 2023
c6b77b1
Delete unused files
May 30, 2023
377436a
Remove more dead code
May 30, 2023
386b183
Delete even more dead code
May 30, 2023
7546765
Add AccountProof type
May 30, 2023
c6def59
Add more constraints for configure ExtensionNew/Old
May 30, 2023
bee766f
Fix extensionnew/old poseidon lookups
May 30, 2023
e3ea695
Constrain when path type can change from Common -> ExtensionNew/Old
May 30, 2023
0530740
Constrain new node is empty for ExtensionNew
May 30, 2023
2e6f352
constrain account leaf siblings for extension new nonce proof
May 30, 2023
9b5e7a0
disallow extension paths for code size, codehases, and and empty acco…
May 30, 2023
8dd6c3e
Constrain siblings for balance extension new
May 31, 2023
e48b435
remove todos
May 31, 2023
dd1d263
Change rlc lookup interface
May 31, 2023
76570ab
Restrict balances to 31 bytes to prevent overflow
May 31, 2023
1a5c0cd
Add empty storage trace jsons
May 31, 2023
c2e2151
Fix byte representation tests
May 31, 2023
38b3c34
Add assigment for empty storage proofs
May 31, 2023
814c16f
Add unbeautiful constraints for empty storage
May 31, 2023
eb7dfb6
try
lispc Jun 1, 2023
9b41fec
fix
lispc Jun 1, 2023
535827e
Match MPTProofType in zkevm-circuits (#42)
z2trillion Jun 5, 2023
9e83129
Use default of hash(0, 0) for poseidon lookup
Jun 5, 2023
6b8c28e
Fixes for proving mock traces (#44)
z2trillion Jun 9, 2023
ad65247
Pub assign_padding_row
Jun 9, 2023
eebd6a3
integrating mpt update gadget to stand-alone circuit
noel2004 Jun 7, 2023
9bc6d12
clippy
noel2004 Jun 7, 2023
0b4d6d5
fix merging conflict
noel2004 Jun 9, 2023
0703d1c
do not involve poseidon circuit in gadget testing
noel2004 Jun 9, 2023
399e384
Move tests to mpt circuit from mpt update
Jun 18, 2023
4180056
fix warnings
Jun 18, 2023
f433ae7
Remove all 0 row in test poseidon table
Jun 18, 2023
901cb56
update poseidon circuit, elimate secondary phase col
noel2004 Jun 19, 2023
c260519
Lower degree from 10 to 9 (#48)
z2trillion Jun 19, 2023
61c0e70
Add lookup_exprs to mpt circuit (#47)
z2trillion Jun 19, 2023
7a02abf
Add rlc lookup for Fr in canonical representation gadget (#50)
z2trillion Jun 21, 2023
cf89ddf
poseidon lookup do not need "default" selection (#51)
noel2004 Jun 26, 2023
f470136
Re-enable balance range check (#49)
z2trillion Jun 26, 2023
85f6f96
fix unfixed col in canonical representation (#52)
noel2004 Jun 26, 2023
71620c9
New spec for Feat/refactor nonce (#37)
huwenqing0606 Jun 27, 2023
a6c3fba
Rename mpt-proof_feat-refactor.md to mpt-proof.md
lispc Jun 27, 2023
082d787
Update mpt-proof.md
lispc Jun 27, 2023
9d12912
Assign all 0 row in mpt circuit for all 0 row in mpt table (#53)
z2trillion Jun 30, 2023
2e216c2
fix clippy (#54)
z2trillion Jul 17, 2023
2ea9fc2
Accept empty account proofs to for MptUpdates where new and old value…
z2trillion Jul 17, 2023
7b56d0b
Add make file and CI (#56)
z2trillion Jul 17, 2023
f239d42
one_hot columns hashmap to btreemap
lispc Jul 21, 2023
8927260
Add derive `Ord` to `OneHot`. (#57)
silathdiir Jul 21, 2023
042b8c8
update dep
noel2004 Jul 22, 2023
47fbcad
extend hash_traces and some other part with domain spec
noel2004 Jul 22, 2023
f6f17c6
update hash circuit to new dev branch
noel2004 Jul 23, 2023
0eec241
Add HashDomain type
Jul 24, 2023
a01acb8
Add hash domain to hash trace list
Jul 24, 2023
919eafd
Sanity checks for empty_account_type_1 pass
Jul 26, 2023
753d2f9
Sanity check for existing account trace passes
Jul 26, 2023
5ce3895
Handle type 1 extensions
Jul 26, 2023
a49ac72
Add nonce traces
Jul 26, 2023
21ba195
Add code size, keccak code hash, and poseidon code hash traces
Jul 26, 2023
e978646
Update hashes for storage traces
Jul 26, 2023
2a07bff
Add additional empty_storage_type_1 traces
Jul 26, 2023
189baf7
Check reversed storage traces
Jul 26, 2023
dfe596a
fix typo
Jul 26, 2023
5bbbed4
Use get_domains functions
Jul 26, 2023
6ecef3a
Remove domainless hash function
Jul 26, 2023
b0cb9a4
Implement into query for HashDomain
Jul 26, 2023
ce1fb6d
Start using domain separator in poseidon lookup
Jul 26, 2023
f5f1850
type 1 nonexisting account proof passes
Jul 26, 2023
eee8965
Change mock_prove signature
Jul 26, 2023
9d9e75d
mock prove updates to existing accounts
Jul 26, 2023
0d30b94
cleanup warnings
Jul 26, 2023
ffbe1b8
cleanup dbg's
Jul 26, 2023
5aafbac
clippy
Jul 26, 2023
640bded
Update node type in traces
Jul 27, 2023
da5ced0
Add type 2 non existing account proof
Jul 27, 2023
e2b25be
Fix check
Jul 27, 2023
5fceda8
Add balance update for type 2 empty account
Jul 27, 2023
7fcb10d
Add type_2 nonce update test
Jul 27, 2023
d0b1bbe
Add empty storage type 2 update tests
Jul 27, 2023
32629ed
Mock prove storage update
Jul 27, 2023
700ae12
Mock prove type 2 storage update
Jul 27, 2023
f10b385
Handle empty_account_proofs_for_zero_value_updates
Jul 27, 2023
f03cab9
mock prove empty_account_proofs_for_empty_storage_updates
Jul 27, 2023
8f2c03a
constrain domain
Jul 27, 2023
230ed87
Add lagrange_polynomial helper
Jul 27, 2023
f69b5d3
Add poseidon lookups for final common path types for type 2 proofs
Jul 27, 2023
9b7e4a0
Fix lagrange interpolation helper and use correct hash traces
Jul 27, 2023
a394982
Calculate account trie hash traces correctly
Jul 27, 2023
8bea2ae
Remove outdated traces and tests
Jul 27, 2023
529f720
Move tests into tests.rs
Jul 27, 2023
81f7380
Add singleton storage trie test, but now must lower degree
Jul 27, 2023
c013f87
Split next_domain from get_domains
Jul 28, 2023
cbc0739
Lower degree by 1. Still need to fix singleton trie assigment
Jul 28, 2023
a38378b
clippy
Jul 28, 2023
27ccbe0
fix singleton trie test
Jul 28, 2023
3f8e440
Fix HashDomain variant names
Jul 28, 2023
90e2b1e
Remove temp_hash
Jul 28, 2023
a3d38ca
Fix check_hash_traces_new
Jul 28, 2023
0dd038f
fix build
Jul 28, 2023
011fa6a
Handle case where hash domain for root node changes
Jul 30, 2023
dc1a0c7
Add failing empty storage proof tests
Jul 31, 2023
1c11b6c
Fix failing empty storage proofs by always adding storage key hash to…
Jul 31, 2023
8511fdf
Range check address_high
Aug 7, 2023
c3231c2
Constrain inverse_or_zero to be zero when value is 0 (#82)
z2trillion Aug 14, 2023
9aeff02
[ToB 2.6] Fix configure_nonce (#73)
z2trillion Aug 14, 2023
2163a9c
fix build
Aug 14, 2023
b0d5f6f
Add check that final mpt update row is padding
Aug 23, 2023
0e29570
fmt
Aug 23, 2023
9bd1878
Check previous instead of current (#68)
z2trillion Aug 23, 2023
34af759
Constraint BinaryColumn to be binary (#69)
z2trillion Aug 23, 2023
3ab166a
Check old hash = new hash for every row of empty storage proofs (#74)
z2trillion Aug 23, 2023
004fcdd
Remove unreachable constraints and redundant condition in configure_c…
z2trillion Aug 23, 2023
f9ff6bb
fix constraint name (#72)
z2trillion Aug 23, 2023
b8a8528
Remove unused file (#71)
z2trillion Aug 23, 2023
f89e2d5
Fix constraint names (#86)
z2trillion Aug 23, 2023
ef64eb5
[ZK 42] Fix configure_balance constraints (#87)
z2trillion Aug 25, 2023
c8f9c7f
[ZK 35] add is_first selector to handle wraparound for .previous (#81)
z2trillion Aug 25, 2023
7c3f35e
Use constraints instead of lookups
Aug 25, 2023
63a8416
Fix assert
Aug 25, 2023
8582de8
Merge branch 'zellic_kalos_2_23' into v0.6
Aug 25, 2023
4c0fe6d
Merge branch 'zellic_kalos_38' into v0.6
Aug 25, 2023
a069143
Handle proofs for empty and singleton MPT's (#89)
z2trillion Aug 30, 2023
c5cd0da
Fix failing testool cases (#90)
z2trillion Aug 30, 2023
cafcdeb
upgrade poseidon circuit
lispc Sep 1, 2023
e4f5df3
[ZK 38] range check address_high and address_low (#78)
z2trillion Sep 12, 2023
a42263e
upgrade ethers-rs
lispc Sep 13, 2023
6b8b568
prune Cargo.lock
lispc Sep 13, 2023
c257a93
fix mpt table lookup
lispc Sep 13, 2023
0bae9ee
fix mpt circuit
lispc Sep 13, 2023
b5ea508
Disambiguate between rlc lookups (#76)
z2trillion Sep 24, 2023
9613b2c
Remove unused function
Sep 26, 2023
3667289
Move poseidon lookup to constraint builder
Sep 26, 2023
bcf1636
Ensure row is enabled for non-poseidon lookups
Sep 26, 2023
578c210
Use enough rows to allow tests to pass
Sep 26, 2023
6232ff4
Add n_rows_required method to MptCircuit (#93)
z2trillion Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: checks
on: push

jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-12-10
override: true
components: rustfmt
- run: make fmt
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-12-10
override: true
components: clippy
- run: make clippy
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2022-12-10
override: true
- run: make test
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/layouts
.vscode
.cargo
Cargo.lock
*.png
*.png
Loading
Loading