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
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
Dmitry Vagner
cf5a4edc8b
prover input minor improvements
2023-03-27 18:20:22 -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
Daniel Lubarov
911dfedd07
Rework CREATE, CREATE2 syscalls
...
The old code was outdated in various ways, e.g. it was trying to share code with contract-creation txns, so I would ignore the diff and just look at the new code.
Still a bunch of TODOs left here, like actually saving code that's returned.
2023-03-24 10:43:46 -07:00
Daniel Lubarov
b4eb837346
A few fixes for terminal instructions
2023-03-23 17:28:55 -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
Daniel Lubarov
f9fa38d3cd
Fix new account insert key
2023-03-22 21:53:33 -07: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
0650d2636c
remove .scale
2023-03-22 17:26:14 -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
f4e65feb65
Fix bugs in wcopy and update_mem_words ( #934 )
...
* Fix bugs in wcopy and update_mem_words
* Update comment
2023-03-22 19:14:55 +01: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
874805cc65
Merge branch 'fp318' of github.com:mir-protocol/plonky2 into fp381-opcodes
2023-03-22 10:58:19 -07:00
Dmitry Vagner
645ef664a2
comment
2023-03-22 10:58:09 -07:00
Dmitry Vagner
63ec13e24b
Merge branch 'main' of github.com:mir-protocol/plonky2 into fp318
2023-03-22 10:57:30 -07:00
Dmitry Vagner
3425391a09
more comments
2023-03-22 10:57:26 -07:00
wborgeaud
d0b2b81e11
More MemoryError ( #932 )
2023-03-22 18:43:41 +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
wborgeaud
06936c7649
Implement various syscalls ( #930 )
...
* Bunch of syscalls
* Minor
* Minor
* Minor
* Add todo for overflow
2023-03-22 06:42:14 +01:00
Dmitry Vagner
84a0bcf893
cleanup
2023-03-21 21:28:15 -07:00
Dmitry Vagner
373062b2a3
on stack
2023-03-21 21:22:08 -07:00
Dmitry Vagner
0e8f6a2f68
test skeleton
2023-03-21 21:17:46 -07:00
Dmitry Vagner
392c29f412
compiles
2023-03-21 21:16:19 -07:00
Dmitry Vagner
9ea0ebd78f
skeleton
2023-03-21 21:10:01 -07:00
Dmitry Vagner
1437affcfd
fmt
2023-03-21 19:26:06 -07:00
Dmitry Vagner
b847d16e13
redundancy
2023-03-21 19:25:28 -07:00