You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the retry vector of #1586 (attempt count) is left to each integrator, which act differently, so a relay can tell wallets apart by retry behavior.
already in place: retries are freshly re-encapsulated (each create_*_request builds a new ohttp::ClientRequest, never resending bytes); outer relay failures already fail over to another relay; and the lib splits the directory's inner response via is_fatal() into fatal (4xx) vs transient (5xx).
per @nothingmuch: a relay must not be able to tell a retry from a first attempt, whatever the cause, the traffic it sees is the same whether or not you're retrying.
gap:
transient directory errors aren't retried (message requests): the lib signals a 5xx as a transient transition, but no caller acts on it, payjoin-cli maps it to Err and stops the poll loop. this is the case @nothingmuch flags as the one that matters: it should retry, freshly built (already holds); a byte-identical resend would leak the prior failure to the relay.
no shared retry policy to converge on: attempt-count diverge per integrator
plan:
retry the transient (5xx) directory outcome with a fresh request via the normal poll (not a failover), a directory fault is not a relay failure, so do not mark_failed or fail over (switching relays won't fix a same-directory error and would burn asmap should be used for relay selection #919 windowed relays); leave fatal (4xx) non-retried: Resume v2 polling on transient directory errors #1671
add a sans-io retry_policy() pure-function governing attempt-count and which error classes retry (transient yes, fatal no), shared so integrators converge
make "rebuild, never resend" contractual and expose retry_policy() over uniffi so the bindings converge.
the retry vector of #1586 (attempt count) is left to each integrator, which act differently, so a relay can tell wallets apart by retry behavior.
already in place: retries are freshly re-encapsulated (each
create_*_requestbuilds a newohttp::ClientRequest, never resending bytes); outer relay failures already fail over to another relay; and the lib splits the directory's inner response viais_fatal()into fatal (4xx) vs transient (5xx).per @nothingmuch: a relay must not be able to tell a retry from a first attempt, whatever the cause, the traffic it sees is the same whether or not you're retrying.
gap:
payjoin-climaps it toErrand stops the poll loop. this is the case @nothingmuch flags as the one that matters: it should retry, freshly built (already holds); a byte-identical resend would leak the prior failure to the relay.plan:
mark_failedor fail over (switching relays won't fix a same-directory error and would burn asmap should be used for relay selection #919 windowed relays); leave fatal (4xx) non-retried: Resume v2 polling on transient directory errors #1671retry_policy()pure-function governing attempt-count and which error classes retry (transient yes, fatal no), shared so integrators convergeretry_policy()over uniffi so the bindings converge.