Skip to content

Correct Soroban transaction resource, TTL, and SAC XDR references - #2655

Open
ElliotFriend wants to merge 2 commits into
mainfrom
raven/soroban-tx-xdr-reference
Open

Correct Soroban transaction resource, TTL, and SAC XDR references#2655
ElliotFriend wants to merge 2 commits into
mainfrom
raven/soroban-tx-xdr-reference

Conversation

@ElliotFriend

Copy link
Copy Markdown
Contributor

Batch fix for three Raven-reported drifts in the Soroban transaction/XDR reference docs. All claims verified against current stellar-xdr (curr) and stellar-core behavior before editing.

Changes

Transaction resource field names (#2596)

Protocol 23+ renamed the resource fields, but the reference docs still used the old names — and one example was runtime-broken as a result.

  • stellar-transaction.mdxSorobanResources now uses diskReadBytes (was readBytes); SorobanTransactionData now shows the current layout: the ext union first, then resources, then resourceFee (was refundableFee + a trailing ExtensionPoint). Added the referenced SorobanResourcesExtV0 so the block is self-contained. Prose updated to match.
  • create-restoration-footprint-js.mdx — the JS example constructed xdr.SorobanResources({... readBytes ...}) and ext: new xdr.ExtensionPoint(0), which throws at serialization against current js-stellar-base. Now uses diskReadBytes and xdr.SorobanTransactionDataExt(0). Walkthrough bullet updated.
  • state-archival.mdx, fees-resource-limits-metering.mdx — swept the same stale readBytes / refundableFee prose references.

(The issue's "enforcement phases" half cites no concrete wrong sentence, so that speculative rewrite is intentionally out of scope.)

Multi-entry ExtendFootprintTTLOp guidance (#2597)

extend-persistent-entry-js.mdx claimed you "cannot combine extensions for different ledger entries in a single transaction." Current ExtendFootprintTTLOpFrame iterates every entry in the read-only footprint. The real constraint is the single shared extendTo offset — entries needing different targets are what require separate operations/transactions. Reworded to match; the existing two-transaction example is now framed as the different-target case.

SAC executable identity XDR terminology (#2613)

Design-era XDR names in stellar-transaction.mdx and stellar-asset-contract.mdx no longer match stellar-xdr:

  • CONTRACT_EXECUTABLE_TOKENCONTRACT_EXECUTABLE_STELLAR_ASSET
  • CONTRACT_ID_FROM_ASSETCONTRACT_ID_PREIMAGE_FROM_ASSET
  • HashIDPreimage::ENVELOPE_TYPE_CONTRACT_ID_FROM_ASSETHashIDPreimage::ENVELOPE_TYPE_CONTRACT_ID (the FROM_ASSET preimage now nests under it)

Also qualified the issuer/admin relationship: the asset issuer is only the initial administrator, and authority is mutable via set_admin.

Closes #2596
Closes #2597
Closes #2613

🤖 Generated with Claude Code

Fixes three Raven-reported drifts in Soroban transaction/XDR reference docs,
verified against current stellar-xdr (curr) and stellar-core behavior.

#2596 — transaction resource field names:
- SorobanResources uses diskReadBytes (not readBytes); SorobanTransactionData
  uses resourceFee with the ext union first (not refundableFee + ExtensionPoint)
- fixes the runtime-broken JS restoration example (readBytes / ExtensionPoint)
- sweeps prose in state-archival and fees-resource-limits-metering

#2597 — ExtendFootprintTTLOp extends every read-only footprint entry; the real
constraint is one shared extendTo, not one key per transaction.

#2613 — current XDR enums: CONTRACT_EXECUTABLE_STELLAR_ASSET,
CONTRACT_ID_PREIMAGE_FROM_ASSET, ENVELOPE_TYPE_CONTRACT_ID; issuer is only the
initial (mutable) SAC administrator.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 21, 2026 15:00
@ElliotFriend ElliotFriend added the raven issues discovered by Stellar Raven QA passes label Jul 21, 2026

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

Updates Soroban resource, TTL, and SAC documentation to current XDR terminology and behavior.

Changes:

  • Renames obsolete resource and SAC XDR fields.
  • Corrects multi-entry TTL-extension guidance.
  • Clarifies mutable SAC administration.

Blocking findings include a still-unusable restoration example, contradictory TTL example, stale XDR link, and incomplete resolution of issues #2596 and #2613.

Recommendation: NEEDS-CHANGES — Address the stored review comments.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
docs/tokens/stellar-asset-contract.mdx Updates SAC XDR and administrator terminology.
docs/learn/fundamentals/fees-resource-limits-metering.mdx Renames the declared resource-fee field.
docs/learn/fundamentals/contract-development/storage/state-archival.mdx Renames the disk-read resource field.
docs/learn/fundamentals/contract-development/contract-interactions/stellar-transaction.mdx Updates current transaction and SAC XDR layouts.
docs/build/guides/archival/extend-persistent-entry-js.mdx Revises multi-entry TTL guidance.
docs/build/guides/archival/create-restoration-footprint-js.mdx Updates JavaScript XDR construction.

Comment thread docs/tokens/stellar-asset-contract.mdx Outdated
Comment thread docs/learn/fundamentals/fees-resource-limits-metering.mdx Outdated
Comment thread docs/learn/fundamentals/contract-development/storage/state-archival.mdx Outdated
Comment thread docs/build/guides/archival/extend-persistent-entry-js.mdx Outdated
Comment thread docs/build/guides/archival/create-restoration-footprint-js.mdx
Comment thread docs/tokens/stellar-asset-contract.mdx
@stellar-jenkins-ci

Copy link
Copy Markdown

- extend-persistent-entry: replace the two-transaction split with a real
  single-operation combined-footprint example (setReadOnly([entry, footprint]))
  so it matches the corrected multi-key/same-target guidance (#2597)
- create-restoration-footprint: add a caution that the zeroed diskReadBytes/
  writeBytes/resourceFee are placeholders and a real restore must populate them
  via simulation or it fails with RESTORE_FOOTPRINT_RESOURCE_LIMIT_EXCEEDED
- stellar-asset-contract: repoint the stale pinned [contract_id] link to the
  current XDR (curr); add SAC on-chain identification guidance
  (SCContractInstance.executable == CONTRACT_EXECUTABLE_STELLAR_ASSET,
  name()/symbol() after verification, provenance limits)
- fees-resource-limits-metering: distinguish the pre-apply declared-resourceFee
  check from apply-time refundable metering
- state-archival: soften diskReadBytes wording to "serialized size"

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@stellar-jenkins-ci

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

raven issues discovered by Stellar Raven QA passes

Projects

None yet

2 participants