770 Commits

Author SHA1 Message Date
Nicholas Ward
fa605d7b22 basic bignum 2023-03-07 17:47:09 -08:00
Nicholas Ward
0f55956ade optimized initial hash value generation 2023-03-07 17:17:23 -08:00
Nicholas Ward
5994f4d932 cleanup 2023-03-07 16:49:28 -08:00
Nicholas Ward
9d8d81b4b0 optimize hash generation further further 2023-03-07 16:19:15 -08:00
Nicholas Ward
c37d1e25fc optimize hash generation further 2023-03-07 16:18:59 -08:00
Nicholas Ward
40f90d8312 hash function optimization 2023-03-07 15:45:20 -08:00
Nicholas Ward
5f592e60dc fixes 2023-03-07 15:15:49 -08:00
Nicholas Ward
93abd35ffb optimizations 2023-03-07 15:15:49 -08:00
Daniel Lubarov
a6ac051952 Misc EVM fixes 2023-03-06 22:33:06 -08:00
Daniel Lubarov
f117d76b73 sys_gas 2023-03-05 22:30:28 -08:00
Daniel Lubarov
c558eedd65 Misc EVM fixes 2023-03-05 09:39:49 -08:00
Dmitry Vagner
e8c9463268 comment 2023-02-25 18:22:55 -08:00
Dmitry Vagner
1d94756e1a add inverse doc 2023-02-25 18:07:10 -08:00
Dmitry Vagner
2ea3e5e3ca minor changes 2023-02-25 10:35:33 -08:00
Dmitry Vagner
e3e5c67834 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-02-25 10:30:46 -08:00
Daniel Lubarov
29f0692efc Fix a few issues found by EVM tests 2023-02-24 23:37:08 -08:00
Dmitry Vagner
2a9d4b1a9a minor 2023-02-20 15:19:01 -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
da7a8879c4 make hash functions take a location pointer 2023-02-16 16:59:51 -08:00
Dmitry Vagner
a6ffb4b3c3 simplify byte extraction 2023-02-16 16:30:50 -08:00
Dmitry Vagner
53ab0ada11 remove blake storage 2023-02-15 19:11:22 -08:00
Dmitry Vagner
77a7af76c2 remove sha2 storage 2023-02-15 19:00:52 -08:00
Dmitry Vagner
731c29c43b abstract 2023-02-15 18:47:33 -08:00
Dmitry Vagner
bce867188c simplify ripe md test 2023-02-15 18:18:26 -08:00
Dmitry Vagner
e2cac0bb0c Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-02-15 12:33:43 -08:00
Jacqueline Nabaglo
f3946f75bf
Gas constraints (#880)
* Gas constraints

* Bugfix

* make test pass post rebase
2023-02-14 22:30:19 -08:00
Dmitry Vagner
444da8f760 better comments 2023-02-13 14:31:53 -08:00
Dmitry Vagner
80e49caae1 segment virts 2023-02-13 14:04:43 -08:00
Dmitry Vagner
d320fbfbca update curve add with ops 2023-02-13 13:21:47 -08:00
Dmitry Vagner
787cc8903b change segment 2023-02-13 12:32:40 -08:00
Dmitry Vagner
71243fd728 fix pairing code after big BN PR merge 2023-02-13 11:41:13 -08:00
Dmitry Vagner
2158c1d267 merge 2023-02-13 11:31:08 -08:00
Dmitry Vagner
9e60ee2567 segment 2023-02-13 11:25:46 -08:00
wborgeaud
ac40bd5f5d
Optimize ecMul precompile (scalar multiplication on BN254) (#852)
* 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

* Move files and renaming fns

* Testing

* Fix BN GLV

* BN precompute table

* Working precompute

* Working bn tests

* Working

* Minor

* Minor

* Use MULFP254

* Minor

* Merge conflicts

* Remove unused asm file

* ECC fns renaming (#874)

* PR feedback
2023-02-13 20:11:32 +01:00
Dmitry Vagner
b585b6a7c7 remove macro 2023-02-08 09:46:54 -08:00
Dmitry Vagner
31095e1b23 stack macro 2023-02-08 09:37:27 -08:00
Dmitry Vagner
a061b88a7a naming 2023-02-08 09:15:38 -08:00
Dmitry Vagner
cecad5980d stack macro 2023-02-08 09:10:17 -08:00
Dmitry Vagner
361d6d7262 tests and stacks 2023-02-07 18:53:58 -08:00
Dmitry Vagner
cb7c638cbc more comments 2023-02-07 15:09:49 -08:00
Dmitry Vagner
69afed9297 refactor 2023-02-07 14:54:07 -08:00
Dmitry Vagner
9f808fc78c align 2023-02-07 08:53:23 -08:00
Dmitry Vagner
1c73e23824 fp -> fp254 2023-02-05 17:43:31 -08:00
Dmitry Vagner
0f030fae4a naming for global labels 2023-02-05 17:40:04 -08:00
Dmitry Vagner
c107c5055e comments 2023-02-01 19:30:04 -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
6e8d4a57a4 fix 2023-01-25 16:48:28 +07:00
Dmitry Vagner
0eef28af66 bools 2023-01-25 16:41:42 +07:00
Dmitry Vagner
6958d46c56 names and comments 2023-01-25 16:26:41 +07:00