Contract Startup Process#
GenVM is started with “message”
GenVM receives contract code for recipient address from Host
GenVM inspects contract code to find construct a file tree of it
If contract code is a zip it is equivalent to tree
- If it is a plain-text contract, then GenVM tries to parse “runner comment” from it (as of now,
#,//,--are supported), and constructs following tree:
/file = <original file>, /runner.json = <parsed comment>
- If it is a plain-text contract, then GenVM tries to parse “runner comment” from it (as of now,
It acts upon
/runner.jsonprovided actionsIn the end this actions must lead to
StartWasmoneGenVM starts wasm, with
stdinof calldata-encoded ExtendedMessageFor startup contract must use following fields:
entry_kindone of main, sandbox and consensus_stage.Main means regular contract entry, sandbox stands for sandbox and consensus_stage has
entry_stage_dataused for non-deterministic operation
entry_datablob of bytesentry_stage_datacalldata information provided by “consensus implementation”.Right now it is
nullfor leader and{leaders_result: <calldata>}for validator