#include <wasm_interface.hpp>
|
| wasm_interface (vm_type vm, bool eosvmoc_tierup, const chainbase::database &d, const boost::filesystem::path data_dir, const eosvmoc::config &eosvmoc_config, bool profile) |
|
| ~wasm_interface () |
|
void | indicate_shutting_down () |
|
void | code_block_num_last_used (const digest_type &code_hash, const uint8_t &vm_type, const uint8_t &vm_version, const uint32_t &block_num) |
|
void | current_lib (const uint32_t lib) |
|
void | apply (const digest_type &code_hash, const uint8_t &vm_type, const uint8_t &vm_version, apply_context &context) |
|
void | exit () |
|
Definition at line 25 of file wasm_interface.hpp.
◆ vm_type
◆ wasm_interface()
sysio::chain::wasm_interface::wasm_interface |
( |
vm_type | vm, |
|
|
bool | eosvmoc_tierup, |
|
|
const chainbase::database & | d, |
|
|
const boost::filesystem::path | data_dir, |
|
|
const eosvmoc::config & | eosvmoc_config, |
|
|
bool | profile ) |
Definition at line 36 of file wasm_interface.cpp.
37 : my( new wasm_interface_impl(vm, eosvmoc_tierup, d, data_dir, eosvmoc_config, profile) ) {}
◆ ~wasm_interface()
sysio::chain::wasm_interface::~wasm_interface |
( |
| ) |
|
◆ apply()
Definition at line 81 of file wasm_interface.cpp.
81 {
83 return;
84#ifdef SYSIO_SYS_VM_OC_RUNTIME_ENABLED
85 if(my->eosvmoc) {
86 const chain::eosvmoc::code_descriptor* cd = nullptr;
87 try {
88 cd = my->eosvmoc->cc.get_descriptor_for_code(code_hash, vm_version);
89 }
90 catch(...) {
91
92
93 static bool once_is_enough;
94 if(!once_is_enough)
95 elog(
"SYS VM OC has encountered an unexpected failure");
96 once_is_enough = true;
97 }
98 if(cd) {
99 my->eosvmoc->exec.execute(*cd, my->eosvmoc->mem,
context);
100 return;
101 }
102 }
103#endif
105 }
std::function< bool(const digest_type &code_hash, uint8_t vm_type, uint8_t vm_version, apply_context &context)> substitute_apply
◆ code_block_num_last_used()
void sysio::chain::wasm_interface::code_block_num_last_used |
( |
const digest_type & | code_hash, |
|
|
const uint8_t & | vm_type, |
|
|
const uint8_t & | vm_version, |
|
|
const uint32_t & | block_num ) |
Definition at line 73 of file wasm_interface.cpp.
73 {
74 my->code_block_num_last_used(code_hash,
vm_type, vm_version, block_num);
75 }
◆ current_lib()
void sysio::chain::wasm_interface::current_lib |
( |
const uint32_t | lib | ) |
|
◆ exit()
void sysio::chain::wasm_interface::exit |
( |
| ) |
|
Definition at line 107 of file wasm_interface.cpp.
107 {
108 my->runtime_interface->immediately_exit_currently_running_module();
109 }
◆ indicate_shutting_down()
void sysio::chain::wasm_interface::indicate_shutting_down |
( |
| ) |
|
◆ validate()
void sysio::chain::wasm_interface::validate |
( |
const controller & | control, |
|
|
const bytes & | code ) |
|
static |
Definition at line 41 of file wasm_interface.cpp.
41 {
42 const auto& pso = control.db().get<protocol_state_object>();
43
45 const auto& gpo = control.get_global_properties();
47 return;
48 }
50 try {
57 }
58
59 wasm_validations::wasm_binary_validation validator(control,
module);
60 validator.validate();
61
63
64
65
66
67 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
void serialize(Stream &stream, U8 &i)
void validate(const bytes &code, const whitelisted_intrinsics_type &intrinsics)
@ configurable_wasm_limits
◆ vm_type_string()
static std::string sysio::chain::wasm_interface::vm_type_string |
( |
vm_type | vmtype | ) |
|
|
inlinestatic |
Definition at line 34 of file wasm_interface.hpp.
34 {
35 switch (vmtype) {
36 case vm_type::eos_vm:
37 return "sys-vm";
38 case vm_type::eos_vm_oc:
39 return "sys-vm-oc";
40 default:
41 return "sys-vm-jit";
42 }
43 }
◆ substitute_apply
The documentation for this class was generated from the following files: