Skip to content
Logo

new Rollup()

Opens the rollup device and initializes the outputs merkle tree.

On riscv64 (inside the Cartesi Machine) the constructor opens the real machine IO device; elsewhere it starts libcmt's mock driver, configured by the CMT_INPUTS / CMT_DEBUG environment variables (see Testing on the Host).

Usage

import {  } from "@cartesi/rollup";
 
const  = new ();

Behavior

  • The device is exclusive: while an instance is open, constructing another throws with error.errno === -16 (EBUSY). Call close first.
  • On the mock, CMT_INPUTS is read once, at construction time — set it before creating the instance.

Errors

ConditionError
Device already openRollupError with errno: -16 (EBUSY)
Device unavailable / driver failureRollupError with the negative errno in errno and the libcmt call in syscall