Draft BIP for OP_TXHASH and OP_CHECKTXHASHVERIFY

I added a reference implementation to the BIP and also added an example implementation of a caching strategy in rust-bitcoin:

All large fields are cached individually and there are caches for the leading caches at intervals and caches for “all”. So, like you said, this means that after every large piece of information in the tx has been hashed once, the number of hashed bytes per invocation of TXHASH has clear bounds.

1 Like