Skip to content

Auto-delete TransactionProposal when its TicketSequence is consumed - #7955

Open
ckeshava wants to merge 19 commits into
XRPLF:ripple/cosignfrom
ckeshava:cosign-auto-delete-proposal
Open

Auto-delete TransactionProposal when its TicketSequence is consumed#7955
ckeshava wants to merge 19 commits into
XRPLF:ripple/cosignfrom
ckeshava:cosign-auto-delete-proposal

Conversation

@ckeshava

@ckeshava ckeshava commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

What

Implements XLS-0103 §4.5 automatic cleanup: whenever the target account applies a transaction that consumes a Ticket, a TransactionProposal keyed to that ticket can never execute, so the ledger deletes it and releases the reserve it holds against its Owner.

How

  • The cleanup lives at the end of Transactor::ticketDelete, the single choke point for Ticket removal, so one piece of code covers the successful path, the tec claimed-fee path (reset()), and AccountDelete's ticket sweep. Gated on the Cosign amendment.
  • The deletion routine is a shared deleteProposal() helper in ProposalHelpers, for reuse by the future TransactionProposalCancel/TransactionProposalSign cleanup paths (XLS-0103 §6.4).

Tests

New TransactionProposalAutoDelete suite (8 cases): the proposal's own completed transaction executing; an unrelated ticket spend; another account's same-numbered ticket (survives); a tec result still deleting; a proposed Batch's larger reserve refund; an inner-batch-transaction ticket spend; deletion of the target account; proposer == target aliasing; and the owner-deletion blocker (tecHAS_OBLIGATIONS) that keeps the AccountDelete sweep safe.


Builds on #7887 (TransactionProposalCreate); the change belonging to this PR is the top commit.

🤖 Generated with Claude Code

Kassaking7 and others added 18 commits July 24, 2026 18:18
Per XLS-0103 §4.5, whenever the target account applies a transaction
that consumes a Ticket, any TransactionProposal keyed to that ticket
can never execute, so the ledger deletes it and releases the reserve it
holds against its Owner. The cleanup lives in Transactor::ticketDelete,
the single choke point for Ticket removal, so it covers the successful
path, the tec claimed-fee path, and AccountDelete's ticket sweep alike,
and is gated on the Cosign amendment.

The deletion routine is a shared ProposalHelpers entry point so the
future TransactionProposalCancel and TransactionProposalSign cleanup
paths (XLS-0103 §6.4) reuse it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@ckeshava
ckeshava force-pushed the cosign-auto-delete-proposal branch from ad6d86f to c5d07f9 Compare August 4, 2026 22:05
Batch failure modes (discard, failed-inner, partial), delegated and
fee-sponsored spends, ticket-funded TicketCreate, expired proposals,
directory integrity, and multi-page owner directories.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.46341% with 14 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...transactors/proposal/TransactionProposalCreate.cpp 86.3% 14 Missing ⚠️

📢 Thoughts on this report? Let us know!

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