REACTORTürkçe

49 facts

Developers and the CDK

49 facts about developers and the cdk from 10 Rialo sources. Each one is the explanation Reactor shows after a question, followed by the exact line it rests on.

Test yourself on this topic in Atlas

Rialo Dev Portal

The dev portal describes Rialo Consensus as a parallel multi-concurrent proposer design with a 50ms block time.

“Rialo Consensus High-throughput parallel multi-concurrent proposer consensus 50ms block time”

Rialo Interop is described as safe, cheap, fast native interoperability that beats top bridges by more than 10x.

“Rialo Interop Safe, cheap, fast native interoperability >10x faster than top bridges”

Read Path serves data and state updates directly from validators, not indexers, which is how latency drops from seconds to 100ms.

“Rialo Read Path Data access and state updates directly from validators, shaving latency from seconds to 100ms, cutting >$3k per month”

The Rialo VM is RISC-V based, compatible with SVM, with EVM and MoveVM listed as coming later.

“Rialo VM RISC-V, compatible with SVM (EVM, MoveVM soon to follow), ZK-friendly Rialo Extended Execution Runtime (REX) empowers Confidential Computing”

REX is the name of the ZK-friendly Rialo Extended Execution Runtime, which the dev portal ties to Confidential Computing.

“ZK-friendly Rialo Extended Execution Runtime (REX) empowers Confidential Computing”

Rialo Cruise is the component the dev portal lists for native gas-less transactions and low to zero fees.

“Rialo Cruise Native gas-less transactions Low to zero fees”

Rialo IPC bundles Identity, Privacy and Compliance as first-class capabilities of the chain.

“Rialo IPC Identity, Privacy and Compliance as first-class capabilities”

The Execution Engine pairs event-driven Conditional Transactions with Hybrid Concurrency Control for real-world dynamic workloads.

“Event-driven execution with Conditional Transactions, cutting latency from seconds to nanosecond. Hybrid Concurrency Control for real-world dynamic workload”

rialo-cdk docs: Index

Rialo's smallest unit is the kelvin; SDK methods take and return amounts in kelvin unless stated otherwise.

“Rialo uses kelvin as its base unit. 1 RLO = 1,000,000,000 kelvin.”

The crate has three layers: the Rialo SDK facade on top, RPC, transaction and keyring modules in the middle, and types and constants at the bottom.

“The crate is structured in layers: a high-level `Rialo` SDK for common operations, mid-level modules for RPC, transactions, and keyring management, and low-level primitives for types and constants.”

kelvin is Rialo's smallest unit. SDK methods take and return kelvin unless stated otherwise; rlo_to_kelvin and kelvin_to_rlo convert.

“Rialo uses **kelvin** as its base unit. 1 RLO = 1,000,000,000 kelvin.”

rialo-cdk README

rialo-cdk is the Rust crate apps use to talk to Rialo: keyring management, transaction signing, a JSON-RPC client, program deployment and config.

“The primary Rust library for building applications on the Rialo blockchain. Covers the full client-side surface: Ed25519 keyring management with optional BIP39/HD-wallet support, transaction construction and signing”

EXAMPLE_CONFIG_HASH is 0xDEAD_BEEF_CAFE_BABE. It exists only for docs and tests; a real transaction needs the prefix fetched from the network.

“`EXAMPLE_CONFIG_HASH` (`0xDEAD_BEEF_CAFE_BABE`) exists only for docs/tests and is rejected by any live node.”

Those methods take only the raw 32 byte secret; the 64 byte keypair form (secret ++ public) used by some low level APIs must be sliced first.

“keyring methods that accept a `secret_key` argument take the raw 32-byte secret only. The 64-byte `keypair` representation (secret ++ public) used in some low-level APIs must be sliced before passing to these methods.”

LoaderV4 is the default LoaderType; RiscV and RexWasmV1 must be selected explicitly with with_loader_type.

“`LoaderType` controls which on-chain loader handles the program. Pass it to `with_loader_type`; the default is `LoaderV4`.”

with_occ(true) routes the transaction through the OCC scheduler. The docs say to use it only when the target program explicitly supports OCC.

“`TransactionBuilder::with_occ(true)` opts into the optimistic-concurrency-control execution path. Use only when the target program explicitly supports OCC.”

A REX subscription lets a program fire follow up transactions on its own; the CDK exposes get_subscription and get_triggered_transactions to inspect them.

“REX subscriptions let a program trigger downstream transactions automatically.”

