fix(vss): bound retry budget so builds fail fast when VSS is unreachable - #4
Merged
Merged
Conversation
Each HTTP request is already capped at 10s by vss-client's client-level timeout, but the retry policy allowed 100 attempts with up to 180s of cumulative backoff, so a single VSS operation could keep build_with_dual_store blocked for several minutes — long past the mobile caller's watchdog timeout, which then abandons the build in a still-live thread over the shared storage dir. Cap retries at 6 attempts / 30s total delay (worst case roughly one minute per operation) and stop retrying AuthError, which cannot succeed without new credentials.
…ptions Note that the tuning assumes ZEUS's dual-store fixed-header deployment, that the 30s max-total-delay is only a safety cap, and that the AuthError skip is wrong for lnurl-auth deployments where header-provider token fetches can fail transiently.
kaloudis
added a commit
to kaloudis/zeus
that referenced
this pull request
Jul 30, 2026
Picks up ZeusLN/ldk-node#4: VSS retry budget cut from 100 attempts/180s to 6 attempts/30s so dual-store builds against an unreachable VSS server error out in about a minute — well inside the restore watchdog — instead of leaving an orphaned build thread behind, and AuthError responses are no longer retried. Android .so files are larger than the previous release's because those were built with an older stable rustc (toolchain was upgraded midway through the previous release build); this release is built uniformly with rustc 1.97.1. APK size is unaffected as Gradle strips symbol tables at packaging.
29 tasks
kaloudis
added a commit
to kaloudis/zeus
that referenced
this pull request
Jul 31, 2026
Picks up ZeusLN/ldk-node#4: VSS retry budget cut from 100 attempts/180s to 6 attempts/30s so dual-store builds against an unreachable VSS server error out in about a minute — well inside the restore watchdog — instead of leaving an orphaned build thread behind, and AuthError responses are no longer retried. Android .so files are larger than the previous release's because those were built with an older stable rustc (toolchain was upgraded midway through the previous release build); this release is built uniformly with rustc 1.97.1. APK size is unaffected as Gradle strips symbol tables at packaging.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each HTTP request is already capped at 10s by vss-client's client-level timeout, but
retry_policy()allowed 100 attempts with up to 180s of cumulative backoff — a single VSS operation could keepbuild_with_dual_store*blocked for several minutes. On mobile, that outlives the caller's watchdog timeout (180s on restore), which then abandons the build in a still-live thread over the shared storage dir — the root enabler of the timeout/cleanup race flagged in ZeusLN/zeus#4292 review.Changes:
AuthError— auth rejections (e.g. clock skew) cannot succeed on retry without new credentialscargo checkclean. Follow-up release + binary bump handled on the ZEUS side.🤖 Generated with Claude Code
Trade-offs
AuthErrorskip assumes fixed-header auth (deterministic server rejection, e.g. clock skew). Header-provider failures also map toAuthError, so an lnurl-auth deployment — where token fetches can fail transiently and succeed on retry — should not adopt this skip. Documented in the code comment.build_with_vss_store(not used by ZEUS): exhausted persist retries there can be fatal to LDK, so that deployment would want a larger budget. Also documented in the code comment.