Skip to content

Instantly share code, notes, and snippets.

@RobinLinus
Last active April 25, 2024 16:36
Show Gist options
  • Save RobinLinus/95de641ed1e3d9fde83bdcf5ac289ce9 to your computer and use it in GitHub Desktop.
Save RobinLinus/95de641ed1e3d9fde83bdcf5ac289ce9 to your computer and use it in GitHub Desktop.
Timelocked Proof of Work via signature length

The following script allows everyone to spend; the shorter your signature the earlier you can spend.

OP_SIZE
OP_CHECKSEQUENCEVERIFY OP_DROP

OP_CHECKSIGVERIFY

The point R = 1/2 G has the smallest known x coordinate -- x = 0x3b78ce563f89a0ed9414f5aa28ad0d96d6795f9c63. If the public key is chosen P = 1 G then the ECDSA signature becomes s=2(H(m)+x). So, the smaller H(m) the smaller s (as long as it is bigger than x ~ 2^165). Thus, the above output is spendable by the miner mining the lowest TX hash.

@VzxPLnHqr
Copy link

Not very far along yet, but I started working on a (very naive) proof of concept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment