Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion crates/nexum-runtime/src/host/impls/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ impl<T: RuntimeTypes> nexum::host::chain::Host for HostState<T> {
/// `RpcResult::Err`. This impl folds each entry independently, so a
/// failure leaves its neighbours intact; a different host could instead
/// short-circuit the batch, so SDK consumers match on each entry, not
/// on the batch call.
/// on the batch call. See ADR-0011's escape-hatch note for why the
/// WIT keeps the outer error despite it being dead here.
async fn request_batch(
&mut self,
chain_id: u64,
Expand Down
1 change: 1 addition & 0 deletions docs/adr/0011-per-interface-typed-errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@ This is a pre-1.0 wire break. CI rebuilds every module wasm on a world change, s
- Modules no longer restate their identity or prefix messages; the runtime supplies both.
- The numeric `code` and opaque `data` fields are gone. An interface that needs structured detail (the JSON-RPC code, decoded revert bytes) carries it in a typed case instead.
- Old bindings do not interoperate with the new world. Because this predates 1.0 and CI rebuilds all module wasms per world change, that break is accepted rather than shimmed.
- `chain-error`'s outer position on `request-batch` (`result<list<rpc-result>, chain-error>`) is structurally dead on the reference host: every failure - a denied method, a node revert, a transport fault - surfaces per-entry as `rpc-result::err`, folding the batch independently, so the outer `Err` arm is never returned. It stays in the WIT contract as an escape hatch for a host that cannot make that same choice - one whose batch transport can only fail atomically before dispatching any entry - not because this host needs it. See the doc comment on `chain::Host::request_batch` (`crates/nexum-runtime/src/host/impls/chain.rs`).
Loading