pub trait DeterministicVM {
// Required methods
fn execute(
&self,
bytecode: &[u8],
inputs: VMInputs,
signatures: &[Vec<u8>],
) -> Result<VMOutputs, VMError>;
fn validate_outputs(
&self,
inputs: &VMInputs,
outputs: &VMOutputs,
) -> Result<(), VMError>;
}Expand description
The DeterministicVM trait defines the interface for CSV contract execution.
Any VM implementing this trait must guarantee:
- The same bytecode + inputs always produce the same outputs
- No access to external state (time, network, random, etc.)
- Bounded execution (no infinite loops)