Saturday, December 28, 2024

locktime – Make signed transaction invalid after specified time

It isn’t attainable to do exactly what you’re asking, however it’s attainable to attain one thing comparable in precept.

Bitcoin doesn’t have a “invalid after block peak/block time” assemble that would stop a transaction from being included if it’s not mined shortly.

Nonetheless, you can assemble an output that mirrors the identical situations.

Utilizing OP_CHECKLOCKTIMEVERIFY, you may assemble an output that may be spent by the coordinator for till a particular block peak or time, and after that solely be spent by your self.

In concept, this might additionally meet your necessities with out mining the transaction – by offering a signed transaction to your coordinator that creates such an output, they might broadcast it together with a baby transaction consuming that output.

Within the occasion that they don’t must train that bond, or the timelock has elapsed, then broadcasting it has no profit for them.

If the coordinator isn’t a nicely behaving citizen, they might topic you to a griefing assault by broadcasting it even after the timelock has elapsed, costing you transaction charges. Nonetheless, you’d nonetheless be capable of retrieve the worth of the bond as they might now not be capable of create a transaction to spend it.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles