REACTOREnglish

49 bilgi

Geliştiriciler ve CDK

10 Rialo kaynağından Geliştiriciler ve CDK hakkında 49 bilgi. Her biri Reactor'un bir sorudan sonra gösterdiği açıklama; altında dayandığı orijinal cümle (İngilizce) var.

Bu konuda Atlas'ta kendini dene

Rialo Dev Portal

Geliştirici portalı Rialo Consensus'u 50ms blok süreli, paralel ve çoklu eşzamanlı teklifçi tasarımı olarak tanımlıyor.

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

Rialo Interop güvenli, ucuz ve hızlı yerel birlikte çalışabilirlik olarak tanımlanıyor ve en iyi köprüleri 10x'ten fazla geride bırakıyor.

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

Read Path veriyi ve durum güncellemelerini indexer'lardan değil doğrudan validatörlerden sunar; gecikmenin saniyelerden 100ms'ye düşmesi bu sayede olur.

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

Rialo VM RISC-V tabanlıdır ve SVM ile uyumludur; EVM ve MoveVM ise daha sonra gelecek olarak listeleniyor.

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

REX, ZK dostu Rialo Extended Execution Runtime'ın adıdır ve geliştirici portalı onu Confidential Computing ile bağlıyor.

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

Geliştirici portalında gas gerektirmeyen yerel işlemler ve düşük ya da sıfır ücret için listelenen bileşen Rialo Cruise.

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

Rialo IPC, Identity, Privacy ve Compliance'ı yani kimlik, gizlilik ve uyumluluğu zincirin birinci sınıf yetenekleri olarak bir araya getirir.

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

Execution Engine, olay güdümlü Koşullu İşlemleri gerçek dünya dinamik iş yükleri için Hibrit Eşzamanlılık Denetimi ile birleştirir.

“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'nun en küçük birimi kelvin'dir; SDK metotları aksi belirtilmedikçe tutarları kelvin olarak alır ve döndürür.

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

Crate üç katmanlı: en üstte Rialo SDK ön yüzü, ortada RPC, işlem ve keyring modülleri, en altta tipler ve sabitler.

“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 Rialo'nun en küçük birimidir. Aksi belirtilmedikçe SDK metodları kelvin alır ve döndürür; rlo_to_kelvin ve kelvin_to_rlo dönüştürür.

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

rialo-cdk README

Rialo CDK uygulamaların Rialo ile konuşmak için kullandığı Rust crate'idir: keyring yönetimi, işlem imzalama, JSON-RPC istemcisi, program dağıtımı ve yapılandırma.

“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 0xDEAD_BEEF_CAFE_BABE'dir. Sadece dokümanlar ve testler için var; gerçek bir işlem ağdan çekilen öneki ister.

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

Bu metodlar yalnızca ham 32 baytlık gizli anahtarı alır; bazı düşük seviye API'lerin kullandığı 64 baytlık keypair (secret ++ public) önce dilimlenmeli.

“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.”

Varsayılan LoaderType LoaderV4'tür; RiscV ve RexWasmV1 with_loader_type ile açıkça seçilmeli.

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

with_occ(true) işlemi OCC zamanlayıcısından geçirir. Dokümanlar bunu yalnızca hedef program OCC'yi açıkça destekliyorsa kullanmayı söylüyor.

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

Bir REX aboneliği programın kendi başına takip işlemleri ateşlemesini sağlar; CDK bunları incelemek için get_subscription ve get_triggered_transactions sunar.

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

ClientContext bir HttpRpcClient'ı sarar ve RpcClient'ı doğrudan uygular; test ve benchmark'lara Rialo ya da ayrı bir Keyring kurulumu olmadan istemci verir.

“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 üretimi ve kurtarma BIP32/SLIP-10 HD türetmesi üzerine kurulu, bu yüzden mnemonic için hd-wallet gerekir.

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

wait_for_confirmation, request_airdrop_with_confirmation ve Rialo::airdrop wasm32 derlemelerinde tamamen dışarıda bırakılır.

“`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 m/44'/756'/ olduğundan Rialo'nun coin type'ı 756'dır ve diğer zincirlerin türetme yolları uyumlu değildir.

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

rialo-cdk docs: Architecture

CDK'daki tüm imzalama Ed25519'dur ve ed25519-dalek crate'iyle uygulanır; keyring'ler Ed25519 anahtar çiftleri tutar.

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

wallet modülü 0.2.0'dan beri kullanımdan kalktı ve artık sadece keyring'den yeniden dışa aktarım yapıyor; Wallet Keyring, WalletProvider da KeyringProvider oldu.

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

Özellik kapıları sayesinde özelliksiz derlemede ağ ya da serileştirme yok; bu, o bağımlılıkları çekmemesi gereken paylaşımlı tip crate'leri için tasarlandı.

“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

Config hash öneki replay saldırılarına karşı korur; bu yüzden her işlem kurulmadan önce canlı değeri node'dan çekilmeli.

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

valid_from milisaniye cinsinden duvar saati zaman damgasıdır. Blok yüksekliği ya da slot verirsen node'ların reddedeceği, çok geçmişte veya gelecekte işlemler çıkar.

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

AccountMeta üç alandan oluşur: pubkey, is_signer (hesap imzalamalı) ve is_writable (talimat hesabın durumunu değiştirebilir).

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

Bir işlem bir ya da daha fazla talimat içerir; her biri bir programı, ihtiyaç duyduğu hesapları ve ikili bir yükü adlandırır, TransactionBuilder bunları birleştirir.

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

İşlemler sayfası bincode özelliğini ister; borsh ise yalnızca işlem tiplerine Borsh serileştirmesi ekleyen, varsayılan olmayan isteğe bağlı bir özellik.

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

rialo-cdk docs: Programs

add_signer_account salt okunur bir imza yetkisi işaretler. Değiştirilebilir hesap için add_writable_account, tam kontrol için add_account kullanılır.

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

encrypt_secret ve encrypt_input HPKE kullanır ve oluşturucunun açık anahtarını AAD'ye bağlar; böylece TEE sırrı kimin gönderdiğini kontrol edebilir.

“`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 programları derleme sırasında üretilen bir manifest ile gelir; builder bunu okur, böylece baytları elle kodlayıp PDA türetmek yerine tipli argümanları adıyla verirsin.

“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.”

Her encrypt_secret çağrısı yeni bir geçici anahtar çifti üretir ve şifreli metin tek kullanımlıktır, bu yüzden çağrılar arasında yeniden kullanılmamalı.

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

Argümanlar build çağrıldığında manifest'e göre denetlenir; bilinmeyen, yinelenen ve eksik adlar daha hiçbir şey gönderilmeden hata verir.

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

Dağıtım parçalı yapılır: ikili bölünür, her parça kendi işlemiyle yüklenip onaylanır ve ancak ondan sonra deploy talimatı gönderilir.

“`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 varsayılan olarak get_signature_statuses'ı 1 saniye gecikmeyle en fazla 30 kez yoklar; ConfirmTransactionOptions ikisini de değiştirebilir.

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

Önek, zincir config hash'inin u64 olarak döndürülen ilk 64 bitidir ve her işlem kurulmadan hemen önce çekilmeli.

“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”

Her RpcClient metodu spec.wit'ten otomatik üretilir ve HttpRpcClient tarafından uygulanır; arayüz WIT spesifikasyonu düzenlenerek değiştirilir.

“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 tüm hesapları döker; referans, canlı ağlarda yanıt çok büyük olduğundan onu yalnızca localnet ya da devnet'te kullanmayı söylüyor.

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

send_transaction yalnızca imzalı baytları gönderip imzayı döndürür; beklemek için send_and_confirm_transaction ya da confirm_transaction kullanılır.

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

Sağlıklı bir node get_health'e "ok" dizesiyle cevap verir; başka her değer node'un bozulmuş durumda olduğunu gösterir.

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

rialo-cdk docs: Configuration

Zincir şöyle: gömülü varsayılanlar, sonra kullanıcı dosyası, sonra çalışma zamanı override'ları. Override'lar en üstte durur ve diske asla geri yazılmaz.

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

Gömülü varsayılanlar devnet'i https://api.devnet.rialo.xyz adresine yönlendirir; testnet ve mainnet için de rialo.xyz üzerinde api.testnet ve api.mainnet hostları var.

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

Config anahtarlarına yazmak file-storage özelliğini gerektirir. O olmadan set başarısız olur, değerleri çalışma zamanı override'larıyla değiştirirsin.

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

schema-validation yükleme ve kaydetme sırasında JSON Schema denetimi yapar ve bilinmeyen ağları kabul etmek yerine reddeder.

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

Config::default() URL_LOCALNET uç noktasıyla localnet'e işaret eder, verbose_mode false ve bakiyeler rlo cinsinden gösterilir.

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

rialo-cdk docs: Keyring

FileKeyringProvider keyring'leri diskte AES-GCM ile şifreli saklar ve üretim için tasarlanmıştır; InMemoryKeyringProvider test ve script'ler içindir.

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

rialo-cdk docs: Quickstart

Tam tersi: airdrop RLO'yu f64 olarak, transfer kelvin'i u64 olarak alır.

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

Quickstart önce Alice'i fonlar, sonra canlı config hash önekini ve milisaniye zaman damgasını çeker, transferi kurup 0 numaralı anahtar çiftiyle imzalar, gönderir ve onaylar.

“// 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?;”

Diğer konular