Skip to content

Add gated StellarValue arms for millisecond close times - #316

Merged
SirTyson merged 1 commit into
stellar:mainfrom
SirTyson:ms-close-time
Aug 20, 2026
Merged

Add gated StellarValue arms for millisecond close times#316
SirTyson merged 1 commit into
stellar:mainfrom
SirTyson:ms-close-time

Conversation

@SirTyson

@SirTyson SirTyson commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Adds millisecond resolution closeTime. The goal here was to be the least disruptive as possible. We could just re-interpret the closeTime value as ms on a protocol upgrade, but it would be a pain for downstream systems, and every block-explorer and indexer with full history would need to support the change moving forward.

Instead, I've just added an additional field that will represent the ms component of close time. If downstream systems ignore this change (assuming they still pick up the new XDR library), it's fine, as they just don't reason in ms, but the whole second component remains unchanged.

Adds two new StellarValue ext arms, gated behind MS_CLOSE_TIME:

  • STELLAR_VALUE_SIGNED_MS = 3{ uint32 closeTimeMs; LedgerCloseValueSignature lcValueSignature; }
  • STELLAR_VALUE_EMPTY_TX_SET_MS = 4 — the empty-tx-set shape (CAP-0083) plus closeTimeMs

closeTimeMs carries the millisecond component of the ledger close time, range [0, 999]; the existing whole-second closeTime field keeps its semantics for all existing consumers.

Adds STELLAR_VALUE_SIGNED_MS and STELLAR_VALUE_EMPTY_TX_SET_MS ext arms
that carry a closeTimeMs component (the millisecond part of closeTime,
[0, 999]), mirroring the existing SIGNED and EMPTY_TX_SET arms. Gated
behind MS_CLOSE_TIME so curr is unaffected; next picks them up via the
standard feature-enabled generation.
Copilot AI balanced review requested due to automatic review settings August 20, 2026 00:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds feature-gated millisecond-resolution close times to StellarValue.

Changes:

  • Adds signed and empty-transaction-set millisecond variants.
  • Includes closeTimeMs in both new union arms.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@SirTyson
SirTyson merged commit 96cbfc3 into stellar:main Aug 20, 2026
6 checks passed
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.

3 participants