Crate ultrasonic

Source
Expand description

UltraSONIC is a state machine with capability-based memory access. In simple words, this means state machine with cryptographically protected memory cells.

What is capability-based memory access (or capability-addressable memory, CAM)? The computers we all used to are random memory access machines (RAM), where software accesses freely addressable global memory. This has opened a door for all the vulnerabilities and hacks happening in computer systems across the world for the past decades… CAM model instead, divides all memory into parts (called words) addressable only with some access token (called capability). One may think of this as of a memory where each part is “owned” by a certain party and can be accessed or modified only given a proof of ownership.

UltraSONIC leverages zk-AluVM, so it is (1) zk-STARK-compatible and (2) exception-less, made with category theory in mind.

Re-exports§

pub extern crate zkaluvm as aluvm;

Modules§

stlstl
Ultrasonic strict types library.

Macros§

impl_serde_str_bin_wrapperserde
Implement serde serialize and deserialize traits for a type wrapping another type, such that it uses Display and FromStr for human-readable serialization, and binary for non-human readable.
test_serde_str_bin_wrapperserde
Testing macro for implementations of impl_serde_str_bin_wrapper.
uasm
Macro compiler for AluVM assembler.

Structs§

AuthToken
Authorization token used for controlling the destructible memory cell access.
CellAddr
Address of the memory cell.
CellLock
Custom lock conditions specific to a single destructible lock cell.
Codex
Codex is a crucial part of a contract; it provides a set of commitments to the contract terms and conditions expressed as a deterministic program able to run in SONIC computer model.
CodexId
Unique codex identifier - a commitment to all the Codex data.
ContractId
Unique contract identifier equivalent to the contract genesis commitment
ContractMeta
Metadata about the contract.
Genesis
Contract genesis.
Identity
An ASCII printable string up to 4096 chars representing identity of a developer.
Input
Operation input for a destructible (read-once) state.
IoCat
Category of operation input or output data.
Issue
Information on the issue of the contract.
Operation
Operation under a contract which may update the contract state.
Opid
Unique operation (genesis, extensions & state transition) identifier equivalent to the commitment hash
RawData
The raw data for the immutable (read-only) memory cells.
StateCell
Read-once access-controlled memory cell, defining destructible part of the contract state.
StateData
State kept in the immutable (read-only) memory cells.
UsonicCore
ALU Core extension for USONIC ISA.
VerifiedOperation
Provably verified operation, which can be constructed only by running [Codex::verify] method.
VmContext
Context object provided to the VM instance, containing references to the operation inputs and outputs.
fe256
Element of a Galois finite field.

Enums§

CallError
Contract operation verification errors returned by Codex::verify.
Consensus
Consensus (layer 1) which is used by a contract.
ContractName
Contract name.
Instr
Complete AluVM instruction set for the Ultrasonic virtual machine, which includes the following architectures:
ParseAddrErrorbaid64
Errors during parsing CellAddr from a string representation.
StateValue
A value stored in a single memory cell.
UsonicInstr
The instruction set uses iterator semantics and not random access semantic to correspond to the RISC type of the machine and not to add assumptions about abilities to access the operation state randomly. Operation state is always iterated, such that not a single state element can be missed (as long as the iterator runs to the end).

Constants§

ISA_ULTRASONIC
AluVM ISA architecture id for Ultrasonic ISA extension.
LIB_NAME_ULTRASONIC
Strict type library name for the types defined in this crate.

Traits§

LibRepo
The trait providing access to all the VM code libraries used by the contract, in both operation verification or state access conditions.
Memory
The trait, which must be implemented by a client library for a structure providing access to the valid and most recent contract state, consisting of two parts: destructible (also called read-once, or owned) and immutable (also called read-only, append-only or global).

Type Aliases§

CallId
Identifier of a contract method call.