Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Upgrade EVMC to 7.3.0 #237

Merged
merged 1 commit into from
Jun 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion evmc
Submodule evmc updated 67 files
+12 −2 .bumpversion.cfg
+49 −1 CHANGELOG.md
+22 −7 CMakeLists.txt
+28 −13 README.md
+0 −6 appveyor.yml
+21 −12 bindings/go/evmc/evmc.go
+0 −1 bindings/go/evmc/evmc.h
+3 −5 bindings/go/evmc/evmc_test.go
+0 −1 bindings/go/evmc/helpers.h
+26 −29 bindings/go/evmc/host.go
+22 −25 bindings/go/evmc/host_test.go
+0 −1 bindings/go/evmc/loader.c
+4 −0 bindings/go/evmc/loader.c
+0 −1 bindings/go/evmc/loader.h
+23 −0 bindings/java/.gitignore
+34 −0 bindings/java/CMakeLists.txt
+29 −0 bindings/java/Makefile
+44 −0 bindings/java/build.gradle
+146 −0 bindings/java/c/evmc-vm.c
+543 −0 bindings/java/c/host.c
+25 −0 bindings/java/c/host.h
+7 −0 bindings/java/java/build.gradle
+169 −0 bindings/java/java/src/main/java/org/ethereum/evmc/EvmcVm.java
+153 −0 bindings/java/java/src/main/java/org/ethereum/evmc/Host.java
+148 −0 bindings/java/java/src/main/java/org/ethereum/evmc/HostContext.java
+252 −0 bindings/java/java/src/test/java/org/ethereum/evmc/EvmcTest.java
+64 −0 bindings/java/java/src/test/java/org/ethereum/evmc/TestHostContext.java
+77 −0 bindings/java/java/src/test/java/org/ethereum/evmc/TestMessage.java
+2 −0 bindings/java/settings.gradle
+4 −0 bindings/java/wrapper.gradle
+1 −1 bindings/rust/evmc-declare-tests/Cargo.toml
+3 −3 bindings/rust/evmc-declare/Cargo.toml
+1 −1 bindings/rust/evmc-sys/Cargo.toml
+2 −2 bindings/rust/evmc-vm/Cargo.toml
+6 −6 bindings/rust/evmc-vm/src/lib.rs
+180 −42 circle.yml
+16 −12 cmake/cable/CableBuildType.cmake
+43 −30 cmake/cable/CableCompilerSettings.cmake
+11 −3 cmake/cable/CablePackage.cmake
+11 −0 cmake/cable/README.md
+3 −3 cmake/cable/bootstrap.cmake
+68 −0 cmake/cable/cable.cmake
+10 −0 codecov.yml
+2 −0 examples/example_precompiles_vm/CMakeLists.txt
+3 −0 go.mod
+2 −2 include/evmc/evmc.h
+163 −91 include/evmc/evmc.hpp
+2 −1 include/evmc/mocked_host.hpp
+1 −0 lib/CMakeLists.txt
+1 −0 test/CMakeLists.txt
+3 −0 test/gomod/.gitignore
+9 −0 test/gomod/README
+20 −0 test/gomod/use_evmc_test.go
+17 −0 test/tools/CMakeLists.txt
+9 −5 test/unittests/CMakeLists.txt
+169 −64 test/unittests/cpp_test.cpp
+0 −0 test/unittests/helpers_test.cpp
+0 −0 test/unittests/instructions_test.cpp
+0 −0 test/unittests/loader_test.cpp
+69 −0 test/unittests/mocked_host_test.cpp
+3 −0 test/vmtester/CMakeLists.txt
+1 −0 tools/CMakeLists.txt
+15 −0 tools/evmc/CMakeLists.txt
+89 −0 tools/evmc/main.cpp
+158 −0 tools/evmc/utils.cpp
+39 −0 tools/evmc/utils.hpp
+2 −9 tools/vmtester/vmtester.cpp
+4 −2 tools/vmtester/vmtester.hpp
4 changes: 2 additions & 2 deletions test/unittests/evm_calls_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ TEST_F(evm_calls, create_balance_too_low)

TEST_F(evm_calls, create_failure)
{
host.call_result.create_address = evmc::address{{0xce}};
host.call_result.create_address = 0x00000000000000000000000000000000000000ce_address;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a short address so could also use

Suggested change
host.call_result.create_address = 0x00000000000000000000000000000000000000ce_address;
host.call_result.create_address = evmc::address{0xce};

Though I think both are fine.

const auto create_address =
bytes_view{host.call_result.create_address.bytes, sizeof(host.call_result.create_address)};
rev = EVMC_CONSTANTINOPLE;
Expand Down Expand Up @@ -333,7 +333,7 @@ TEST_F(evm_calls, call_value_zero_to_nonexistent_account)

TEST_F(evm_calls, call_new_account_creation_cost)
{
const auto call_dst = evmc::address{{0xad}};
constexpr auto call_dst = 0x00000000000000000000000000000000000000ad_address;
const auto code = 4 * push(0) + calldataload(0) + push({call_dst.bytes, sizeof(call_dst)}) +
push(0) + OP_CALL + ret_top();
msg.destination = evmc_address{{3}};
Expand Down
2 changes: 1 addition & 1 deletion test/unittests/evm_state_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ TEST_F(evm_state, selfdestruct)

TEST_F(evm_state, selfdestruct_with_balance)
{
const auto beneficiary = evmc::address{{0xbe}};
constexpr auto beneficiary = 0x00000000000000000000000000000000000000be_address;
const auto code = push({beneficiary.bytes, sizeof(beneficiary)}) + OP_SELFDESTRUCT;
msg.destination = evmc_address{{0x5e}};

Expand Down