ClientContext wraps an HttpRpcClient and implements RpcClient directly, giving tests and benchmarks a client without the setup of Rialo or a separate Keyring.

“It is designed for benchmarks and tests where you need a minimal RPC client without the full configuration overhead of `Rialo` or `HttpRpcClient` + `Keyring` separately.”

BIP39 mnemonic generation and recovery is built on BIP32/SLIP-10 HD derivation, so mnemonic requires hd-wallet.

“| `mnemonic` | ✅ | BIP39 mnemonic generation and recovery (depends on `hd-wallet`) |”

wait_for_confirmation, request_airdrop_with_confirmation and Rialo::airdrop are all excluded on wasm32 builds.

“`wait_for_confirmation`, `request_airdrop_with_confirmation`, and `Rialo::airdrop` are excluded on `wasm32`. `getrandom` is compiled with the `js` feature automatically.”

BASE_DERIVATION_PATH is m/44'/756'/, so Rialo's coin type is 756 and derivation paths from other chains are not compatible.

“Rialo uses BIP44 coin type 756 (`BASE_DERIVATION_PATH = "m/44'/756'/"`). Paths from other chains are not compatible.”

rialo-cdk docs: Architecture

All signing in the CDK is Ed25519, implemented with the ed25519-dalek crate; keyrings hold Ed25519 keypairs.

“All signing uses ED25519 via `ed25519-dalek`. `Keyring` stores a keypair and `DerivedKeypair` holds a key derived from a BIP39 mnemonic path.”

The wallet module is deprecated since 0.2.0 and now only re-exports from keyring; Wallet became Keyring and WalletProvider became KeyringProvider.

“The `wallet` module was deprecated in 0.2.0 and replaced by `keyring`. The modules expose equivalent functionality”

Feature gating means a featureless build has no networking or serialization; it is meant for shared type crates that must not pull in those dependencies.

“Without any features, the crate compiles to a minimal set of types, constants, and error definitions — useful for shared-type crates that must not pull in network or serialization dependencies.”

rialo-cdk docs: Transactions

The config hash prefix protects against replay, so it has to be fetched live from the node before building each transaction.

“Every transaction must include a config hash prefix for replay protection. Fetch the live value from the network before building each transaction”

valid_from is a wall clock timestamp in milliseconds. Passing a block height or slot silently produces transactions far in the past or future that nodes reject.

“`TransactionBuilder::new` takes `valid_from: i64` which is **milliseconds since Unix epoch**. Do not pass a block height or slot number here”

