Specification
Learn more about OVM Specification.
Introduction
In order to access verifiable high-performance compute resources available on Open Chain, OVM task contracts must conform to this specification.
Since OVM tasks are languague-agnostic, the runtime environment is not part of this specification, but specified in its git repository.
Specification
Name
Name of the task.
Example: ovm-cal-pi
Version
Version of the specification schema.
Example: v1.0.0
Description
Description of the task.
Example: Calculate PI
Repository
Git repository of the task runtime.
Example: https://github.com/webisopen/ovm-cal-pi
RepoTag
Semver tag or git sha of the task runtime repository.
Example: v1.0.0
License
License of the task.
Example: WTFPL
Requirement
Resources required to compute the task.
Example:
Royalty
Royalty fee rate to be collected by the task author, in basis points.
Example: 5 (equivalent to 0.05%)
ApiABIs
Declaration of the abis for request&response interfaces.
Example:
ExecMode
Execution mode for the task runtime, JIT
or PERSISTENT
.
Example: JIT: tasks are compiled by the runtime before execution. PERSISTENT: tasks require preemptive compilation to be executed instantly by available environment.
Arch
Architecture of the task runtime.
Example: ARM64 or AMD64
The Specification defines the computation task and its requirement of external compute power. To ensure proper integration between your computation task and the contract, follow the following principles:
- Input: You can pass any type of parameters to the computation task, as long as they are correctly formatted as a single bytes variable in your contract (the computation task will decode it as needed).
- Output: The task must return a single
bytes
as output, which will be further processed and, if necessary, decoded within the contract.