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§
- stl
stl
- Ultrasonic strict types library.
Macros§
- impl_
serde_ str_ bin_ wrapper serde
- 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_ wrapper serde
- Testing macro for implementations of
impl_serde_str_bin_wrapper
. - uasm
- Macro compiler for AluVM assembler.
Structs§
- Auth
Token - Authorization token used for controlling the destructible memory cell access.
- Cell
Addr - Address of the memory cell.
- Cell
Lock - 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. - Contract
Id - Unique contract identifier equivalent to the contract genesis commitment
- Contract
Meta - 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.
- State
Cell - Read-once access-controlled memory cell, defining destructible part of the contract state.
- State
Data - State kept in the immutable (read-only) memory cells.
- Usonic
Core - ALU Core extension for USONIC ISA.
- Verified
Operation - 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§
- Call
Error - Contract operation verification errors returned by
Codex::verify
. - Consensus
- Consensus (layer 1) which is used by a contract.
- Contract
Name - Contract name.
- Instr
- Complete AluVM instruction set for the Ultrasonic virtual machine, which includes the following architectures:
- Parse
Addr Error baid64
- Errors during parsing
CellAddr
from a string representation. - State
Value - A value stored in a single memory cell.
- Usonic
Instr - 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.