675 Commits

Author SHA1 Message Date
Nicholas Ward
de6f01f4b6 small optimizations 2023-03-14 15:52:52 -07:00
Nicholas Ward
424d8d2216 more optimizations 2023-03-14 15:52:52 -07:00
Nicholas Ward
29df451d9d optimizations 2023-03-14 15:52:52 -07:00
Nicholas Ward
97cb5c75b6 bug fix 2023-03-14 15:52:52 -07:00
Nicholas Ward
8f231bd03d optimization 2023-03-14 15:52:52 -07:00
Nicholas Ward
265d39a5a7 cleanup 2023-03-14 15:52:52 -07:00
Nicholas Ward
85411ac475 fixes 2023-03-14 15:52:52 -07:00
Nicholas Ward
7351a1661e fix 2023-03-14 15:52:52 -07:00
Nicholas Ward
684b668b60 fix 2023-03-14 15:52:52 -07:00
Nicholas Ward
63301d6b8c refactor sha2 compression 2023-03-14 15:52:52 -07:00
Nicholas Ward
2236f30ae5 more small optimizations 2023-03-14 15:52:50 -07:00
Nicholas Ward
e5f8632b5e small optimizations 2023-03-14 15:52:25 -07:00
Nicholas Ward
213ba8ff50 optimized initial hash value generation 2023-03-14 15:52:24 -07:00
Nicholas Ward
7c8026e893 cleanup 2023-03-14 15:51:58 -07:00
Nicholas Ward
2020202e50 optimize hash generation further further 2023-03-14 15:51:58 -07:00
Nicholas Ward
df7ea93ab3 optimize hash generation further 2023-03-14 15:51:58 -07:00
Nicholas Ward
3a0d86e262 hash function optimization 2023-03-14 15:51:58 -07:00
Nicholas Ward
ef377c0b4f cleanup 2023-03-14 15:51:58 -07:00
Nicholas Ward
4e8af821ae fixes 2023-03-14 15:51:58 -07:00
Nicholas Ward
9ad25b2aac optimizations 2023-03-14 15:51:58 -07:00
Nicholas Ward
676a483c06 fix 2023-03-14 12:34:51 -07:00
Nicholas Ward
476a554aea OR -> ADD 2023-03-14 12:29:30 -07:00
Daniel Lubarov
d5003b7cf2 Gas fees go to coinbase 2023-03-12 23:13:19 -07:00
Daniel Lubarov
84fbbbf410 Couple minor fixes 2023-03-10 17:02:15 -08:00
Daniel Lubarov
a6ac051952 Misc EVM fixes 2023-03-06 22:33:06 -08:00
Daniel Lubarov
2eed209a5a
Merge pull request #902 from mir-protocol/debug_tries_2
Some tooling for debugging tests where the updated tries are not correct
2023-03-06 10:31:59 -08:00
Daniel Lubarov
e6aa62f3ab Some tooling for debugging tests where the updated tries are not correct 2023-03-06 08:26:54 -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
Daniel Lubarov
29f0692efc Fix a few issues found by EVM tests 2023-02-24 23:37:08 -08:00
Dmitry Vagner
ea9846debf format 2023-02-16 17:01:43 -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
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
77a7af76c2 remove sha2 storage 2023-02-15 19:00:52 -08:00
Dmitry Vagner
abc762f7b4 cleaner arithmetic 2023-02-15 18:50:26 -08:00
Dmitry Vagner
731c29c43b abstract 2023-02-15 18:47:33 -08:00
Dmitry Vagner
c6cf1dc56a remove custom 2023-02-15 18:26:05 -08:00
Dmitry Vagner
bce867188c simplify ripe md test 2023-02-15 18:18:26 -08:00
Jacqueline Nabaglo
f3946f75bf
Gas constraints (#880)
* Gas constraints

* Bugfix

* make test pass post rebase
2023-02-14 22:30:19 -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
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
Daniel Lubarov
137bc78565 Prep for publishing to crates.io 2023-01-30 13:18:06 -08:00
Daniel Lubarov
f2e40541d9 Increment sender nonce + buy gas 2023-01-17 23:57:53 -08:00
Daniel Lubarov
df2ba7a384 Basic smart contract test 2023-01-14 21:18:58 -08:00
wborgeaud
9d6b3b2d16 Ignore failing test 2022-12-14 17:34:22 +01: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
Nicholas Ward
6ab6580058 block_size macro 2022-12-13 14:42:45 -08:00