AccountMeta has three fields: pubkey, is_signer (the account must sign) and is_writable (the instruction may change the account's state).

“| `is_writable` | `bool` | The instruction may modify account state |”

A transaction contains one or more instructions; each names a program, the accounts it needs and a binary payload, and TransactionBuilder assembles them.

“A Rialo transaction contains one or more **instructions**. Each instruction names a program, the accounts it needs, and a binary payload.”

The transactions page requires the bincode feature; borsh is an optional, non default feature that only adds Borsh serialisation for transaction types.

“This page covers building, signing, and submitting transactions with `rialo-cdk`. Requires the `bincode` Cargo feature:”

rialo-cdk docs: Programs

add_signer_account marks a read only signing authority. For a mutable account use add_writable_account, or add_account for full control.

“| `add_signer_account` | ✓ | ✗ | Read-only signing authority | | `add_writable_account` | ✗ | ✓ | Mutable account (not a signer) |”

encrypt_secret and encrypt_input use HPKE and bind the creator's public key into the AAD, letting the TEE check who sent the secret.

“`encrypt_secret` and `encrypt_input` use HPKE (Hybrid Public Key Encryption). > The creator's public key is included in the AAD so the TEE can verify the sender's identity.”

Venus programs ship a manifest generated at build time; the builder reads it so you pass typed arguments by name instead of hand encoding bytes and deriving PDAs.

“Venus programs ship a manifest (`wit/<name>-manifest.json`, generated by the build) describing each initiating function: typed parameters, the bincode layout of the instruction data, and the account list including PDA derivations.”

Each encrypt_secret call creates a fresh ephemeral keypair and the ciphertext is single use, so it must not be reused across invocations.

“Do not re-use ciphertext across invocations. Each call to `encrypt_secret` > generates a fresh ephemeral keypair; the ciphertext is single-use.”

Arguments are checked against the manifest when build is called; unknown, duplicate and missing names fail before anything is sent.

“Arguments are validated against the manifest at `build` time: unknown, duplicate, and missing names are errors.”

Deployment is chunked: the binary is split, each chunk is uploaded in its own transaction and confirmed, and only then is the deploy instruction sent.

“`ProgramDeployment::deploy()` splits the binary into chunks, uploads them in separate transactions, confirms each batch, then sends the final deploy instruction.”

rialo-cdk docs: RPC Reference

confirm_transaction polls get_signature_statuses up to 30 times with a 1 second delay by default; ConfirmTransactionOptions can change both.

“Polls `get_signature_statuses` until confirmed or the retry limit is reached. Default: 30 retries, 1 s delay.”

The prefix is the first 64 bits of the chain config hash, returned as a u64, and should be fetched right before each transaction is built.

“Returns the first 64 bits of the chain config hash as a `u64`. Required for replay protection when building transactions. Fetch this immediately before building each transaction”

Every RpcClient method is auto generated from spec.wit and implemented by HttpRpcClient, so the interface is changed by editing the WIT spec.

“This page is a complete reference for the `RpcClient` trait in `rialo-cdk`. Every method listed here is auto-generated from `spec.wit` and implemented by `HttpRpcClient`.”

get_all_accounts dumps every account; the reference says to use it only on localnet or devnet because the response is very large on live networks.

“Returns every account on the network. **Use only on localnet or devnet** — the response is very large on live networks.”

send_transaction only submits the signed bytes and returns the signature; use send_and_confirm_transaction or confirm_transaction to wait.

“Submits a serialized, signed transaction. Returns the transaction signature. Does not wait for confirmation.”

A healthy node answers get_health with the string "ok"; any other value means the node is degraded.

“Returns `"ok"` when the node is healthy. Any other value indicates a degraded state.”

rialo-cdk docs: Configuration

The chain is embedded defaults, then the user file, then runtime overrides. Overrides sit on top and are never written back to disk.

“Default (embedded TOML) → User file (TOML) → Overrides (runtime) Higher layers take precedence.”

The embedded defaults point devnet at https://api.devnet.rialo.xyz, with matching api.testnet and api.mainnet hosts on rialo.xyz.

“| RPC URL for devnet | `https://api.devnet.rialo.xyz` | | RPC URL for testnet | `https://api.testnet.rialo.xyz` |”

Writing config keys needs the file-storage feature. Without it, set fails and you change values through runtime overrides instead.

“When `file-storage` is disabled, `ConfigManager::set` returns an error. Use overrides or modify defaults at startup instead”

schema-validation runs JSON Schema checks on load and save and rejects unknown networks rather than accepting them.

“| `schema-validation` (default) | JSON Schema validation when loading/saving; rejects unknown networks |”

Config::default() points at localnet with the URL_LOCALNET endpoint, verbose_mode false and balances displayed in rlo.

“| `network` | `String` | `"localnet"` | Active network name |”

rialo-cdk docs: Keyring

FileKeyringProvider stores keyrings on disk encrypted with AES-GCM and is meant for production; InMemoryKeyringProvider is for testing and scripting.

“| `FileKeyringProvider` | AES-GCM encrypted file-backed provider (production) |”

rialo-cdk docs: Quickstart

It is the other way round: airdrop takes RLO as f64 and transfer takes kelvin as u64.

“// airdrop takes RLO as f64; transfer takes kelvin as u64 client.airdrop(2.0, None).await?; client.transfer(&recipient, 500_000_000).await?;”

The quickstart funds Alice first, then fetches the live config hash prefix and a millisecond timestamp, builds and signs the transfer with keypair 0, and sends and confirms it.

“// Fund Alice request_airdrop_with_confirmation(&rpc, &alice_kr.pubkey(), 2_000_000_000).await?; // Fetch required chain state. // valid_from is milliseconds since Unix epoch — NOT a block height. let config_hash_prefix = rpc.get_config_hash_prefix().await?; let valid_from: i64 = SystemTime::now() .duration_since(UNIX_EPOCH) .unwrap() .as_millis() as i64; let tx = TransactionBuilder::new(alice_kr.pubkey(), valid_from, config_hash_prefix) .add_transfer_instruction(&alice_kr.pubkey(), &bob_kr.pubkey(), 500_000_000) .sign_with_keypair(&alice_kr, 0)?; let sig = rpc.send_and_confirm_transaction(&tx).await?;”

Other topics