radix-engine 1.2.0-dev

Reference implementation of Radix Engine.
docs.rs failed to build radix-engine-1.2.0-dev
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: radix-engine-1.3.0

Radix Engine

Radix Engine is the underlying execution engine designed to run DeFi-based Scrypto applications.

The architecture is heavily influenced by traditional Kernel design (though much simplified) and Rust's Ownership and Type-Checking paradigms (also much simplified). The novel idea here is in combining ideas from the two worlds, Operating System and Language, or simply "Implement Rust Semantics at the System Layer".

Architecture

Radix Engine execution is organized into 5 layers, each layer providing an API to the layer above.

Execution layers may also optionally provide a Callback API which the layer above must implement.

Execution Layer Layer ID Description Responsibilities API Callback API Implementation
Application 5 "User Space" Application Logic (e.g. Blueprints written in Scrypto) Native BlueprintsScrypto Blueprints
VM 4 "Virtual CPU" Application Execution WASM + Scrypto API VM
System 3 "Operating System" Type CheckingPackage/Blueprint/Object semanticsApplication Standardization (e.g. Authorization, Versioning) Substate APIObject APIBlueprint APICosting API System Callback API System
Kernel 2 "I/O Device Management" Call Frame Message PassingOwnership/Reference handlingState Virtualization MechanismSubstate Device ManagementTransaction Execution Kernel API Kernel Callback API Kernel
Database 1 "Persistence" Runtime Read-Only Physical Storage Substate Database InMemoryDBRocksDB

Data Abstraction

If looked at from a purely state perspective, the layers can be reduced to the following 4 layers:

Data Layer Layer ID Abstraction
Application 5 Application Interface (e.g. Amount of money in my account)
System 3 Package/Blueprint/Object semanticsBlueprint Fields and CollectionsBlueprint Typing
Kernel 2 Node/Partition/Substate semanticsSubstate Ownership/References
Database 1 Key/Value Database