XE-16989 · Bounty
[Low] SDK structs silently drop server fields: GetProviders, GetPending, GetChain, ChatChallenge
Report
Summary
Four SDK structs silently drop fields the server sends, so SDK/CLI users cannot see data the API already provides: provider lease-count caps and ad staleness, pending-send timestamps, chain block finality, and chat-challenge expiry.
Root Cause (one finding, 4 instances)
max_concurrent_leases+timestamp: servernode.ProviderInfo(node/node.go:1092, 11 fields) vs SDKclient.ProviderInfo(client/client.go:178, 9 fields). SDK/CLI provider selection cannot see the lease-count cap or ad staleness.Timestamp: serverpendingEntry(api/handler.go:579) enriches every pending send with the send block's timestamp; SDK decodes intocore.PendingSend(core/types.go), which has no Timestamp field.finalized: server wraps chain blocks inblockView(api/handler.go:509, embeds*core.Block+Finalized); SDK decodes into plain[]*core.Block, so callers cannot tell finalized from unfinalized blocks.expires_at: serverhandleChatChallenge(api/chat_auth.go:134) returnschallenge+expires_at(120s TTL); SDKChatChallenge(client/chat.go:45) reads onlychallenge, so callers cannot know when the proof expires.
Verification
Executed PoC against the real api.Handler (httptest + fake backend):
raw /providers body contains "max_concurrent_leases":5,...,"timestamp":1700000000000000000
— client.ProviderInfo has MaxConcurrentLeases/Timestamp fields: false (struct has 9 fields, server sends 11)
raw /pending/... body contains "Timestamp":1700000000000000000 — core.PendingSend has Timestamp field: false
raw chain block has "finalized":true (SDK decodes into plain []*core.Block)
raw challenge has expires_at (SDK reads only challenge; TTL invisible to caller)
Note on related reports
Searched GetProviders timestamp max_concurrent_leases, pending Timestamp client, finalized GetChain client drops, client SDK drops fields — no hits. #277 is docs-only (notes the server Timestamp exists; does not cover the SDK struct gap). #567 (conflict 10-cap) is unrelated.
Suggested fix
Add the missing fields to the SDK structs (ProviderInfo, PendingSend, chain block view, ChatChallenge response).
Thread
Joseph Denneteam2026-11-22 23:26 UTCdesk
Thanks for the report. It is being handled.