Skip to content

Protocol 30 (CAP-0088) - #5998

Closed
sisuresh wants to merge 10 commits into
stellar:protocol-nextfrom
sisuresh:p30-cap-0088
Closed

sisuresh wants to merge 10 commits into
stellar:protocol-nextfrom
sisuresh:p30-cap-0088

Conversation

@sisuresh

@sisuresh sisuresh commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Changes

  • ingest/ledger: NodeID and Signature read the close-value signature from every signed StellarValue arm:
    • the CAP-0088 millisecond arms STELLAR_VALUE_SIGNED_MS and STELLAR_VALUE_EMPTY_TX_SET_MS, which every ledger after the Protocol 30 upgrade uses
    • STELLAR_VALUE_EMPTY_TX_SET (CAP-0083), which was previously missed, so ledgers closed with an empty transaction set returned an error and no signature
  • Whole-second CloseTime and its consumers are unchanged; no millisecond fields are exposed.

The XDR regeneration this PR originally carried (stellar-xdr 03cbf40c, XDR_FEATURES=MS_CLOSE_TIME, TimePointMilliseconds) is replaced by #6015's regeneration from stellar-xdr 4f524bba. That commit ungates CAP-0088 and uses the upstream TimePointMs name.

Stacked on #6015; shows its commits until it merges.

Out-of-scope observations

  • ingest/ledger/ledger_test.go ledgerTestInput() sets GeneralizedTransactionSet{V: 0}, an invalid discriminant, so the fixture cannot be marshalled. Not fixed here; the tests exercise NodeID/Signature directly and round-trip ScpValue alone.

@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.

sisuresh and others added 10 commits September 23, 2026 14:01
Adds the SC_ADDRESS_TYPE_MUXED_CONTRACT arm of SCAddress. Also picks up the
widened contract spec name limits from upstream.
Adds the W... muxed contract strkey (vectors from rs-stellar-strkey@80085faa)
and handles the new ScAddress arm in String() and Equals().
Match stellar-core stellar#5472's protocol-curr/xdr. Only CAP-0087 ifdef'd cost types differ from 01741cb6, and they stay disabled.
Contract balances aren't derivable from contractData, so C... holders were
already skipped; W... addresses are contracts too.
A CAP-0084 muxed contract destination is recorded on contract_credited the way
account_muxed/account_muxed_id record a muxed account.
stellar-xdr main ungates CAP-0084, CAP-0087 and CAP-0088 (stellar#319, stellar#320, stellar#321),
so XDR_FEATURES is now empty. This brings in the CAP-0088 millisecond
close-time StellarValue arms, without which no ledger after the P30 upgrade
decodes, and the CAP-0087 ML-DSA cost types.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The 'bad checksum' W vector differed from a valid address only in the unused
padding bit, so it was rejected as non-canonical before the CRC was checked.
Keep it as a non-canonical case and add a vector with a real CRC mismatch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A SAC transfer to a muxed destination (CAP-0067 M, CAP-0084 W) carries
{amount, to_muxed_id} as its data. parseBalanceChangeEvent only accepted a
bare i128 and, because an earlier assignment had cleared err, returned a
zero amount with a nil error. Read the amount from the map form and return
ErrNotBalanceChangeEvent when there is no amount.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
NodeID and Signature read only the SIGNED arm. Read the signature from the
CAP-0088 millisecond arms (SIGNED_MS, EMPTY_TX_SET_MS), which every ledger
after the Protocol 30 upgrade uses, and from the CAP-0083 EMPTY_TX_SET arm,
which was previously missed so empty ledgers returned an error.

Based on stellar#5998, rebased onto the stellar-xdr@4f524bba regeneration and
renamed to the upstream TimePointMs type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tamirms

tamirms commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Folded into #6015, which is now the single Protocol 30 PR. This PR's ingest/ledger commit (174b61f) is now on #6015's branch unchanged; its XDR regeneration was already superseded by #6015's regeneration from stellar-xdr 4f524bba.

@tamirms tamirms closed this Oct 8, 2026
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.

2 participants