AntelopeIO / eos-vm

Other
6 stars 10 forks source link

Use a single execution context per wasm interface (per thread) instead of per contract #19

Closed linh2931 closed 1 year ago

linh2931 commented 1 year ago

Change Description

A part of https://github.com/eosnetworkfoundation/product/issues/149.

Currently an execution context is created in a backend object for each contract, and cached (inside the backend) in wasm_instantiation_cache in the wasm interface object per thread. This wastes physical memory and prevents a single compiled WASM contract code shared across threads.

This PR provides an option to decouple execution context from backend, while keeps the existing behavior for backward compatibility.

Resolves https://github.com/AntelopeIO/leap/issues/1456.

API Changes

Documentation Additions