Skip to content

[RFC] Delayed transaction broadcast, reworked - #29

Closed
optout21 wants to merge 5 commits into
masterfrom
2611-scheduled-broadcast2
Closed

optout21 wants to merge 5 commits into
masterfrom
2611-scheduled-broadcast2

Conversation

@optout21

@optout21 optout21 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

TODO
reworked to locktime based

Core support for scheduled private broadcast:
- Add an optional release height to submitted transactions;
  `release_height` field added to `TxBroadcastInfo` and `TxSendStatus`
- Add ReleaseDue() to release the scheduled transactions whose release
  height has been reached by the given block height
- Adapt logic to handle scheduled submission (Add, Remove, etc.):
  a transaction is not sent before it is released, has no planned
  sends to cancel on Remove(), and is forgotten by MarkResolved()
- Measure staleness from the time of release
Only send scheduled transactions after the active chain reaches their
release height. A periodic task, similar to ReattemptPrivateBroadcast(),
releases the transactions that became due, re-validates them, and
requests connections for the ones that are still valid.
If set, and private broadcast is enabled (prerequisite), the broadcast of
the submitted transaction is scheduled for the block height
nLockTime + delay_after_lock_time. Only height-based lock times are
supported. If the release height has already been reached, the
transaction is broadcast immediately.

A scheduled transaction is validated at submission. If it is rejected
only as TX_PREMATURE_SPEND (e.g. its nLockTime is in the future), it is
still accepted, as it may become valid by its release height; the checks
that ATMP did not get to are then only done at release, when the
transaction is fully validated again.
getprivatebroadcastinfo shows the release height of scheduled
transactions.
@optout21
optout21 force-pushed the 2611-scheduled-broadcast2 branch from de13a4c to acd697c Compare November 3, 2026 07:52
@optout21

optout21 commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

--> bitcoin#36429

@optout21 optout21 closed this Nov 3, 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.

1 participant