Skip to content

fix: guard X Layer publisher against stale pending nonce - #36

Merged
chin0312 merged 1 commit into
mainfrom
codex/xlayer-pending-nonce-guard
Oct 6, 2026
Merged

chin0312 merged 1 commit into
mainfrom
codex/xlayer-pending-nonce-guard

Conversation

@chin0312

@chin0312 chin0312 commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Incident and cause

The first scheduler-owned canary after PR #35 returned PublicationError for NVDAx, SPYx, and AAPLx. No new Registry transactions were mined. A read-only check for the production signer showed chain 1952 reporting latest nonce=3320 but pending nonce=3316; both documented X Layer Testnet RPC endpoints returned the same four-nonce regression. The existing latest nonce includes the four confirmed SPY/AAPL vault and policy transactions. The publisher previously trusted the stale pending value when building its transaction.

Fix

The publisher now reads both nonce tags and uses max(latest, pending). Thus an RPC pending value cannot send a transaction with an already-consumed nonce, and a genuinely higher pending nonce is still respected. The existing shared publisher transaction lock remains unchanged; there is no parallel submission path.

Scope

  • Only apps/api/valtide_api/publisher.py and its publisher tests change.
  • No contract, classifier, model, frontend, manifest, scheduler, or signer changes.
  • The existing production signer was independently confirmed as authorized using the sender of a successful prior Railway NVDA publication.
  • Production publication is currently paused: AUTO_PUBLISH_ENABLED=false, PUBLISH_ENABLED=false. No canary retry or manual publish was sent while this correction is pending.

Validation

  • Publisher tests: 53 passed, including pending-below-latest and pending-above-latest cases
  • Full backend: 358 passed
  • Quant: 11 passed
  • Foundry: 26 passed
  • Ruff and compileall: passed

After exact-head CI is green, this small fix must be merged and deployed before re-enabling scheduler publication.

@vercel

vercel Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
valtide Ready Ready Preview Oct 6, 2026 7:15pm UTC

@chin0312
chin0312 merged commit b7d58c2 into main Oct 6, 2026
6 checks passed
@chin0312
chin0312 deleted the codex/xlayer-pending-nonce-guard branch October 6, 2026 20:17

This branch was successfully deployed

1 active deployment
Preview — a1cc0fdb Deployed Oct 6, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant