-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
UTxO RPC Spec v0.18.1 Feature Support Tracking
This issue tracks which features from the UTxO RPC spec v0.18.1 are currently implemented in the Rust SDK.
Legend
- ✅ Implemented
- ❌ Not Implemented
⚠️ Needs Update (breaking change in spec)
SyncService
| Method | Status | Notes |
|---|---|---|
FetchBlock |
✅ | SyncClient::fetch_block() |
DumpHistory |
✅ | SyncClient::dump_history() |
FollowTip |
✅ | SyncClient::follow_tip() - returns LiveTip stream |
ReadTip |
✅ | SyncClient::read_tip() |
TipEvent Actions
- ✅
Apply- handled - ✅
Undo- handled - ✅
Reset- handled
QueryService
| Method | Status | Notes |
|---|---|---|
ReadParams |
✅ | QueryClient::read_params() |
ReadUtxos |
✅ | QueryClient::read_utxos() |
SearchUtxos |
✅ | QueryClient::search_utxos() / match_utxos() |
ReadData |
❌ | Not implemented - Read datum by hash |
ReadTx |
✅ | QueryClient::read_tx() |
ReadGenesis |
✅ | QueryClient::read_genesis() |
ReadEraSummary |
✅ | QueryClient::read_era_summary() |
SubmitService
| Method | Status | Notes |
|---|---|---|
EvalTx |
❌ | Not implemented |
SubmitTx |
Takes Vec<B>, returns Vec<NativeBytes> - spec changed to single tx |
|
WaitForTx |
✅ | SubmitClient::wait_for_tx() |
ReadMempool |
❌ | Not implemented - Get mempool snapshot |
WatchMempool |
✅ | SubmitClient::watch_mempool() - returns MempoolStream |
WatchService
| Method | Status | Notes |
|---|---|---|
WatchTx |
Implemented but idle action not handled |
WatchTxResponse Actions
- ✅
Apply- handled - ✅
Undo- handled - ❌
Idle- ReturnsOk(None)instead of propagating (new in 0.18.x)
Design Notes
Generic Chain Trait
The Rust SDK uses a generic Chain trait that allows supporting multiple blockchains:
pub trait Chain {
type ParsedBlock;
type ParsedTx;
type ParsedUtxo;
type Intersect;
type UtxoPattern;
// ...
}Currently only Cardano implements this trait. This is a good design that allows future multi-chain support.
Type Aliases
CardanoSyncClient = SyncClient<Cardano>CardanoQueryClient = QueryClient<Cardano>CardanoSubmitClient = SubmitClient<Cardano>CardanoWatchClient = WatchClient<Cardano>
Summary
Missing Features (Priority)
EvalTx- Evaluate transaction without submitting (get execution units)ReadData- Read datum by hashReadMempool- Get mempool snapshotIdleaction handling - Block progress signal in WatchTx
Breaking Changes to Address
SubmitTxchanged from repeated tx to single tx in spec- Current implementation:
submit_tx(txs: Vec<B>) -> Result<Vec<NativeBytes>> - Spec expects: single tx in, single ref out
- Consider adding
submit_single_tx()or updating signature
- Current implementation:
WatchedTx Idle Handling
In WatchedTxStream::event() (lib.rs:625-646), the idle action case is missing:
match res.action {
Some(Action::Apply(tx)) => { ... }
Some(Action::Undo(tx)) => { ... }
// Missing: Some(Action::Idle(block_ref)) => { ... }
None => Ok(None),
}The idle action provides a no-match signal with a BlockRef, useful for:
- Tracking chain progress when no matching txs are found
- Implementing reliable synchronization logic
cc @SonicSwordcane
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo