31 Commits

Author SHA1 Message Date
Robin Salen
990eb34d96
Remove some CPU cycles (#1469)
* Amortize mload_packing

* Reduce stack overhead

* Amortize mstore_unpacking

* Speed-up stack operation in hash.asm

* Misc

* Small tweaks

* Misc small optims

* Fix comments

* Fix main access to withdrawals

* Fix stack description

* minor: rename label

* Comments

---------

Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2024-01-16 17:00:55 +00:00
Robin Salen
2dacbfe2ff
Address bundling (#1426)
* Start

* Scale TxnFields

* Speed-up

* Misc fixes

* Other fixes

* Fix

* Fix offset

* One more fix

* And one more fix

* Fix

* Fix

* Fix init

* More interpreter fixes

* Final fixes

* Add helper methods

* Clippy

* Apply suggestions

* Comments

* Update documentation

* Regenerate pdf

* minor

* Rename some macros for consistency

* Add utility method for unscaling segments and scaled metadata

* Address comments
2024-01-08 10:46:26 +00:00
Hamy Ratoanina
170ce5f27c
Preinitialize all code segments (#1409)
* Preinitialize all code segments

* Add zero writes after code_size

* Use preinitializing for extcodesize

* Fix gas calculation

* Extend logic to extcodecopy

* Apply comments
2023-12-07 12:49:46 -05:00
Hamy Ratoanina
6d751b13c1
Remove values of last memory channel (#1291)
* Remove values of last memory channel

Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>

* Fix merge

* Apply comments

* Fix ASM

* Top stack documentation (#7)

* Add doc file

* Apply comments

* Apply comments

* Fix visibility

* Fix visibility

---------

Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
2023-11-13 11:03:50 -05:00
Robin Salen
a9e47afc07
Refactor codecopy 2023-10-26 15:24:53 -04:00
Robin Salen
c1c1ab6d0f
Fix wcopy and extcodecopy for ranges over code limit 2023-10-24 18:10:06 -04:00
Robin Salen
d185d30e89
Speed-up memset and fix it to write 0 values 2023-10-23 07:55:09 -04:00
wborgeaud
9727eaf1e0
Fix extcodehash when account is empty (#1055) 2023-05-24 15:03:02 +02:00
wborgeaud
1616c0baa2 Fix extcodecopy 2023-05-18 13:50:34 +02:00
Linda Guiga
1f39c555a9
Address overflow-related TODOs in ASM code, using a macro add_or_fault. This is related to a4ea0965d7 2023-05-02 08:22:00 +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
wborgeaud
56bf08921b
Charge gas for extcodecopy (#942)
* Charge gas for extcodecopy

* Check for size=0
2023-03-30 06:46:26 +02: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
wborgeaud
06936c7649
Implement various syscalls (#930)
* Bunch of syscalls

* Minor

* Minor

* Minor

* Add todo for overflow
2023-03-22 06:42:14 +01:00
wborgeaud
a79271a8ec
Minor account code fixes (#929)
* Fixes

* Fix

* Newline
2023-03-21 20:15:30 +01:00
Daniel Lubarov
f717a40b85 Charge for memory expansion 2023-03-19 20:17:30 -07:00
Daniel Lubarov
a6ac051952 Misc EVM fixes 2023-03-06 22:33:06 -08:00
Daniel Lubarov
c558eedd65 Misc EVM fixes 2023-03-05 09:39:49 -08:00
Daniel Lubarov
df2ba7a384 Basic smart contract test 2023-01-14 21:18:58 -08:00
Daniel Lubarov
1b4acf5917 Make load_code a bit more general
So that it can be used to load code we're going to execute into the code segment of a certain context.
2022-11-21 13:54:39 -08:00
Daniel Lubarov
d23cecfcd8 Kernel code to do jumpdest analysis 2022-11-21 13:06:03 -08:00
wborgeaud
8198355565 Fix + Use context=0 2022-11-02 11:06:14 +01:00
wborgeaud
35c00fa6a7 Return 0 if account doesn't exist 2022-11-02 10:37:19 +01:00
wborgeaud
7647c5b51b Use address macro instead of opcode 2022-10-31 10:15:43 +01:00
wborgeaud
fd96d30e24 Minor 2022-10-27 14:57:17 +02:00
wborgeaud
dc8a62fbee Codecopy test 2022-10-27 11:06:24 +02:00
wborgeaud
8b1152c3b3 Working codesize 2022-10-27 09:32:29 +02:00
wborgeaud
03d7f3d17e Found bug 2022-10-26 16:39:31 +02:00
wborgeaud
0d4cf5be47 Minor 2022-10-26 15:45:34 +02:00
wborgeaud
560b9b2a97 Finish extcodecopy 2022-10-21 18:11:27 +02:00
wborgeaud
6b4cce21d8 Start 2022-10-21 18:00:41 +02:00