Some untested ideas for other Proof of Work scripts:
decodescript 82013d0146a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac
{
"asm": "OP_SIZE 61 70 OP_WITHIN OP_VERIFY 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 OP_CHECKSIG",
"desc": "raw(82013d0146a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac)#mes5v53f",
"type": "nonstandard",
"p2sh": "2Mw2fy8vwiyUKhVFrrD6VzXUahLTwr6P2nZ",
"segwit": {
"asm": "0 55582b7319de48ac18d654fba1400d417fa9249e3ba454fdb033b8937f5363d7",
"desc": "addr(tb1q24vzkucemey2cxxk2na6zsqdg9l6jfy78wj9fldsxwufxl6nv0tspelg8s)#5rzugfva",
"hex": "002055582b7319de48ac18d654fba1400d417fa9249e3ba454fdb033b8937f5363d7",
"address": "tb1q24vzkucemey2cxxk2na6zsqdg9l6jfy78wj9fldsxwufxl6nv0tspelg8s",
"type": "witness_v0_scripthash",
"p2sh-segwit": "2NEBNyCcTMriMw346rwgvQ7yxPHZ5PUQVUH"
}
}
Assuming standardness rules are enforced properly, and signatures should be minimal, or they are otherwise invalid, it should give an incentive to grind alternative points to half of the generator:
+--------+----------------------------------------------------------------+--------------------------------------------------------------------------------------+
| Number | Address | Script |
+--------+----------------------------------------------------------------+--------------------------------------------------------------------------------------+
| 70 | tb1q24vzkucemey2cxxk2na6zsqdg9l6jfy78wj9fldsxwufxl6nv0tspelg8s | 82013d0146a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 69 | tb1qg57rdw4sl24cddmxghwd0dewgkzh55nracgfycz57hgzt0dsadhsz4wq6a | 82013d0145a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 68 | tb1q777srl54ha3mauekxvz9p3qlvcz92za66p2lhc3gnnrp37ljcjasryuegs | 82013d0144a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 67 | tb1qd07mp98yc2n9vna7ue0fk7645ecuf54uzn8rm08m8zj5u778hexspncvqd | 82013d0143a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 66 | tb1qzvsxvwf4d6fcmsx7v6jj7xmwdtwr9knjud95gsndr3e5cmgsgwpqlky0z5 | 82013d0142a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 65 | tb1qxstamf0k9c89m7gmk5fknxsr2qwxgtdlljp2q4mm3m76l95plp3qx05ge2 | 82013d0141a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 64 | tb1q6eefcrmcfu4uh05luuejmhfq2u3c5qmwytlmcc9kylccvlqfdelsdsrdvh | 82013d0140a569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 63 | tb1qwluz4cqyu0nrm0cyrg94hp9y48z3lr4h6g9faa9afkr04lhtvuas73z02z | 82013d013fa569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 62 | tb1qk53l375y9pw84dcddx4sxax7dy6k08udzm8nt5dqwldhxtuck56qaamcw8 | 82013d013ea569210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
| 61 | tb1qxydp6gqyttdn55n57czq3w9q79v7vgdtgh7j3u33flhepwglskas506hqj | 82013d88210279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798ac |
+--------+----------------------------------------------------------------+--------------------------------------------------------------------------------------+
And also, some hash-based Proof of Work:
+------------+----------------------------------------------------------------+--------+
| Function | Address | Script |
+------------+----------------------------------------------------------------+--------+
| RIPEMD-160 | tb1q7l4c7xqjnc5uxzawu0nu7tld8g7209xcmv8xqj0ks8844jf9cstsz8ule9 | a67cac |
| SHA-1 | tb1qwaarn9ss7znnrqr44r2jrku43nc3w38xvmarf7pecpj9uqpccguqvzpn9y | a77cac |
| SHA-256 | tb1qx6ylc8wx4t0cu40tdy7d49zntjxwrk0tusmg7c9p22aprzlu9e7s58cm30 | a87cac |
| OP_HASH160 | tb1qesygpz74dkk94xqh7fhu368m5mycxaurap7rlcdgjt9l6spwf46ql0gu2p | a97cac |
| OP_HASH256 | tb1q3dzkf4xr7c4sg9d3hz8a0j45mdkuztsvrqjf2lp0z2r30ugj3f4s7d4sn3 | aa7cac |
+------------+----------------------------------------------------------------+--------+
In this case, some message is hashed first, and then, the hash should form a valid DER signature, which means grinding something around 56 bits (maybe a bit less, because there are six valid sighashes, so it is more like 54-bit hash).
decodescript a67cac
{
"asm": "OP_RIPEMD160 OP_SWAP OP_CHECKSIG",
"desc": "raw(a67cac)#03cp3pdm",
"type": "nonstandard",
"p2sh": "2N56nsSzfvJTvdtXmfyRg8PiUDD9X4BrkFD",
"segwit": {
"asm": "0 f7eb8f18129e29c30baee3e7cf2fed3a3ca794d8db0e6049f681cf5ac925c417",
"desc": "addr(tb1q7l4c7xqjnc5uxzawu0nu7tld8g7209xcmv8xqj0ks8844jf9cstsz8ule9)#hltrrgm6",
"hex": "0020f7eb8f18129e29c30baee3e7cf2fed3a3ca794d8db0e6049f681cf5ac925c417",
"address": "tb1q7l4c7xqjnc5uxzawu0nu7tld8g7209xcmv8xqj0ks8844jf9cstsz8ule9",
"type": "witness_v0_scripthash",
"p2sh-segwit": "2MzT76E56RTHJVcjjMZG5dUe8XC56Dj5hdT"
}
}
Edit: It seems that picking a given difficulty can be delegated. For example:
Input: <puzzleSignature> <sponsorSignature>
Output: OP_SIZE OP_TOALTSTACK <sponsorKey> OP_CHECKSIGVERIFY OP_SIZE OP_FROMALTSTACK OP_LESSTHAN OP_VERIFY <puzzleKey> OP_CHECKSIG
Execution:
<puzzleSignature> <sponsorSignature>
<puzzleSignature> <sponsorSignature> <sponsorSignatureSize>
<puzzleSignature> <sponsorSignature>
<puzzleSignature> <sponsorSignature> <sponsorKey>
<puzzleSignature>
<puzzleSignature> <puzzleSignatureSize>
<puzzleSignature> <puzzleSignatureSize> <sponsorSignatureSize>
<puzzleSignature> OP_TRUE
<puzzleSignature>
<puzzleSignature> <puzzleKey>
OP_TRUE
And then, sponsor can sign a given transaction, and the solver has to provide a signature, which would take less bytes. Which means, that solver's signature is 256 times harder to generate than sponsor's signature. Also, the size of the required signature can be chosen dynamically. For example:
Input: <sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <sig6>
Output:
<key6> OP_CHECKSIG OP_DUP OP_ADD OP_TOALTSTACK
<key5> OP_CHECKSIG OP_FROMALTSTACK OP_ADD OP_DUP OP_ADD OP_TOALTSTACK
<key4> OP_CHECKSIG OP_FROMALTSTACK OP_ADD OP_DUP OP_ADD OP_TOALTSTACK
<key3> OP_CHECKSIG OP_FROMALTSTACK OP_ADD OP_DUP OP_ADD OP_TOALTSTACK
<key2> OP_CHECKSIG OP_FROMALTSTACK OP_ADD OP_DUP OP_ADD OP_TOALTSTACK
<key1> OP_CHECKSIG OP_FROMALTSTACK OP_ADD OP_10 OP_ADD OP_TOALTSTACK
OP_SIZE OP_FROMALTSTACK OP_LESSTHAN OP_VERIFY <puzzleKey> OP_CHECKSIG
Execution:
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <sig6>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <sig6> <key6>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <range(0,1)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <range(0,1)> <range(0,1)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <range(0,2)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <sig5> <key5>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <range(0,1)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <range(0,1)> <range(0,2)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <range(0,3)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <range(0,3)> <range(0,3)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <range(0,6)>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4>
<sigPuzzle> <sig1> <sig2> <sig3> <sig4> <key4>
<sigPuzzle> <sig1> <sig2> <sig3> <range(0,1)>
<sigPuzzle> <sig1> <sig2> <sig3> <range(0,1)> <range(0,6)>
<sigPuzzle> <sig1> <sig2> <sig3> <range(0,7)>
<sigPuzzle> <sig1> <sig2> <sig3> <range(0,7)> <range(0,7)>
<sigPuzzle> <sig1> <sig2> <sig3> <range(0,14)>
<sigPuzzle> <sig1> <sig2> <sig3>
<sigPuzzle> <sig1> <sig2> <sig3> <key3>
<sigPuzzle> <sig1> <sig2> <range(0,1)>
<sigPuzzle> <sig1> <sig2> <range(0,1)> <range(0,14)>
<sigPuzzle> <sig1> <sig2> <range(0,15)>
<sigPuzzle> <sig1> <sig2> <range(0,15)> <range(0,15)>
<sigPuzzle> <sig1> <sig2> <range(0,30)>
<sigPuzzle> <sig1> <sig2>
<sigPuzzle> <sig1> <sig2> <key2>
<sigPuzzle> <sig1> <range(0,1)>
<sigPuzzle> <sig1> <range(0,1)> <range(0,30)>
<sigPuzzle> <sig1> <range(0,31)>
<sigPuzzle> <sig1> <range(0,31)> <range(0,31)>
<sigPuzzle> <sig1> <range(0,62)>
<sigPuzzle> <sig1>
<sigPuzzle> <sig1> <key1>
<sigPuzzle> <range(0,1)>
<sigPuzzle> <range(0,1)> <range(0,62)>
<sigPuzzle> <range(0,63)>
<sigPuzzle> <range(0,63)> 10
<sigPuzzle> <range(10,73)>
<sigPuzzle>
<sigPuzzle> <sigPuzzleSize>
<sigPuzzle> <sigPuzzleSize> <range(10,73)>
<sigPuzzle> OP_TRUE
<sigPuzzle>
<sigPuzzle> <puzzleKey>
OP_TRUE
Of course, pre-signing a transaction with a given address is much easier, but by exploring such examples, I am curious, what else can be built on top of it. Because I didn't expect, that the result of OP_CHECKSIG can be used as a number. And that also means, that OP_CHECKLOCKTIMEVERIFY, and OP_CHECKSEQUENCEVERIFY can be also executed on top of some OP_CHECKSIG result, which means, that it is possible to use dynamically picked locktime.
Edit: OP_WITHIN works fine, but people should be aware, that range from 61 to 70 means "greater or equal than 61, and less than 70". Which means, that "within 61 and 62" is the same as "equal to 61", and tb1qk53l375y9pw84dcddx4sxax7dy6k08udzm8nt5dqwldhxtuck56qaamcw8 is as hard to move as tb1qxydp6gqyttdn55n57czq3w9q79v7vgdtgh7j3u33flhepwglskas506hqj (which I didn't expect). But anyway: it works! See:
https://mempool.space/testnet4/tx/5266048f001ffb92d5a00f0c5b197e8d103f15a94478744cbe38d96b30968f05