379 Commits

Author SHA1 Message Date
Nicholas Ward
a4f60a0431 less thorough bignum modexp test 2023-04-17 22:41:26 -07:00
Nicholas Ward
d59fa59af8
Merge pull request #925 from mir-protocol/bignum-modexp
Bignum modexp
2023-04-04 13:37:48 -07:00
Nicholas Ward
90f7ba9a23 addressed final comments 2023-04-04 13:33:20 -07:00
Hamish Ivey-Law
9480cbed99
Signed operations as syscalls (#933)
* Implement syscalls for BYTE, SIGNEXTEND, SAR, SLT and SGT.

* Implement SDIV and SMOD; minor documentation and tidying.

* Implement EXP.

* Add sys_byte to the syscall jumptable.

* Test suite for signed syscalls.

* Handle `EXIT_KERNEL` "properly".

* Add gas charges; rename label.

* Uppercase all opcodes.

* Add test for BYTE; fix bug in BYTE.

* Calculate and charge gas for calling `EXP`.

* Fix gas calculation for `exponent = 0`.

* Address Jacqui's comments.

* Remove BYTE syscall as it will be implemented natively.

* Oops, forgot to remove this bit.
2023-03-30 05:56:01 +11:00
Nicholas Ward
cdaabfe9f2 Merge branch 'main' into bignum-modexp 2023-03-28 16:09:02 -07:00
BGluth
b667c07497
Merge pull request #940 from mir-protocol/eth_trie_utils_bump
Bumped `eth_trie_utils` to `0.5.0`
2023-03-28 15:06:11 -06:00
BGluth
3c7bc8835c Removed a type alias
- Was conflicting with the trait `PartialTrie` and also making the types
  harder to follow.
2023-03-28 14:38:58 -06:00
Nicholas Ward
fb73e8896e uncommented 2023-03-28 11:22:56 -07:00
Nicholas Ward
c18377d12f Merge branch 'main' into bignum-modexp 2023-03-28 11:15:27 -07:00
Nicholas Ward
91fb4fc02e fix modexp test 2023-03-28 11:15:01 -07:00
BGluth
60ad9e03ba Bumped eth_trie_utils to 0.5.0 2023-03-27 17:30:11 -06:00
Dmitry Vagner
c3a5fd8631 merge 2023-03-24 11:32:01 -07:00
wborgeaud
ce22d94518
Access lists (#937)
* Working linear search

* Working linear search for storage keys

* Macros

* Gas for wextaccount

* Add origin and to to the access list

* Handle precompiles

* Fixes

* Other opcodes

* Access list SLOAD

* Minor

* Add TODO for SSTORE

* Comments

* Clippy

* Minor

* PR feedback: cold_access

* PR feedback: simplify insert_accessed_addresses_no_return macro

* Fix sys_selfdestruct

* Store length in global metadata and store arrays in kernel memory

* Truncate address in all *CALL syscalls
2023-03-23 20:22:25 +01:00
Dmitry Vagner
7ff2122e46 Merge branch 'main' of github.com:mir-protocol/plonky2 into fp381-opcodes 2023-03-22 18:22:37 -07:00
Dmitry Vagner
3f4d970f15 Merge branch 'main' of github.com:mir-protocol/plonky2 into fp318 2023-03-22 16:58:54 -07:00
Dmitry Vagner
c8d2769c28 fmt 2023-03-22 11:58:51 -07:00
Dmitry Vagner
74afec70ed remove imports 2023-03-22 11:56:58 -07:00
wborgeaud
15bafce5dd
Implement CREATE2 address generation (#936)
* Implement create2 address gen

* Clippy

* Minor

* Wrong order

* Fix test

* Fix comment
2023-03-22 19:14:17 +01:00
Dmitry Vagner
1f3e3de77c clean and generalize 2023-03-22 10:16:02 -07:00
Dmitry Vagner
1627a9a0d3 tests pass 2023-03-22 09:55:35 -07:00
Nicholas Ward
1fbe305034 Merge branch 'main' into bignum-modexp 2023-03-22 09:46:17 -07:00
Dmitry Vagner
143225f449 finish 2023-03-21 19:19:02 -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
Dmitry Vagner
fc72ce46c5 fp6 works 2023-03-21 13:55:51 -07:00
Dmitry Vagner
4d83c58d1f frob works 2023-03-21 13:51:11 -07:00
Daniel Lubarov
e1ae539271 Fix test 2023-03-20 23:57:44 -07:00
Nicholas Ward
f6b9d6ee2e addressed comments 2023-03-20 12:36:07 -07:00
Nicholas Ward
72b5bb0eac fmt 2023-03-20 12:31:41 -07:00
Nicholas Ward
2752456e5d addressed comments 2023-03-20 12:31:36 -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
5720cf8a77 updated function name 2023-03-16 15:40:40 -07:00
Nicholas Ward
cecbfa9b59 fit 2023-03-16 11:46:01 -07:00
Nicholas Ward
c59b979cdf addmul fix 2023-03-16 11:42:39 -07:00
Nicholas Ward
b62bc35d64 fixes 2023-03-16 11:39:19 -07:00
Nicholas Ward
f1ad3da8eb fix 2023-03-16 11:29:37 -07:00
Nicholas Ward
062eb82a8b cleanup 2023-03-16 11:28:56 -07:00
Nicholas Ward
e0a4bc3157 cleanup 2023-03-16 11:21:30 -07:00
Nicholas Ward
fda64475bb fmt 2023-03-16 11:20:59 -07:00
Nicholas Ward
fa3443a50b new testing interface, and test data 2023-03-16 11:20:50 -07:00
Nicholas Ward
ee9bfb0822 fix 2023-03-15 23:11:39 -07:00
Nicholas Ward
4e736b63b8 fixes 2023-03-15 23:05:44 -07:00
Nicholas Ward
534395ee4d fmt 2023-03-15 22:30:54 -07:00
Nicholas Ward
73633354e0 test data 2023-03-15 22:30:17 -07:00
Nicholas Ward
e60271424c cleanup 2023-03-15 19:59:04 -07:00
Nicholas Ward
1c71fb3407 Merge branch 'main' into bignum-basic 2023-03-15 19:33:58 -07:00
Nicholas Ward
e97e818833 fixed iszero and cleanup 2023-03-15 19:25:51 -07:00
Nicholas Ward
6f8a510042 interface changes 2023-03-15 14:57:46 -07:00
Nicholas Ward
b0ed6ae0d3 cleanup 2023-03-15 14:32:18 -07:00