Cyrill Leutwiler
616f044633
always build alloca in the entry block ( #46 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-13 21:54:42 +02:00
xermicus
7dc8e6051e
enable compressed instructions extension
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-13 14:55:16 +02:00
xermicus
783fa640e4
temporarily disable pvm linker optimizations
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-13 14:52:47 +02:00
xermicus
f086c57442
bump up runner runtime limits
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-13 14:52:09 +02:00
xermicus
0f2b55f6ff
fixed output size for transferred value
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-13 08:41:23 +02:00
xermicus
c111bcbc4d
common: remove unused constants
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-05 20:02:33 +02:00
xermicus
9e73c48150
remove the extra abi data
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-05 18:10:24 +02:00
Cyrill Leutwiler
393d90165e
pallet_revive: Account20 ( #41 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-04 12:42:41 +02:00
xermicus
7c934e5ca1
fix some clippies
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-04 11:31:18 +02:00
Cyrill Leutwiler
d2f76b645f
switch to pallet_revive runtime ( #40 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-09-03 17:18:22 +02:00
Cyrill Leutwiler
d763e30b8f
Simplify test case declaration ( #36 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-26 15:15:33 +02:00
xermicus
5d742d150d
tidy up workspace
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-24 16:09:07 +02:00
Cyrill Leutwiler and pgherveou
7844bbb604
add runner crate ( #34 )
...
Signed-off-by: xermicus <cyrill@parity.io >
Co-authored-by: xermicus <cyrill@parity.io >
Co-authored-by: pgherveou <pgherveou@gmail.com >
2024-08-24 03:20:52 +02:00
xermicus
0903718f07
add compiler helpers to solidity test utils
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-24 02:09:56 +02:00
Cyrill Leutwiler
880305dbfb
replace deprecated structopt crate with clap ( #33 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-23 18:25:08 +02:00
Cyrill Leutwiler
184d40d377
Upgrade inkwell ( #31 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-19 18:40:35 +02:00
xermicus
44bc7b94b2
typo
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-08-05 18:27:38 +02:00
xermicus
b002382d76
llvm build script: build compiler-rt for 64bit
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-07-19 00:06:53 +02:00
xermicus
e22eebabad
update README.md
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-07-19 00:06:48 +02:00
xermicus
6834751522
support riscv64 target
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-07-09 17:57:58 +02:00
xermicus
a4c4ad55dc
remove extensions crate
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-18 16:08:35 +02:00
xermicus
0d39b289cb
init mdbook
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-08 16:41:40 +02:00
xermicus
10c7045e15
Implement CODESIZE
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-06 15:10:21 +02:00
xermicus
39d78179d4
implement transient storage
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-05 17:34:17 +02:00
Cyrill Leutwiler
9e9227d740
Remove vyper and dead code ( #23 )
2024-06-05 13:29:07 +02:00
Cyrill Leutwiler
a04eacabff
Support solc v0.8.26 ( #22 )
2024-06-05 12:03:16 +02:00
xermicus
68ec8be49f
Implement the PUSHDEPLOYADDRESS instruction.
...
Introduction and raison d'être in solc:
https://github.com/ethereum/solidity/pull/3203
TL;DR: Exists to guard libraries from being called directly.
Hence we substitute PUSHDEPLOYADDRESS (the zero address) via a call
to the address API to let the library constructor fetch its own
address. In the zkSync target they do exactly the same.
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-05 10:34:53 +02:00
Cyrill Leutwiler
caa1228720
Run all tests on CI ( #21 )
...
Run all tests on CI
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-05 00:50:03 +02:00
xermicus
d9a304d162
integration: cache contract blob artifacts after compilation
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-04 19:14:52 +02:00
xermicus
2d0a0e2e81
implement BYTE
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-04 18:45:06 +02:00
xermicus
354b1c8d79
do not byte swap storage values
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-06-03 17:16:49 +02:00
Cyrill Leutwiler
5ff17da695
Implement balance ( #20 )
2024-06-03 12:21:49 +02:00
Cyrill Leutwiler
1ba806be1f
Contract calls ( #19 )
2024-06-01 20:48:20 +02:00
Cyrill Leutwiler
532721f3be
Implement MCOPY ( #18 )
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-29 21:43:22 +02:00
xermicus
2ea10d0c3e
convert todo list into GH issues
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-24 23:25:43 +02:00
xermicus
4f0a109771
update README.md
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-24 21:50:12 +02:00
Cyrill Leutwiler
bdaf573f17
integration tests on CI ( #12 )
...
Run integration tests on CI
2024-05-24 20:27:28 +02:00
Cyrill Leutwiler
0e90f1fd8c
Draf rust CI config
2024-05-24 17:59:38 +02:00
xermicus
5138fe3d06
implement EXTCODESIZE
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-22 22:56:03 +02:00
Cyrill Leutwiler
06aa289d9b
Constructors and contract creation ( #11 )
...
Implement constructor logic and support create/create2 in the mock runtime
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-22 21:35:32 +02:00
xermicus
47d5d6b394
dedicated functions for logging events adds even more code size on 32bit
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-14 11:08:35 +02:00
xermicus
83bf9d6041
events
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-14 09:46:18 +02:00
xermicus
2194aeebd0
constant values for basefee and difficulty
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-13 18:47:36 +02:00
xermicus
02055c73bb
extend mock runtime to allow executing constructors and cross contract calls
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-13 13:50:35 +02:00
xermicus
0e90317488
add contract name to integration to integration test cases
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-10 13:47:47 +02:00
xermicus
03a1918993
parallelize tests
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-10 10:54:01 +02:00
xermicus
5f5ec1a539
simplify wrapped divisions and sdiv cfg
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-10 10:16:40 +02:00
xermicus
6af889c1ff
implement division and remainder operations
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-08 23:21:16 +02:00
xermicus
6f080bb9f4
rename binary to resolc
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-08 11:16:24 +02:00
xermicus
e958da5cd1
rename file extensions
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-08 11:02:05 +02:00
xermicus
b55669f5c5
remove the zkasm format
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-08 10:48:01 +02:00
xermicus
95ff85c6d1
implement block.number and block.timestamp
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-07 18:03:17 +02:00
xermicus
a7318f2ef6
implement helper for easy allocation of a word on the stack
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-07 13:40:54 +02:00
xermicus
c0dd845b39
s/field/word
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-07 13:37:17 +02:00
xermicus
9f8a8a782d
1.78 clippies
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-06 14:34:51 +02:00
xermicus
b1a3a452ac
internalize register size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-06 14:30:32 +02:00
xermicus
518c03d045
internalize runtime API function symbols
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-06 13:45:58 +02:00
xermicus
336fc63f1d
rename target to polkavm
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-02 08:47:44 +02:00
xermicus
9fc24af355
remove usage of llvm memory attributes
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-02 08:34:45 +02:00
xermicus
426f673b0a
use normal style for comments
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-01 16:12:32 +02:00
xermicus
72515254fe
rename llvm-context crate
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-05-01 15:45:09 +02:00
xermicus
9b341853b4
update to polkavm with lazy execution
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-30 15:23:44 +02:00
xermicus
018d9f39fc
measure erc20 code size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-26 15:51:14 +02:00
xermicus
3d44685168
measure flipper code size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-26 10:51:41 +02:00
xermicus
44ae9e77d5
clippies
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-26 10:39:56 +02:00
xermicus
a85d1ef333
prevent confusing AlwaysInline and NoInline on O0
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-26 10:36:28 +02:00
xermicus
bd10742ef8
allow solc v0.8.25
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-23 11:47:16 +02:00
xermicus
3468fd5abc
allow configuration of the PVM stack size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-22 14:16:36 +02:00
xermicus
bd33566206
lld-sys: link against lto lib
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-19 18:52:34 +02:00
xermicus
5a6ef7a3da
lto
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-19 18:51:33 +02:00
xermicus
7623f6f7fa
Makefile: split up binary and npm installations
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-19 18:51:02 +02:00
xermicus
7bdf776ea4
Makefile: allow individual clean commands to fail
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-18 16:22:46 +02:00
xermicus
b3b4f4c9ae
add sha1 contract function integration test
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-18 12:34:35 +02:00
xermicus
cf4901f0a9
do not declare symbols that are already linked via the stdlib
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-18 12:33:46 +02:00
xermicus
21dd0abb8a
add SPDX header to integration contracts
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-18 12:30:09 +02:00
xermicus
b208daed7e
implement the value opcode
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-17 18:05:51 +02:00
xermicus
99d22cde2f
provide Solidity source for mstore8 tests
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-17 12:48:19 +02:00
xermicus
bfcdb8afa9
implement byte stores and assert heap values to be either i256 or i8
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-17 12:44:54 +02:00
xermicus
40013b4f5c
split up PVM instantiation
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-17 12:13:34 +02:00
xermicus
796d0c19bb
integration: instantiate the module in prepare
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-16 20:06:34 +02:00
xermicus
bd0c62f99c
linker: suppress unused parameter warnings
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-15 16:12:05 +02:00
xermicus
d6ae7daab1
use opaque pointer types everywhere
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-15 16:02:38 +02:00
xermicus
7aa27516e4
remove zkEVM extensions
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-15 15:22:23 +02:00
xermicus
3f9a90fe79
provide build script for LLVM
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-12 15:07:52 +02:00
xermicus
45a082d9a8
LLVM 18
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-04-10 10:05:48 +02:00
xermicus
ec952fd2cb
add another msize test case
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-26 15:11:39 +01:00
xermicus
17832855e0
implement msize opcode
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-26 12:03:28 +01:00
xermicus
69800ae1b3
always allocate the total required heap size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-26 12:03:04 +01:00
xermicus
a67e6a94f5
use native stack alignment size
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-26 10:05:00 +01:00
xermicus
2865676323
add fibonacci implementations to integration tests
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-26 09:47:25 +01:00
xermicus
2327a58213
XLEN type helper
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-22 16:34:04 +01:00
xermicus
c52a8d0f20
add common crate
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-22 16:19:18 +01:00
Cyrill Leutwiler
50f2dd9b74
Polkavm heap ( #2 )
...
Use PolkaVM heap
2024-03-22 12:41:41 +01:00
xermicus
e83e4f04e6
add crate for custom isa extensions
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-20 10:59:02 +01:00
xermicus
6436e1956b
always use build_gep wrapper
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-19 11:57:46 +01:00
xermicus
2b9e40225d
implement calldatacopy
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-19 10:49:47 +01:00
xermicus
6d058a42ed
suppress warnings about unused things
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-12 18:16:12 +01:00
xermicus
d12fa073fd
remove unused testdata
...
Signed-off-by: xermicus <cyrill@parity.io >
2024-03-12 12:07:02 +01:00
Cyrill Leutwiler
cffa14a4d2
Emerge Yul recompiler ( #1 )
...
Provide a modified (and incomplete) version of ZKSync zksolc that can compile the most basic contracts
2024-03-12 12:06:02 +01:00
xermicus
7a094f17c0
add more crates
...
Signed-off-by: xermicus <cyrill@parity.io >
2023-12-09 17:48:52 +01:00