Add gated StellarValue arms for millisecond close times - #316
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds feature-gated millisecond-resolution close times to StellarValue.
Changes:
- Adds signed and empty-transaction-set millisecond variants.
- Includes
closeTimeMsin both new union arms.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
6 tasks
marta-lokhova
approved these changes
Aug 20, 2026
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.
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
StellarValueext arms, gated behindMS_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) pluscloseTimeMscloseTimeMscarries the millisecond component of the ledger close time, range [0, 999]; the existing whole-secondcloseTimefield keeps its semantics for all existing consumers.