35 Commits

Author SHA1 Message Date
Linda Guiga
42f7038031
Add blockhash sys opcode 2023-09-07 09:43:59 +01:00
Robin Salen
c0b4f155f4
Implement receipts and logs
Co-authored-by: Hamy Ratoanina <hamy.ratoanina@toposware.com>
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-08-22 20:00:49 +01:00
Nicholas Ward
454e0add24 fixed blake2_f, and testing 2023-04-24 16:58:57 -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
Dmitry Vagner
1627a9a0d3 tests pass 2023-03-22 09:55:35 -07:00
Nicholas Ward
1c71fb3407 Merge branch 'main' into bignum-basic 2023-03-15 19:33:58 -07:00
Nicholas Ward
fa605d7b22 basic bignum 2023-03-07 17:47:09 -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
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
a99b7d51b1 setup miller 2022-12-20 17:23:05 -08:00
Dmitry Vagner
9063e900fb streamline tests 2022-12-15 13:18:00 -08:00
Dmitry Vagner
e8fe799ecd name 2022-12-14 21:14:22 -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
wborgeaud
6ed6574272 Balance 2022-10-28 11:15:43 +02:00
wborgeaud
0d4cf5be47 Minor 2022-10-26 15:45:34 +02:00
Dmitry Vagner
3cff0928c4 better test API 2022-10-17 11:02:24 -04:00
Dmitry Vagner
d1bad81985 stuff 2022-10-12 10:06:34 -04:00
Dmitry Vagner
d42250d677 merge 2022-10-03 14:25:33 -07:00
Nicholas Ward
99fb730aea rearranging and cleanup 2022-10-03 14:07:21 -07:00
Nicholas Ward
4624ce515b fmt 2022-10-03 13:34:16 -07:00
Nicholas Ward
eb6095cd04 message schedule progress 2022-10-03 13:34:16 -07:00
Dmitry Vagner
ea31a803ca merge 2022-09-27 00:35:21 -07:00
Daniel Lubarov
c7b03cfe9a More MPT logic 2022-09-24 20:49:19 -07:00
Dmitry Vagner
a6f72ee315 alt api for testing 2022-09-19 19:04:22 -07:00
Daniel Lubarov
cc61c7211c Core transaction processing logic
With lots of TODOs to fill in afterward; this is just a start.
2022-08-12 17:20:18 -07:00
Daniel Lubarov
ccc4202de3 Packing memory operations 2022-08-05 13:44:08 -04:00
Daniel Lubarov
94c9b1b09c Misc 2022-08-01 11:20:56 -07:00
Daniel Lubarov
3618793706 Test for parsing type 0 transactions
I made a couple related changes to `Interpreter`:
- Only enforce the `JUMPDEST` rule if we're in kernel mode.
- Convenience methods for dealing with the RLP and txn field segments of memory.
2022-08-01 11:03:05 -07:00
Daniel Lubarov
d6b5193c9b RLP decoding tests 2022-07-31 20:29:57 -07:00
wborgeaud
ad9e131026 Add test 2022-07-14 13:16:25 +02:00
wborgeaud
c8c3cc9a8f Files shuffling 2022-07-13 18:48:25 +02:00