Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

allow the dev&test synchronous EOS VM OC mode without adjusting a compile time option #1128

Merged
merged 2 commits into from
Jan 27, 2025
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
5 changes: 0 additions & 5 deletions libraries/chain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,6 @@ foreach(RUNTIME ${EOSIO_WASM_RUNTIMES})
target_compile_definitions(eosio_chain PUBLIC "EOSIO_${RUNTIMEUC}_RUNTIME_ENABLED")
endforeach()

if(EOSVMOC_ENABLE_DEVELOPER_OPTIONS)
message(WARNING "EOS VM OC Developer Options are enabled; these are NOT supported")
target_compile_definitions(eosio_chain PUBLIC EOSIO_EOS_VM_OC_DEVELOPER)
endif()

install( TARGETS eosio_chain
RUNTIME DESTINATION ${CMAKE_INSTALL_FULL_BINDIR} COMPONENT dev EXCLUDE_FROM_ALL
LIBRARY DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR} COMPONENT dev EXCLUDE_FROM_ALL
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/wasm_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ std::istream& operator>>(std::istream& in, wasm_interface::vm_type& runtime) {
runtime = eosio::chain::wasm_interface::vm_type::eos_vm;
else if (s == "eos-vm-jit")
runtime = eosio::chain::wasm_interface::vm_type::eos_vm_jit;
else if (s == "eos-vm-oc")
else if (s == "eos-vm-oc-forced")
runtime = eosio::chain::wasm_interface::vm_type::eos_vm_oc;
else
in.setstate(std::ios_base::failbit);
Expand Down
13 changes: 2 additions & 11 deletions plugins/chain_plugin/chain_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,6 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip
delim = ", ";
#endif

#ifdef EOSIO_EOS_VM_OC_DEVELOPER
wasm_runtime_opt += delim + "\"eos-vm-oc\"";
wasm_runtime_desc += "\"eos-vm-oc\" : Unsupported. Instead, use one of the other runtimes along with the option eos-vm-oc-enable.\n";
#endif
wasm_runtime_opt += ")\n" + wasm_runtime_desc;

std::string default_wasm_runtime_str= eosio::chain::wasm_interface::vm_type_string(eosio::chain::config::default_wasm_runtime);
Expand Down Expand Up @@ -288,13 +284,8 @@ void chain_plugin::set_program_options(options_description& cli, options_descrip
"the location of the protocol_features directory (absolute path or relative to application config dir)")
("checkpoint", bpo::value<vector<string>>()->composing(), "Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.")
("wasm-runtime", bpo::value<eosio::chain::wasm_interface::vm_type>()->value_name("runtime")->notifier([](const auto& vm){
#ifndef EOSIO_EOS_VM_OC_DEVELOPER
//throwing an exception here (like EOS_ASSERT) is just gobbled up with a "Failed to initialize" error :(
if(vm == wasm_interface::vm_type::eos_vm_oc) {
elog("EOS VM OC is a tier-up compiler and works in conjunction with the configured base WASM runtime. Enable EOS VM OC via 'eos-vm-oc-enable' option");
EOS_ASSERT(false, plugin_exception, "");
}
#endif
if(vm == wasm_interface::vm_type::eos_vm_oc)
wlog("eos-vm-oc-forced mode is not supported. It is for development purposes only");
})->default_value(eosio::chain::config::default_wasm_runtime, default_wasm_runtime_str), wasm_runtime_opt.c_str()
)
("profile-account", boost::program_options::value<vector<string>>()->composing(),
Expand Down
2 changes: 1 addition & 1 deletion tests/read_only_trx_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
appArgs.add(flag="--read-only-threads", type=int, help="number of read-only threads", default=0)
appArgs.add(flag="--num-test-runs", type=int, help="number of times to run the tests", default=1)
appArgs.add(flag="--eos-vm-oc-enable", type=str, help="specify eos-vm-oc-enable option", default="auto")
appArgs.add(flag="--wasm-runtime", type=str, help="if set to eos-vm-oc, must compile with EOSIO_EOS_VM_OC_DEVELOPER", default="eos-vm-jit")
appArgs.add(flag="--wasm-runtime", type=str, help="if wanting eos-vm-oc, must use 'eos-vm-oc-forced'", default="eos-vm-jit")

args=TestHelper.parse_args({"-p","-n","-d","-s","--nodes-file","--seed"
,"--activate-if","--dump-error-details","-v","--leave-running"
Expand Down
Loading