Skip to content

Instantly share code, notes, and snippets.

@EthanHeilman
Forked from RobinLinus/sig_pow.md
Created April 25, 2024 16:36
Show Gist options
  • Save EthanHeilman/f64111a42129ddef7bbb31dfafd99874 to your computer and use it in GitHub Desktop.
Save EthanHeilman/f64111a42129ddef7bbb31dfafd99874 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.

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