Robin Salen
ae8ee27eb8
Impl coinbase opcode for interpreter
2023-04-08 14:28:58 -04:00
Robin Salen
e3572f1d10
Impl basefee opcode for interpreter
2023-04-08 14:28:58 -04:00
Robin Salen
86bd055b5f
Impl difficulty opcode for interpreter
2023-04-08 14:28:58 -04:00
Robin Salen
60fed608ef
Impl number opcode for interpreter
2023-04-08 14:28:57 -04:00
Robin Salen
a17c6231a7
Impl timestamp opcode for interpreter
2023-04-08 14:28:57 -04:00
Daniel Lubarov
042c004237
Merge pull request #965 from mir-protocol/fix_run_constructor
...
Fix `run_constructor`
2023-04-08 08:41:23 -07:00
Daniel Lubarov
31e134f0e3
Delete %set_new_ctx_parent_ctx
2023-04-08 08:40:37 -07:00
wborgeaud
1a9f010484
Fix call logic ( #963 )
...
* Working callcall_00 (modulo gas)
* Add TODO for call depth
* Add TODO for insufficient balance panic
* Add TODO for subcontext gas limit
* Minor
* Minor
* Copy returndata to memory
* PR feedback
2023-04-08 10:28:01 +02:00
wborgeaud
ab692252ba
Minor fixes to context creation ( #961 )
2023-04-08 09:06:02 +02:00
Hamy Ratoanina
310107f218
Fix decode constraint
2023-04-07 17:06:57 -04:00
Daniel Lubarov
cfc54f95a0
Fix run_constructor
...
Fixes the crash due to a huge allocation in `returndatacopyPythonBug_Tue_03_48_41-1432`.
2023-04-07 10:20:40 -07:00
wborgeaud
af3fa1426e
Implement sys_return and sys_revert ( #959 )
...
* Fix gas and copy returndata in sys_return
* Also revert
* mstore_parent_context_metadata macros
2023-04-06 07:22:16 +02:00
wborgeaud
5ac12de990
Fix sys_exp ( #958 )
2023-04-05 19:07:47 +02:00
wborgeaud
923722b1e4
Fix copy opcodes when offset is large ( #957 )
...
* Fix wcopy
* Fix extcodecopy and use memset
* Comments
2023-04-05 06:24:26 +02: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
6a4e9ab60e
fix
2023-04-04 13:34:36 -07:00
Nicholas Ward
90f7ba9a23
addressed final comments
2023-04-04 13:33:20 -07:00
Daniel Lubarov
9690b60b80
Merge pull request #956 from mir-protocol/doubly_encode_storage_values
...
Doubly RLP-encode storage values
2023-04-04 07:40:11 -07:00
Daniel Lubarov
e70e4fca06
Doubly RLP-encode storage values
2023-04-03 21:51:17 -07:00
wborgeaud
6fa59d204f
Fix MSTORE8 ( #955 )
...
* Fix MSTORE8
* Small optimization
2023-04-03 16:39:18 +02:00
wborgeaud
f9217272d1
Fix signed syscalls stack ( #954 )
2023-04-03 13:40:36 +02:00
Daniel Lubarov
e2f33dd30f
Merge pull request #873 from toposware/hashconfig
...
Make hash functions generic
2023-04-01 17:08:16 -07:00
Robin Salen
9ee47ab745
Move HashConfig into GenericConfig associated types
2023-04-01 09:54:14 -04:00
wborgeaud
46d5e62a13
Copy txn data to calldata ( #935 )
2023-04-01 07:34:38 +02:00
wborgeaud
8e04cbfe8d
Self-destruct list ( #948 )
2023-04-01 07:29:22 +02:00
wborgeaud
a926dcad22
Transaction validity checks ( #949 )
2023-04-01 07:24:02 +02:00
Robin Salen
e857c020bf
Make hash functions generic
2023-03-31 18:55:06 -04:00
wborgeaud
2ca00a9ad4
Selfdestruct gas and set ( #947 )
...
* Add new segment and global metadata
* Insert into self-destruct set
* Implement sys_selfdestruct
* PR feedback
* Fix stack underflow
* Forgot that NOT 1 ≠ 0. Added %not_bit macro for that.
2023-03-31 11:13:36 +02:00
Daniel Lubarov
786a71d678
Merge pull request #946 from mir-protocol/selfBalanceGasCost
...
Add an integration test for the `selfBalanceGasCost` case
2023-03-30 17:24:24 -07:00
Daniel Lubarov
31cd0f6445
Remove dbg
2023-03-30 17:24:12 -07:00
Daniel Lubarov
9ae69a7c21
Add an integration test for the selfBalanceGasCost case
2023-03-30 16:10:02 -07:00
wborgeaud
56bf08921b
Charge gas for extcodecopy ( #942 )
...
* Charge gas for extcodecopy
* Check for size=0
2023-03-30 06:46:26 +02:00
Daniel Lubarov
f71d364237
Merge pull request #945 from mir-protocol/remove_CONSUME_GAS
...
Remove `CONSUME_GAS`
2023-03-29 13:17:06 -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
Daniel Lubarov
2d87c5d627
Remove CONSUME_GAS
...
Now that gas info is in `kexit_info`.
2023-03-29 11:28:05 -07:00
Daniel Lubarov
834522a653
Merge pull request #939 from mir-protocol/termination_fixes
...
A few fixes for terminal instructions
2023-03-29 11:26:05 -07:00
Daniel Lubarov
be0cccdf95
Merge pull request #938 from mir-protocol/rework_create_create2
...
Rework CREATE, CREATE2 syscalls
2023-03-29 11:25:52 -07:00
Daniel Lubarov
39fdad8c86
Feedback
2023-03-29 11:00:41 -07:00
wborgeaud
a0d04ca3d8
Fix Wcopy when size=0 ( #944 )
2023-03-29 19:58:44 +02:00
wborgeaud
9f1a5f975c
Charge gas for keccak ( #943 )
2023-03-29 19:58:29 +02: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
0c87a57f4e
addressed comment
2023-03-28 12:15:37 -07:00
Nicholas Ward
e4f2e864cb
fix
2023-03-28 12:08:03 -07:00
Nicholas Ward
1a348eed23
check for x < m
2023-03-28 12:02:09 -07:00
Nicholas Ward
bce2572099
documentation
2023-03-28 11:54:14 -07:00
Nicholas Ward
1e5677c4e4
comments
2023-03-28 11:50:05 -07: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