132 Commits

Author SHA1 Message Date
Nicholas Ward
7028b6ba74 comment 2023-03-22 18:48:02 -07:00
Nicholas Ward
e471818c2b comments 2023-03-22 09:48:17 -07:00
Nicholas Ward
d928423c63 cleanup 2023-03-21 16:18:53 -07:00
Nicholas Ward
d59501e6a7 fixes, testing, and in-progress debugging 2023-03-21 16:03:54 -07:00
Nicholas Ward
64c76e76dd Merge branch 'main' into bignum-basic 2023-03-19 22:19:54 -07:00
Daniel Lubarov
f717a40b85 Charge for memory expansion 2023-03-19 20:17:30 -07:00
Nicholas Ward
e8405effa1 Merge branch 'main' into bignum-basic 2023-03-19 17:29:51 -07:00
Daniel Lubarov
a05ed9fc3a Fix clobbering of RLP data memory 2023-03-19 11:49:15 -07:00
Nicholas Ward
1c71fb3407 Merge branch 'main' into bignum-basic 2023-03-15 19:33:58 -07:00
Nicholas Ward
d4c7bfd592 addressed comments 2023-03-14 15:15:19 -07:00
Nicholas Ward
c4b511baf4 addressed comments 2023-03-14 14:28:21 -07:00
Nicholas Ward
fa605d7b22 basic bignum 2023-03-07 17:47:09 -08:00
Dmitry Vagner
e8865130de put extract in interpreter 2023-02-16 20:00:39 -08:00
Dmitry Vagner
be35111034 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-02-16 19:31:16 -08:00
Dmitry Vagner
4e4cfb06b3 function API / remove redundancy 2023-02-16 15:01:22 -08:00
Dmitry Vagner
53ab0ada11 remove blake storage 2023-02-15 19:11:22 -08:00
Dmitry Vagner
bce867188c simplify ripe md test 2023-02-15 18:18:26 -08:00
Dmitry Vagner
cd5c92b574 merge 2023-02-01 08:51:42 -08:00
wborgeaud
ca002aeafa
Optimize ecrecover ASM (#840)
* windowed mul

* Working

* Window of 4 bits

* Fix

* Comments

* Unroll loop

* Unroll loop

* remove global

* Minor

* Minor

* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter

* Minor

* Doesn't work

* Minor

* Minor

* wnaf msm

* Working hardcoded values: 28657 opcodes

* Working wnaf

* Small wnaf optim

* Precompute works

* Working together

* Bump to 129 bits

* Working glv decomposition

* Working MSM with GLV

* Almost working

* Working

* ECC test folder

* Working with real sig data

* Fix tests + Clippy

* Minor

* Cleaning

* Comments

* Cleaning

* Smaller glv test file

* Print opcode count at the end of interpreter run

* More constants

* Add z3 proof that the GLV scalars are 129-bit or less

* Minor change to z3 proof

* Minor

* Hamish's suggestion

* Working

* Cleaning

* Clippy

* PR feedback

* Minor PR feedback
2023-01-31 19:23:54 +01:00
Dmitry Vagner
31c5db91a5 rename module 2023-01-17 16:11:15 +07:00
Dmitry Vagner
89093b4df5 clean up 2022-12-22 15:10:29 -08:00
Dmitry Vagner
d5cec0e68f clean up code org 2022-12-21 14:52:54 -08:00
Dmitry Vagner
a72d4faaec minor 2022-12-14 19:58:16 -08:00
Dmitry Vagner
bd8988957e U256ify 2022-12-14 19:14:14 -08:00
Dmitry Vagner
397864fb4e merge 2022-12-14 18:57:24 -08:00
wborgeaud
83a290331e Fixes 2022-12-14 16:34:32 +01:00
wborgeaud
f91dfe7e1a Use the order of the BN base field in the interpreter 2022-12-14 16:22:57 +01:00
Dmitry Vagner
8c064b8624 merge 2022-12-13 16:32:13 -08:00
Nicholas Ward
f6af5240bd another clippy fix 2022-12-13 10:08:36 -08:00
Nicholas Ward
2166a407ed minor memory access refactor 2022-12-13 10:08:36 -08:00
Nicholas Ward
7663848bbf cleaned up hash tests 2022-12-13 10:08:36 -08:00
Nicholas Ward
7a5a899b45 clippy 2022-12-13 10:08:36 -08:00
Nicholas Ward
c0dbeb42d9 cleanup 2022-12-13 10:08:36 -08:00
Nicholas Ward
0d05a4bbbf FIX 2022-12-13 10:08:36 -08:00
Dmitry Vagner
2e2007eede Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2022-12-12 11:06:16 -08:00
Daniel Lubarov
7557f320d4 Fix to add_eth
It was creating a new account with the hash of an empty storage trie, when really it should be a pointer to an empty storage trie. We can use 0 as this pointer since `@SEGMENT_TRIE_DATA[0] = 0 = @MPT_NODE_EMPTY`.

Also a couple tweaks that helped me debug, like moving the memory value range checks from the interpreter into `MemoryState`, so they're done in actual witness generation as well as interpreter tests.
2022-12-09 18:58:48 -08:00
Dmitry Vagner
48149f93d1 inverse 2022-12-05 22:50:45 -08:00
Dmitry Vagner
57252c7fd2 simplify original 2022-12-05 14:29:59 -08:00
Dmitry Vagner
8f15402041 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2022-12-05 12:16:58 -08:00
Daniel Lubarov
1303a83f7f Misc witness generation fixes 2022-12-03 21:09:57 -08:00
Daniel Lubarov
21719222de fmt 2022-12-02 19:19:04 -08:00
Daniel Lubarov
b96c22a4f4 Interpreter fixes 2022-12-02 19:18:37 -08:00
Daniel Lubarov
9bf47ef8ac Fixes 2022-12-01 12:46:14 -08:00
Daniel Lubarov
d3aa33975a generate_keccak_general, generate_byte 2022-12-01 12:06:29 -08:00
Daniel Lubarov
526dc9bb77 Flush out operation list 2022-11-30 21:00:48 -08:00
Dmitry Vagner
307cbbd2b6 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2022-11-21 14:36:14 -08:00
Daniel Lubarov
d23cecfcd8 Kernel code to do jumpdest analysis 2022-11-21 13:06:03 -08:00
wborgeaud
c31b0147f4
Implement CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY in interpreter (#819)
* Implement `CALLVALUE, CALLDATALOAD, CALLDATASIZE, CALLDATACOPY` in interpreter

* PR feedback
2022-11-19 18:58:55 +01:00
Dmitry Vagner
69ce4f99fe add total count 2022-11-14 16:41:02 -08:00
wborgeaud
ce21d134a5
Merge pull request #804 from mir-protocol/static_kernel_in_tests
Use static `KERNEL` in tests
2022-11-07 09:18:49 +01:00