Description
When rs-dapi-client cannot build a channel, for example because the address's host is not a valid TLS server name, it returns a locally made gRPC status Status::invalid_argument (packages/rs-dapi-client/src/transport/grpc.rs:59-62, also :80 and :112; from transport/tonic_channel.rs:72 and :102-112). The executor returns that before any RPC is sent (dapi_client.rs:1210-1256).
A host can't tell that apart from a node's own InvalidArgument refusal of the request:
- rs-sdk-ffi maps a gRPC
InvalidArgumenttoInvalidParameter(feat(sdk): read contract moderation and fee pots in the Swift SDK and example app #6056), so a broken channel configuration reads as a bad request rather than a configuration or network problem. - platform-wallet's refusal check treats the same status as a node refusal (
broadcast_was_refused, rs-platform-wallet/src/wallet/shielded/operations.rs:7583).
Proposal: give rs-dapi-client a typed local-setup error variant at the transport boundary, where the origin is known. The FFI and wallet can then classify it as a configuration/network failure, and treat only a status a node actually returned as a refusal.
Tests:
- a channel construction failure;
- a node's RPC refusal (
InvalidArgument); - a proved absence (
MissingDependency).
Each should get its own classification.
Activity
QuantumExplorer commentedon Nov 22, 2026
Another local cause to cover, from the #6056 review: an empty native trust store.
SSL_CERT_FILEpointing to an empty bundle (and noSSL_CERT_DIR), or a Linux host without a CA bundle, rustls-native-certs loads zero certificates. tonic then returnsNativeCertsNotFound(tonic 0.14.6src/transport/channel/service/tls.rs:85-96) before it adds the bundled roots, even for a valid hostname.Status::invalid_argument(transport/grpc.rs:27,59,79,111), dropping the source, so rs-sdk-ffi reports it asInvalidParameter, though changing the request will not help.create_channelcompileswith_native_roots()out for iOS, tvOS, watchOS and Android (transport/tonic_channel.rs:46-54).Two parts to the fix:
create_channel: when the build with native roots fails, retry with the bundled roots only. The comments attonic_channel.rs:37-38,45already describe that behaviour. It changes TLS setup for every native consumer, so it should get its own PR.fix(sdk): name the record and field of a refused kept value and test …