Crates.io | radix-engine |
lib.rs | radix-engine |
version | 1.2.0 |
source | src |
created_at | 2024-03-20 12:01:39.418262 |
updated_at | 2024-05-17 13:43:49.987193 |
description | Reference implementation of Radix Engine, from the Radix DLT project. |
homepage | |
repository | https://github.com/radixdlt/radixdlt-scrypto |
max_upload_size | |
id | 1180415 |
size | 3,075,304 |
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".
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 Blueprints Scrypto Blueprints |
||
VM | 4 | "Virtual CPU" | Application Execution | WASM + Scrypto API | VM | |
System | 3 | "Operating System" | Type Checking Package/Blueprint/Object semantics Application Standardization (e.g. Authorization, Versioning) |
Substate API Object API Blueprint API Costing API |
System Callback API | System |
Kernel | 2 | "I/O Device Management" | Call Frame Message Passing Ownership/Reference handling State Virtualization Mechanism Substate Device Management Transaction Execution |
Kernel API | Kernel Callback API | Kernel |
Database | 1 | "Persistence" | Runtime Read-Only Physical Storage | Substate Database | InMemoryDB RocksDB |
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 semantics Blueprint Fields and Collections Blueprint Typing |
Kernel | 2 | Node/Partition/Substate semantics Substate Ownership/References |
Database | 1 | Key/Value Database |