[feature] Scheduled Transaction Broadcast #34118

issue optout21 openend this issue on December 19, 2025
  1. optout21 commented at 4:44 pm on December 19, 2025: contributor

    Please describe the feature you’d like to see added.

    Overview

    In certain cases the user creating a transaction would like to broadcast it to the bitcoin network delayed, not immediately. This scheduling can be done on the client side, but it’s practical if it’s handled by the node.

    With Scheduled Transaction Broadcast the bitcoin node accepts a transaction for later broadcast, stores it, and broadcasts automatically at the specified target time.

    No response

    Describe the solution you’d like

    Details / Caveats

    Uses. Delayed transaction broadcast can be useful for/when (among others):

    • hiding the real time of transaction creation (with random delay; for non-urgent transactions)
    • there is some precondition that is expected to occur in the future (e.g. occurrence of a transaction), condition that is not possible (or desired) to be expressed in bitcoin scripts.

    Result, error check. As the actual broadcast happens later, the broadcast result – success or some error – is not available at acceptance time. Only parsing checks are done at acceptance time. The client can check the result only by monitoring the bitcoin network. Note: some checks are not possible to be done at acceptance time, as conditions may change (e.g. inputs with timelocks). (Note: it could be possible to offer an API to query for broadcast result, but that’s not planned.)

    Absolute time vs. block time. The target time can be specified as an absolute time or a block height.

    No guarantees. Delayed broadcast is best-effort, there is no delivery guarantee.

    Fee. The transaction fee is contained in the scheduled transaction, and it is not possible to be changed. In case the network fee rate goes up by the time of submission, the fee may be insufficient. CFCP can be used to bump the fee if needed.

    Retries. It is possible to specify a number of retries, and a retry period. Then the scehduled broadcast is retried accordingly in case of failure.

    Describe any alternatives you’ve considered

    Miscellaneous

    This could interfere with the feature “Broadcast own transactions only via short-lived Tor or I2P connections” (PR ##29415). This feature could be combined with this feature, to further mask the real transaction creation time, by creating the dedicated sending connection sometimes between the scheduling time and target time (randomized).

    An APIs for cancelling an unsent scheduled TX would be possible to offer as well.

    Please leave any additional context

    Implementation Details

    Scheduled transactions are kept in a separate memory structure, and are persisted to a separate file (for persistence accross restarts). The file is read at startup, and written whenever there is a relevant change to its content, and at shutdown.

    A new RPC ‘schedulerawtransaction’ is proposed, with syntax very similar to ‘sendrawtransaction’. However, the transaction is not sent rigth away, but stored for later broadcast.

    Status

    Delving discussion: https://delvingbitcoin.org/t/scheduled-delayed-transaction-broadcast/2148

    Prototype: https://github.com/optout21/sched-tx-ptoto/ https://github.com/optout21/bitcoin/tree/sched-tx-proto1 https://github.com/optout21/bitcoin/tree/sched-tx-proto0

  2. optout21 added the label Feature on Dec 19, 2025
  3. ismaelsadeeq commented at 1:28 pm on December 22, 2025: member

    In certain cases the user creating a transaction would like to broadcast it to the bitcoin network delayed, not immediately. This scheduling can be done on the client side, but it’s practical if it’s handled by the node.

    there is some precondition that is expected to occur in the future (e.g. occurrence of a transaction), condition that is not possible (or desired) to be expressed in bitcoin scripts.

    These two points are not convincing enough IMO.

    1. As you mentioned, this can be easily handled by the client.
    2. The preconditions you mentioned are unclear and a bit speculative. The specific example you gave can still be achieved from the client: we already have mechanisms for clients to query the state of the mempool, via RPC, REST, as well as push-based ZMQ notifications.

    So, conceptually, I’m ~0. This adds complexity of maintaining an additional pool of scheduled transactions on the node side for a niche use case.


github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2025-12-30 12:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me