Paweł Bylica
6de0cfe164
Add mocked_host library
...
It takes the MockedHost implementation from evmone, converts it to C++11 and creates an interface library out of it.
2019-11-21 17:19:37 +01:00
Paweł Bylica
b76e6d1a02
loader: Handle unexpected error code from set_option()
2019-11-19 21:21:32 +01:00
Paweł Bylica
8234e723f0
loader: Simplify logic for finding create function
...
The loader library no longer tries EVMC create function names with removed prefixes.
2019-11-04 16:22:55 +01:00
Paweł Bylica
6b0a37029d
loader: Trim all file extensions for create function name
2019-11-04 14:33:00 +01:00
Paweł Bylica
2c3eb42f56
instructions: Change .stack_height_change values
2019-09-28 11:17:36 +02:00
Paweł Bylica
28dfad3930
Rename evmc_instance -> evmc_vm
2019-09-25 21:30:32 +02:00
Paweł Bylica
e87b24dfe1
instructions: Set gas cost for undefined instructions to 0
2019-09-19 16:07:20 +02:00
Paweł Bylica
3ae155fdee
instructions: Rename comment SUICIDE -> SELFDESTRUCT
2019-09-19 15:42:57 +02:00
Alex Beregszaszi
0d53dfa8bc
instructions: add repricing from EIP-1884
2019-08-21 20:18:06 +02:00
Alex Beregszaszi
3e9e76d5d6
instructions: add SELFBALANCE from EIP-1884
2019-08-21 20:17:48 +02:00
Alex Beregszaszi
14d5def808
Add Berlin HF
2019-08-21 15:37:24 +02:00
Andrei Maiboroda
cd93feaf9f
Support for EIP-1344 CHAINID opcode
2019-08-21 11:46:55 +02:00
Paweł Bylica
65b598643e
Add separate Istanbul instruction tables
2019-07-23 12:50:30 +02:00
Paweł Bylica
56ceca3b29
cmake: Add option to disable install
2019-07-23 12:29:31 +02:00
Paweł Bylica
fb471ef3e7
loader: Standardize configuration syntax and add evmc_load_and_configure()
2019-06-27 13:43:51 +02:00
Paweł Bylica
45da8cfce8
loader: Use strcpy_sx() everywhere
...
Previously we used strcpy_s() standard library function on Windows, but it triggers some additional handlers in some cases. To have the same behavior use strcpy_sx() everywhere.
2019-06-27 13:39:43 +02:00
Paweł Bylica
81db59cede
loader: Make error_code in evmc_load_and_create() optional
2019-06-05 16:07:49 +02:00
Paweł Bylica
8c3b3e61e6
loader: Change strcpy_sx() to be limited version of strcpy_s()
...
The strcpy_sx() now reports errors and behaves as strcpy_s() when buffer is too small (nulls the buffer). But it does not have all the checks.
2019-05-31 08:15:17 +02:00
Paweł Bylica
5757da5859
loader: Expose strcpy_sx() for testing
2019-05-31 08:15:17 +02:00
Paweł Bylica
2de1f81c72
loader: Rename strcpy_s() implementation to strcpy_sx()
...
The implementation strcpy_s() in loader is wrong (to be fixed) and limited in comparison to strcpy_s() spec. Rename it to strcpy_sx() to indicate it is not the one from standard library.
2019-05-31 08:15:16 +02:00
Paweł Bylica
7b02081f2e
loader: Destroy VM with incompatible ABI
...
When a VM is loaded but turns out is has incompatible ABI version it should be destroyed before reporting the loading error and returning a null handle.
Fixes https://github.com/ethereum/evmc/issues/305
2019-05-30 14:21:04 +02:00
Paweł Bylica
39162766df
Update copyright year, include the years of files creation
2019-04-24 18:36:28 +02:00
Paweł Bylica
32af5f41ac
loader: Mark set_error() with format attribute
2019-04-24 15:02:57 +02:00
Paweł Bylica
4484a8b74a
loader: Add loading error messages
2019-04-24 15:02:56 +02:00
Paweł Bylica
51fe9f48d4
loader: Abstract and mock evmc_last_error_msg()
2019-04-24 15:02:56 +02:00
Paweł Bylica
caf6c2a1bd
loader: Make evmc_last_error_msg() return error only once
2019-04-24 15:02:56 +02:00
Paweł Bylica
14c5356ae6
loader: Expose DLL load errors with evmc_last_error_msg()
...
Currently only works for errors by dlopen() on Linux and macos, otherwise returns NULL.
2019-04-16 18:06:54 +02:00
Paweł Bylica
c0615047a3
CI: Remove redundant BUILD_SHARED_LIBS=ON
2019-03-14 18:33:36 +01:00
Paweł Bylica
d8f09d1d11
test: Rewrite loader unit tests by mocking DLL loading
2019-03-13 22:07:13 +01:00
Paweł Bylica
e3cf88cea1
loader: Change strcpy_s() availability check
2019-03-13 22:07:13 +01:00
Paweł Bylica
ace9abdaf6
Rename Constantinople2 to Petersburg
2019-03-12 00:43:32 +01:00
Paweł Bylica
b0ae85ebbf
Add C++ wrappers/bindings
2019-01-22 14:15:26 +01:00
Alex Beregszaszi
cdc3f21dae
Reserve post-Constantinople EVM revision number as Constantinople2
...
Co-authored-by: Paweł Bylica <chfast@gmail.com>
2019-01-21 16:22:07 +01:00
Alex Beregszaszi
f064fdcbd8
Add Istanbul to evmc_revision
2019-01-14 13:42:17 +00:00
Paweł Bylica
a0bffe9523
Generalize loader searching algorithm
...
Allow loader to shorten the name word by word to the point where only single word is left.
2018-08-30 23:24:24 +02:00
Paweł Bylica
a889442d6a
loader: Fix compilation on Windows with GCC
2018-08-30 11:09:00 +02:00
Paweł Bylica
044a137a36
Format code
2018-08-28 17:05:13 +02:00
Alex Beregszaszi
b3959ec74b
Fall back to evmc_create in the loader as a last resort
2018-08-25 16:30:53 +01:00
Paweł Bylica
43fc619a7e
Update license note in headers of source files
2018-08-22 13:57:25 +02:00
Paweł Bylica
dc4ac2ad4f
Merge pull request #76 from ethereum/authors
...
Introduce AUTHORS file
2018-08-21 23:33:51 +02:00
Paweł Bylica
0659e24db0
Update copyright notice
2018-08-21 09:44:18 +02:00
Paweł Bylica
17fe768522
loader: Always build with PIC
2018-08-21 09:07:03 +02:00
Alex Beregszaszi
3fe4f28867
Add evmc_is_abi_compatible helper
2018-08-20 15:05:41 +01:00
Andrei Maiboroda
14b585922b
EXTCODEHASH support in instructions lib
2018-07-31 14:49:36 +02:00
Andrei Maiboroda
2e25d34c11
Support for EXTCODEHASH
2018-07-31 14:42:13 +02:00
Andrei Maiboroda
cac4f6f9d0
CREATE2 support in instructions lib
2018-07-25 12:13:46 +02:00
Paweł Bylica
426ff28d89
CMake: Build static libs with fPIC when needed
2018-07-16 12:29:02 +02:00
Paweł Bylica
edb29b7267
loader: Add helper to load and create a VM instance
2018-07-13 16:28:15 +02:00
Paweł Bylica
6b0ab05d07
loader: Fix support for Windows paths
2018-07-10 13:07:07 +02:00
Paweł Bylica
721f2b3083
loader: Return function pointer instead of EVM instance
2018-07-10 13:04:48 +02:00