Commit Graph

141 Commits

Author SHA1 Message Date
Alex Beregszaszi 96a0dd224e rust: rename some test cases for clarity 2019-07-04 16:36:25 +01:00
Alex Beregszaszi 98ad72ecd9 rust: implement Default for evmc_address/evmc_bytes32
Same as with PartialEq: this may be done via bindgen in the future.
2019-07-03 18:07:22 +01:00
Alex Beregszaszi b52a3dc81b rust: derive Hash trait for ffi data types 2019-07-03 18:07:22 +01:00
Alex Beregszaszi c1e8a897b6 rust: implement PartialEq for evmc_address/evmc_bytes32
Could also force deriving in bindgen with (derive_partialeq(true)),
but that would insert it for complex structures we don't want it for,
such evmc_message and blacklisthing those is tedious and error prone
in case EVMC introduces new structures.
2019-07-03 18:07:16 +01:00
Alex Beregszaszi 593ef3b6ac rust: expect output as slice in ExecutionResult 2019-07-03 15:56:40 +01:00
Alex Beregszaszi 87ad703e62 rust: pass output as reference in ExecutionResult 2019-07-03 15:56:32 +01:00
Alex Beregszaszi b4c585f9bd rust: make allocate_output_data operate on references 2019-07-03 12:16:04 +01:00
Alex Beregszaszi 092356dabb rust: add more comments/rustdoc 2019-06-25 20:15:26 +01:00
Alex Beregszaszi 315137edd2 rust: prefer getters as opposed to pub members on structs 2019-06-25 19:14:42 +01:00
Alex Beregszaszi 31e6964b04 rust: introduce ExecutionMessage wrapper 2019-06-25 18:51:14 +01:00
Alex Beregszaszi beea4e31c9 rust: implement Deref trait for EvmcContainer 2019-06-25 12:36:04 +01:00
Alex Beregszaszi 7769f7372b rust: fix some (mostly stylistic) warnings raised by rustc and clippy 2019-06-25 12:03:09 +01:00
Jake Lang 244fed6ebc rust: Remove implicit crate version in order to allow static C strings 2019-06-19 19:39:51 +01:00
Paweł Bylica 94fe0976e3
EVMC 6.3.0-alpha.1
Bump version: 6.3.0-alpha.0 → 6.3.0-alpha.1
2019-06-19 19:45:16 +02:00
Paweł Bylica 464e226f53
Change versioning scheme from -dev to -alpha.X
This allows making versioned snapshots as "alpha.X" pre-release versions.
2019-06-19 19:42:53 +02:00
Alex Beregszaszi 1fb372ea3e Update rust-bindgen to 0.49.2 2019-06-13 11:16:21 +02:00
Jake Lang dab2b2c57e rust: Fix false positives in sanitizers
Also fix some actual memory leak in the tests.
2019-06-13 10:43:42 +02:00
Alex Beregszaszi 4d07d1a340 rust: unwind execution panics in evmc-declare 2019-06-06 11:42:03 +02:00
Alex Beregszaszi fbba2538e1 rust: add support for the precompiles capability 2019-06-06 00:26:48 +02:00
Jake Lang 2e14aa2d5c rust: Procedural macro for automatic VM declaration 2019-06-04 16:18:23 +01:00
Alex Beregszaszi 4eeb42d074 rust: add failure() and success() helpers to ExecutionResult 2019-05-30 14:55:25 +01:00
Alex Beregszaszi 60bf98fb72 rust: remove support for create_address in ExecutionResult::new 2019-05-22 17:18:45 +01:00
Alex Beregszaszi 1e9f764bd5 rust: remove code duplication in ExecutionResult 2019-05-21 14:35:20 +01:00
Paweł Bylica cf1311a670
EVMC 6.3.0-dev
Bump version: 6.2.1 → 6.3.0-dev
2019-05-06 10:22:28 +02:00
Jake Lang 8d9d206ad0 rust: Implement ExecutionContext (host interface) 2019-05-03 21:06:29 +01:00
Paweł Bylica bc30e5a42f
EVMC 6.2.1
Bump version: 6.2.0 → 6.2.1
2019-04-29 18:05:30 +02:00
Paweł Bylica 6987a50596
EVMC 6.2.0
Bump version: 6.2.0-dev → 6.2.0
2019-04-25 08:56:20 +02:00
Alex Beregszaszi ee8a854444 rust: remove code duplication in ExecutionResult 2019-04-24 18:50:27 +01:00
Paweł Bylica 5112561d85
rust: Add copyright notice headers to source files 2019-04-24 18:36:28 +02:00
Paweł Bylica 39162766df
Update copyright year, include the years of files creation 2019-04-24 18:36:28 +02:00
Alex Beregszaszi 0f97d3ad92
Merge pull request #244 from ethereum/rust-create-address
rust: make create_address optional in ExecutionResult::new()
2019-04-24 16:22:39 +01:00
Paweł Bylica 44279f3e71
go: Use loader error messages 2019-04-24 15:36:41 +02:00
Alex Beregszaszi 0a66479c78 rust: make create_address optional in ExecutionResult::new() 2019-04-24 12:42:44 +01:00
Alex Beregszaszi 0d7becdb4a rust: add ExecutionResult to stack evmc_result conversion 2019-04-24 00:39:44 +01:00
Alex Beregszaszi 0d757c4c3e rust: add test for ExecutionResult without data 2019-04-24 00:27:27 +01:00
Alex Beregszaszi 6be5daefa1 rust: call release_result in tests
Also do not double-consume the input pointer.
2019-04-24 00:27:27 +01: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
Jake Lang 272276b405 rust: Add helpers for execution result handling 2019-03-19 15:09:43 -04:00
Alex Beregszaszi 2694347116 Always generate Rust enums 2019-03-13 20:34:54 +01:00
Alex Beregszaszi 680327f6fa Add higher-level evmc-vm binding 2019-03-13 15:54:20 +01:00
Alex Beregszaszi c1445d88cb Move Rust code to evmc-sys 2019-03-13 15:54:04 +01:00
Alex Beregszaszi 58906e218b Add basic Rust bindings 2019-03-13 15:53:42 +01:00
Paweł Bylica 1ad5f5ecbf
go: Add unit test for HostContext / TxContext 2019-03-12 17:59:06 +01:00
Paweł Bylica 0a0bb0b92e
go: Add unit test for Execute() 2019-03-12 17:59:06 +01:00
Paweł Bylica 65d68faed2
go: Run unit tests with example_vm 2019-03-12 14:34:46 +01:00
Paweł Bylica 7eb9677c4e
go: Combine tx context into TxContext struct 2019-03-12 14:34:46 +01:00
Paweł Bylica ace9abdaf6
Rename Constantinople2 to Petersburg 2019-03-12 00:43:32 +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
Paweł Bylica 9aff0e98e8
Merge branch 'release/6.0'
# Conflicts:
#	.bumpversion.cfg
#	CHANGELOG.md
#	CMakeLists.txt
2019-01-16 10:43:34 +01:00
Paweł Bylica 18b3e99816
go: Fix support for CREATE2 salt 2019-01-15 15:26:38 +01:00
Alex Beregszaszi f064fdcbd8 Add Istanbul to evmc_revision 2019-01-14 13:42:17 +00:00
Paweł Bylica e461b45f1c
Simplify get_block_hash() method by returning null hash 2018-10-19 17:42:19 +02:00
Paweł Bylica 9bfb7c8ada
Return code hash from get_code_hash() directly 2018-09-12 23:08:06 +02:00
Paweł Bylica b0d0bc035b
Return size_t from get_code_size() directly 2018-09-12 23:08:06 +02:00
Paweł Bylica 67441020a4
Return uint256be from get_balance() directly 2018-09-12 23:06:14 +02:00
Paweł Bylica 941c0a9723
Drop EVMC_STORAGE_NON_EXISTING_ACCOUNT status 2018-09-09 10:16:10 +02:00
Paweł Bylica 21e6605f98
Return bytes32 from get_storage() directly 2018-09-09 10:16:10 +02:00
Paweł Bylica 180b191965
go: Add bindings for has_capability() 2018-09-08 23:08:47 +02:00
Paweł Bylica 60cfde98af
Add alias evmc_address for struct evmc_address 2018-09-07 00:01:08 +02:00
Paweł Bylica 00e8b89712
Add alias evmc_bytes32 for struct evmc_bytes32 2018-09-07 00:00:32 +02:00
Paweł Bylica e772fbf28b
Rename uint256be to bytes32 2018-09-06 23:57:32 +02:00
Paweł Bylica a48893437f
Return bool from get_storage() to indicate non-existing accounts 2018-09-06 23:12:00 +02:00
Paweł Bylica d128fe45d7
Introduce EVMC_STORAGE_NON_EXISTING_ACCOUNT for set_storage() Host method 2018-09-06 23:12:00 +02:00
Paweł Bylica b8b3719fb9
Return bool from evmc_get_code_size_fn() 2018-09-06 14:21:51 +02:00
Paweł Bylica d6ef551541
Return bool from evmc_get_code_hash_fn() 2018-09-06 14:21:51 +02:00
Paweł Bylica ca85b77f57
Return bool from evmc_get_balance_fn() 2018-09-06 14:21:51 +02:00
Alex Beregszaszi 97a559c712 Go: more verbose error reporting on set_option 2018-09-06 09:54:09 +01:00
Alex Beregszaszi 50c254fb98 Introduce evmc_set_option_result enum 2018-09-06 09:54:09 +01:00
Paweł Bylica 280ff99363
Use bool type instead of int with 1 and 0 2018-09-06 00:28:27 +02:00
Alex Beregszaszi 9490c1a16f Go: support create2_salt 2018-09-05 18:03:33 +01:00
Alex Beregszaszi 1c69579da1 Rename EVMC_STORAGE_MODIFIED_DIRTY to EVMC_STORAGE_MODIFIED_AGAIN 2018-09-03 21:54:10 +01:00
Alex Beregszaszi 60723e231a Reorder evmc_storage_status 2018-09-03 21:53:30 +01:00
Alex Beregszaszi e614e2fbdd Go binding: add EVMC_STORAGE_MODIFIED_DIRTY 2018-09-03 21:50:50 +01:00
Paweł Bylica 9a2d07e595
Remove code hash from evmc_message 2018-09-03 19:58:57 +02:00
Paweł Bylica cf43fe0f66
Reorder evmc_message fields 2018-09-03 19:58:57 +02:00
Paweł Bylica d0bc50792a
go: Add error output to Host.GetBlockHash() 2018-09-03 16:49:01 +02:00
Alex Beregszaszi d9f7ff25f5
Add return code to get_block_hash_fn 2018-09-03 16:45:08 +02:00
Paweł Bylica e2cff68587
Rename context_fn_table to host_interface 2018-08-31 13:39:41 +02:00
Alex Beregszaszi 0403343779 Return evmc_tx_context in get_tx_context (as opposed to pointer parameter) 2018-08-30 14:03:50 +01:00
Paweł Bylica 47cc4cab71
go: Fix Host functions type checks 2018-08-30 14:12:00 +02:00
Alex Beregszaszi cd7ccf8906
Merge pull request #109 from ethereum/call-return-result
Return result from call_fn
2018-08-30 12:24:54 +01:00
Paweł Bylica 83f135b5c5
go: Add Host exported functions type checks 2018-08-30 13:03:50 +02:00
Paweł Bylica 3c86a6b934
Return result from call_fn
This changes the evmc_call_fn signature to return evmc_result object instead of getting result as an output parameter.
2018-08-29 23:00:27 +02:00
Alex Beregszaszi dba19c1d84 Go bindings: Use evmc_instance_name/version 2018-08-27 12:08:05 +01:00
Paweł Bylica 43fc619a7e
Update license note in headers of source files 2018-08-22 13:57:25 +02:00
Paweł Bylica 0659e24db0
Update copyright notice 2018-08-21 09:44:18 +02:00
Alex Beregszaszi a65e9fdf77 Go bindings: reword error description for unknown cases 2018-08-20 15:53:26 +01:00
Alex Beregszaszi eb447e9ecc Go bindings: do not panic on unknown status code 2018-08-20 15:50:06 +01:00
Alex Beregszaszi 89edc1e769 Go bindings: add missing error codes 2018-08-20 15:50:06 +01:00
Alex Beregszaszi f014e4fc77 Add evmc_execute helper 2018-08-20 14:59:52 +01:00
Paweł Bylica 71df6b8091
Add Go bindings 2018-08-20 14:56:14 +02:00