Skip to content

vmSkip #167

@filip-parity

Description

@filip-parity

Existing zkVmSkip available here as example for grooming this task:

/// When running in zkEVM context, skips the next CREATE or CALL, executing it on the EVM instead.
/// All `CREATE`s executed within this skip will automatically have `CALL`s to their target addresses
/// executed in the EVM and need not be marked with this cheatcode at every usage location.
function zkVmSkip() external pure;

Proposed Cheat Code for PVM

  • Function Name: pvmSkip
  • Signature:
function pvmSkip() external pure;
  • Purpose: When in PVM context, skips the next CREATE or CALL operation, executing it in EVM instead. Contracts deployed during the skip have subsequent CALLs automatically executed in EVM, without requiring repeated skip markers.
  • Parameters: None.
  • Example Usage:
// In PVM context
vmExt.pvmEnable(true);
new Contract(1); // Deployed in PVM (WASM)
vmExt.pvmSkip();
new Contract(2); // Deployed in EVM
new Contract(3); // Deployed in PVM (WASM)
// For a contract deployed in a skip
polka2.increment(); // Automatically executed in EVM

Please decide how to handle pvm/evm skip as the pallet-revive support both VMs

Estimation: 10D

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions