Linda Guiga
7efd147e08
Use mstore_32bytes to optimize decode_int_given_len ( #1413 )
2023-12-07 21:48:37 +01:00
Alonso González
471ff68d51
Optimize num_bytes and hex_prefix_rlp ( #1384 )
...
* Compute num_bytes non-deterministically
* Optimize hex_prefix_rlp
* Clean code
* Clippy
* Apply suggestions
Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
* Clean
* Add endline
* Change 1^256 to U256_MAX
* Apply suggestions from code review
Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
---------
Co-authored-by: Robin Salen <30937548+Nashtare@users.noreply.github.com>
2023-11-29 10:43:50 -05:00
Robin Salen
afd357f4bf
More of memcpy_bytes
2023-10-30 14:15:15 -04:00
Alonso González
f49fbc8e9b
Transactions trie support ( #1232 )
...
* Implement transactions.
* Fix receipts and transactions
* Add some fixes
* Update tests
* Remove changes added for debugging purposes only
* Clippy
* Remove additional debug changes
* Remove unused
* Apply comments
---------
Co-authored-by: Linda Guiga <lindaguiga3@gmail.com>
Co-authored-by: Robin Salen <salenrobin@gmail.com>
2023-09-27 10:00:16 -04: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
wborgeaud
e6a7b8c5cb
Add contract creation flag ( #1056 )
...
* Add contract creation flag
* Minor
* Fix intrinsic gas test
2023-05-24 17:49:54 +02:00
wborgeaud
f11921c9ad
Fix doubly_encode_rlp_scalar in the 0 case. ( #1022 )
2023-05-04 17:51:27 +02:00
Daniel Lubarov
e70e4fca06
Doubly RLP-encode storage values
2023-04-03 21:51:17 -07:00
Daniel Lubarov
a05ed9fc3a
Fix clobbering of RLP data memory
2023-03-19 11:49:15 -07:00
Daniel Lubarov
29f0692efc
Fix a few issues found by EVM tests
2023-02-24 23:37:08 -08:00
Daniel Lubarov
f4ab65f973
Fixes to get test_simple_transfer working
2022-12-08 23:27:20 -08:00
Daniel Lubarov
a8e30b0ca0
Switch a few uses of current-context memory to kernel memory
...
E.g. make sure the RLP segment is only used with the kernel context. Using current-context memory would also work, we just need to be consistent.
For transaction parsing etc, the context should be 0 anyway, but explicitly referring to kernel memory feels more idiomatic to me.
2022-10-15 08:45:01 -07:00
Daniel Lubarov
e6b5e3656f
Some more uses of %increment, %decrement
2022-10-07 12:03:37 -07:00
Daniel Lubarov
f2cb42bbe8
MPT logic to hash branch nodes
2022-10-05 20:46:49 -07:00
Daniel Lubarov
0ccb340e40
RLP related fixes
2022-10-04 15:18:31 -07:00
Daniel Lubarov
66c28e953d
Unroll num_bytes
...
Since it's in some code paths where speed is critical.
2022-10-03 14:42:11 -07:00
Daniel Lubarov
25a448e24b
Minor refactor of RLP code
2022-10-03 09:58:43 -07:00
Daniel Lubarov
9d22e376d0
Add TODO
2022-10-02 09:27:29 -07:00
Daniel Lubarov
9e483528d3
MPT hashing logic, part 3
2022-10-02 09:11:39 -07:00
Daniel Lubarov
f2f05952ab
MPT hashing logic, part 2
2022-10-01 20:02:42 -07:00
Daniel Lubarov
c721155e23
Main function, txn processing loop
2022-09-29 23:15:33 -07:00
Daniel Lubarov
aaf7ace396
Remove JUMPDESTs
2022-09-04 22:31:56 -07:00
Daniel Lubarov
539152d767
RLP encoding functions
2022-08-14 11:41:53 -07:00
Daniel Lubarov
616eb618f2
Support macro-local labels
...
Again borrowing syntax from NASM. Example from the test:
%macro spin
%%start:
PUSH %%start
JUMP
%endmacro
One thing this lets us do is create "wrapper" macros which call a function, then return to the code immediately following the macro call, such as
%macro decode_rlp_scalar
%stack (pos) -> (pos, %%after)
%jump(decode_rlp_scalar)
%%after:
%endmacro
I used this to clean up `type_0.asm`.
However, since such macros need to insert `%%after` beneath any arguments in the stack, using them will be suboptimal in some cases. I wouldn't worry about it generally, but we might want to avoid them in performance-critical code, or functions with many arguments like `memcpy`.
2022-08-04 12:32:20 -07:00
Daniel Lubarov
fae653da2a
Missing retdest
2022-08-03 21:56:31 -07:00
Daniel Lubarov
d6b5193c9b
RLP decoding tests
2022-07-31 20:29:57 -07:00
Daniel Lubarov
3d8ac2a391
style
2022-07-26 16:25:01 -07:00
Daniel Lubarov
05c7dfa115
Feedback
2022-07-25 16:32:59 -07:00
Daniel Lubarov
544c84b420
Transaction (RLP) parsing
...
Will add tests once we have the interpreter support for other segmnets.
2022-07-23 21:39:01 -07:00