Skip to content

Protocol 30 (CAP-0088) - #5998

Draft
sisuresh wants to merge 1 commit into
stellar:protocol-nextfrom
sisuresh:p30-cap-0088
Draft

sisuresh wants to merge 1 commit into
stellar:protocol-nextfrom
sisuresh:p30-cap-0088

Conversation

@sisuresh

Copy link
Copy Markdown
Contributor

Changes

  • Bump XDR_COMMIT to stellar-xdr 03cbf40c and set XDR_FEATURES = MS_CLOSE_TIME; regenerate xdr/, gxdr/ and the view types. Regen is required, not cosmetic — the view types reject unknown union discriminants, so LedgerCloseMetaView would hard-fail on any ledger using the new arms.
  • ingest/ledger NodeID/Signature now accept STELLAR_VALUE_SIGNED_MS identically to STELLAR_VALUE_SIGNED. Whole-second closeTime and its consumers are unchanged; no ms fields are exposed.

Out-of-scope observations

  • ingest/ledger/ledger.go does not read the signature from the STELLAR_VALUE_EMPTY_TX_SET arm's proposedValue.lcValueSignature (pre-existing, CAP-0083). Left as-is so EMPTY_TX_SET_MS behaves identically — see PR comment.
  • ingest/ledger/ledger_test.go ledgerTestInput() sets GeneralizedTransactionSet{V: 0}, an invalid discriminant, so the fixture cannot be marshalled. Not fixed here; the new test round-trips ScpValue alone.

Upstream: stellar-xdr 03cbf40cec4d89f82171bf895ef7598458d83e1b (merged to main; ahead 4 / behind 0 of the previous pin).
Downstream: stellar-horizon, stellar-rpc, galexie repin via go get once this merges.

Bump XDR_COMMIT to stellar-xdr 03cbf40c and enable the MS_CLOSE_TIME
feature gate, which adds STELLAR_VALUE_SIGNED_MS / STELLAR_VALUE_EMPTY_TX_SET_MS
to StellarValueType and the matching StellarValue.ext arms carrying
TimePointMilliseconds closeTimeMs.

Regeneration is mandatory rather than cosmetic: the generated view types
reject unknown union discriminants, so every LedgerCloseMetaView walk would
hard-fail on a ledger using the new arms.

ingest/ledger NodeID/Signature read the signature out of the ext union and
previously matched only STELLAR_VALUE_SIGNED, silently reporting no signature
on millisecond-close-time ledgers; they now accept STELLAR_VALUE_SIGNED_MS
identically. The whole-second closeTime field and all consumers of it are
unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@sisuresh

Copy link
Copy Markdown
Contributor Author

⚠️ OUT-OF-SCOPE: ingest/ledger/ledger.go NodeID (L92) and Signature (L101) resolve the signature via the new scpValueSignature helper, which matches STELLAR_VALUE_SIGNED and STELLAR_VALUE_SIGNED_MS. Ledgers using the CAP-0083 STELLAR_VALUE_EMPTY_TX_SET arm also carry a signature, at proposedValue.lcValueSignature, and are still missed: NodeID returns an error and Signature silently reports absent for them.

Suggested fix: add GetProposedValue() / GetProposedMsValue() arms to scpValueSignature.

I did NOT change this. It predates CAP-0088, and CAP-0088 scope requires STELLAR_VALUE_EMPTY_TX_SET_MS to behave exactly like STELLAR_VALUE_EMPTY_TX_SET — handling only the millisecond variant here would have introduced a new asymmetry between the two, so both are left untouched for a follow-up that fixes the pair together.

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