If you're familiar with taproot, a taproot output is

tweak(internal_pubkey, fancy_hash(taptree)) (the result of this is also a pubkey)

When you spend with the taptree (script path) your witness (spending info) includes that `internal_pubkey` which takes up 32 bytes. It's a very important part of validating a script spend, but it's also kind of 32 wasted bytes.

OP_INTERNALKEY just pushes those 32 bytes of pubkey onto the stack so you can use it in your script. (32:1 compression ratio for a public key used in your scripts!)

It's not always usable, but it often is, nice, significant space savings.

Reply to this note

Please Login to reply.

Discussion

No replies yet.