Skip to content

Document sponsored account creation and merge sponsorship blockers - #2657

Merged
ElliotFriend merged 3 commits into
mainfrom
raven/sponsorship-merge-blockers
Jul 22, 2026
Merged

ElliotFriend merged 3 commits into
mainfrom
raven/sponsorship-merge-blockers

Conversation

@ElliotFriend

Copy link
Copy Markdown
Contributor

Fixes #2590. The account-lifecycle docs presented the ordinary unsponsored path as if it were universal and under-documented current account-merge behavior. All claims verified against CAP-0033 and stellar-core CreateAccountOpFrame / MergeOpFrame.

Changes

Sponsored account creation (CAP-0033)

  • create-account.mdx — the 1-XLM minimum is now framed as the ordinary, self-funded path, with a note that a sponsored account can be created with startingBalance = 0 (the sponsor carries the two base reserves).
  • lumens.mdx — the minimum-balance section now notes sponsorship can cover an account's own base reserves, not just its subentries.
  • sponsored-reserves.mdx — added a note on the BeginSponsoringFutureReserves → CreateAccount → EndSponsoringFutureReserves pattern for 0-balance creation.

Account merge blockers

  • Horizon account-merge.mdx result-codes page — was missing ACCOUNT_MERGE_IS_SPONSOR (-7) entirely; added it. Also clarified ACCOUNT_MERGE_HAS_SUB_ENTRIES: the blockers are non-signer subentries (trustlines, offers, data entries), while signers — including sponsored signers — are removed automatically during the merge.
  • list-of-operations.mdx — added the same clarification to the Account Merge description, and sharpened the HAS_SUB_ENTRIES / IS_SPONSOR row descriptions. (The full result-code table here already listed -7; the Horizon page did not.)

The key correction: the blocking relationship is asymmetric — an account that is sponsoring reserves for others cannot merge, but merely being sponsored is not a blocker, and signer-only accounts merge fine.

Closes #2590

🤖 Generated with Claude Code

…2590)

The account-lifecycle docs presented the unsponsored path as universal and
under-documented current account-merge behavior.

Sponsored creation (CAP-0033):
- create-account guide: the 1-XLM minimum is the ordinary self-funded path;
  a sponsored account can be created with startingBalance=0
- lumens minimum-balance and the sponsored-reserves guide now note that
  sponsorship can cover an account's own base reserves, not just subentries

Account merge (verified against stellar-core MergeOpFrame):
- Horizon account-merge result-codes page was missing ACCOUNT_MERGE_IS_SPONSOR
  (-7); added it, and clarified that non-signer subentries block a merge while
  signers (including sponsored signers) are removed automatically
- list-of-operations account-merge section gains the same clarification;
  refined the HAS_SUB_ENTRIES and IS_SPONSOR row descriptions

Closes #2590

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings July 21, 2026 15:07
@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

Documents sponsored zero-balance account creation and clarifies account-merge sponsorship blockers.

Changes:

  • Adds sponsored account creation guidance.
  • Expands account-merge result-code documentation.
  • Clarifies automatic signer removal during merges.

Recommendation: NEEDS-CHANGES — distinguish active sponsorship relationships from existing reserve obligations and address the undated reserve value.

Reviewed changes

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

Show a summary per file
File Description
docs/learn/fundamentals/transactions/list-of-operations.mdx Clarifies merge blockers and result codes.
docs/learn/fundamentals/lumens.mdx Explains sponsored account reserves.
docs/data/apis/horizon/api-reference/errors/result-codes/operation-specific/account-merge.mdx Adds the missing sponsor result code.
docs/build/guides/transactions/sponsored-reserves.mdx Documents zero-balance account creation.
docs/build/guides/transactions/create-account.mdx Adds the sponsored creation path.

- ACCOUNT_MERGE_IS_SPONSOR now documents both Core conditions across all three
  surfaces (list-of-operations prose + table row, Horizon result-code page):
  (1) already sponsoring reserves (numSponsoring > 0) -> revoke sponsorships;
  (2) an open is-sponsoring-future-reserves relationship in the same
  transaction -> end it with EndSponsoringFutureReserves (nothing to revoke)
- create-account: frame the 1 XLM minimum as a derived current value of two
  base reserves and defer to the linked minimum-balance section for the live
  value, since validators can change the base reserve

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@kaankacar

Copy link
Copy Markdown
Contributor

Verified on the preview build and against primary sources:

  • All 5 changed pages render correctly on the preview; the Horizon account-merge result-codes page now shows the op_is_sponsor / ACCOUNT_MERGE_IS_SPONSOR row (absent on production, so this genuinely fills the gap).
  • Protocol claims checked directly against stellar-core: MergeOpFrame blocks on numSubEntries != signers.size() (so non-signer subentries are the blocker and signer-only accounts merge), returns ACCOUNT_MERGE_IS_SPONSOR in exactly the two cases described (open is-sponsoring-future-reserves relationship via the sponsorship counter, or numSponsoring > 0), and removes remaining signers via removeSignerWithPossibleSponsorship. CreateAccountOpFrame::doCheckValid allows startingBalance = 0 from protocol 14.
  • CAP-0033 (Sponsored Reserve, Final, protocol 14/15) confirmed at the linked URL; Horizon's internal/codes/main.go confirms the op_is_sponsor string.
  • Links are relative per repo convention; the asymmetry framing (sponsoring blocks, being sponsored doesn't) matches core behavior.

Fully resolves #2590. LGTM.

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

Verified rendering on the preview build and every protocol claim against stellar-core source, CAP-0033, and Horizon's result-code mapping. Correct and complete fix for #2590.

@ElliotFriend
ElliotFriend merged commit 294d453 into main Jul 22, 2026
9 checks passed
@ElliotFriend
ElliotFriend deleted the raven/sponsorship-merge-blockers branch July 22, 2026 16:54
@gre3n3yes34

gre3n3yes34 commented Aug 7, 2026 via email

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

Development

Successfully merging this pull request may close these issues.

Document sponsored account creation and merge sponsorship blockers

4 participants