152 Commits

Author SHA1 Message Date
Daniel Lubarov
47fac8e35b Couple fixes & minor refactor 2023-03-19 22:35:53 -07:00
Dmitry Vagner
24e0b29188 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-03-14 13:42:22 -07:00
Daniel Lubarov
d5003b7cf2 Gas fees go to coinbase 2023-03-12 23:13:19 -07:00
Dmitry Vagner
18c83e77da Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2023-03-08 09:44:21 -08:00
Daniel Lubarov
a6ac051952 Misc EVM fixes 2023-03-06 22:33:06 -08:00
Daniel Lubarov
c558eedd65 Misc EVM fixes 2023-03-05 09:39:49 -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
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
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
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
69afed9297 refactor 2023-02-07 14:54:07 -08:00
Dmitry Vagner
0f030fae4a naming for global labels 2023-02-05 17:40: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
5deb164865 refactor power 2023-01-24 16:35:49 +07:00
Dmitry Vagner
d2aa937a2f improved prover input and test api 2023-01-21 13:19:07 +07:00
Dmitry Vagner
32758829ba refactor 2022-12-20 12:29:48 -08:00
Dmitry Vagner
d6c7e319bd all but inv 2022-12-16 17:35:52 -08:00
Dmitry Vagner
5ca2d88bfb aggregator 2022-12-14 19:51:07 -08:00
Dmitry Vagner
8c064b8624 merge 2022-12-13 16:32:13 -08:00
Nicholas Ward
24d6627a62 addressed comments 2022-12-13 10:08:36 -08:00
Nicholas Ward
2e62ac1b63 cleanup 2022-12-13 10:08:36 -08:00
Nicholas Ward
778aec627b rename blake -> blake2b 2022-12-13 10:08:36 -08:00
Nicholas Ward
0d05a4bbbf FIX 2022-12-13 10:08:36 -08:00
Nicholas Ward
54a2e96473 progress 2022-12-13 10:08:36 -08:00
Nicholas Ward
dd29ec1f46 fixes and test infrastructure 2022-12-13 10:08:30 -08:00
Nicholas Ward
609ed6c984 fixes 2022-12-13 10:08:16 -08:00
Nicholas Ward
d3e5feba83 Blake progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
6e782a1a1e Blake progress 2022-12-13 10:08:16 -08:00
Nicholas Ward
efa80edaa9 blake initial 2022-12-13 10:08:16 -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
f4ab65f973 Fixes to get test_simple_transfer working 2022-12-08 23:27:20 -08:00
Dmitry Vagner
48149f93d1 inverse 2022-12-05 22:50:45 -08:00
Dmitry Vagner
3785e312f1 cord and tangent 2022-12-05 13:27:01 -08:00
Dmitry Vagner
1b5a3d0ff0 fix 2022-11-29 22:02:24 -08:00
Dmitry Vagner
709b520ce3 miller loop 2022-11-29 20:43:49 -08:00
Dmitry Vagner
c3dcdfd540 tate 2022-11-28 14:56:36 -08:00
Dmitry Vagner
6b34f4ff0a alphabetical 2022-11-21 14:41:21 -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
Dmitry Vagner
68cde336a3 reorg 2022-11-17 13:18:13 -08:00
Dmitry Vagner
c854b2d817 Merge branch 'main' of github.com:mir-protocol/plonky2 into non-inv 2022-11-14 12:51:20 -08:00
Dmitry Vagner
ad645ece17 aggregator 2022-11-10 10:51:40 -08:00
Hamish Ivey-Law
1c87fbb712
EVM shift left/right operations (#801)
* First parts of shift implementation.

* Disable range check errors.

* Tidy up ASM.

* Update comments; fix some .sum() expressions.

* First full draft of shift left/right.

* Missed a +1.

* Clippy.

* Address Jacqui's comments.

* Add comment.

* Fix missing filter.

* Address second round of comments from Jacqui.
2022-11-09 10:47:15 +11:00
Jacqueline Nabaglo
626c2583de
Combine all syscalls into one flag (#802)
* Combine all syscalls into one flag

* Minor: typo

* Daniel PR comments
2022-11-07 12:29:28 -08:00
wborgeaud
68107502df Merge branch 'main' into account_code_opcodes
# Conflicts:
#	evm/src/cpu/kernel/aggregator.rs
#	evm/src/cpu/kernel/tests/mod.rs
2022-11-02 13:46:14 +01:00
wborgeaud
313402de02
Merge pull request #797 from mir-protocol/balance
Implement `(SELF)BALANCE`
2022-11-02 13:44:29 +01:00
wborgeaud
70b5dda399 Merge branch 'main' into account_code_opcodes 2022-11-02 10:43:35 +01:00