This is the third article series In different covenant proposals, deep divers that have reached a point of maturity for a deep breakdown.
TXHash and Checktxhashveriffy ,
Before TXHASH works, before going to its Nitti Gritti, let’s refresh the pieces of data in a bitcoin transaction.
At a high level you have output, input and witness (or script sig for non-segvit transactions in input).
Global Transaction Area:
- version
- Marker, Sigvit’s sign with a flag value
- Signs
- Input calculation
- Output count
- NlockTime, used for timelocks
Each input includes:
- TXID of previous transactions
- Vout (index) of output is being spent from that transaction
- Scriptous size
- Script
- The sequence number (RBF is used for flagging and relative timelok).
Each output includes:
- The quantity of satoshis assigned to the output
- Scriptpubkeysize, locking script size
- Scriptpubkey, real locking script
When considering TXHash or Checktxhashverfe, we can ignore the witness area because neither OPCODE disrupts the witness area to maintain some qualities.
How does txhash works
TXHASH (only tapscript) and checktxhashveriff both have different behaviors on the stack due to the difference between the Legacy script and the tapscript in both the script and tapscript. For the purposes of this article, these are not differential materials, so we are just going to ignore them.
If the CTV is a covenant opcode that interruptions the bitcoin output to spend only in a unique and absolutely defined manner, then there is a supercharged version of the TXHash CTV that lets you take and can choose what a transaction pieces are forced and it should be spent in really pre-stable way, and which pieces can be spent.
This gives you the best in both worlds, a covenant needs to do something while spending a restricted coin, but then the user allows whatever they want with the rest of the money or allow them to do the lane they are crafts.
It has been completed using ‘TXFIELDSELECTORECTOR’.
The CTV simply uses a single hash of pre-defined transactions to verify on time. With TXHash, you need a way to explain which information the hash is committed to pieces, and which pieces of information are. This is the task of TXFIELDSELECTORECTOR.
TXFIELDSELECTOR is essentially a series of bytes (which can be variable in length), which field hash is committed in a transaction with each bit communication that will be verified. This allows you to select specific fields, nlockTime, version etc. of the transaction. This lets you choose the specific field of input and output, whether the sequence number in the IE, or the previous output ID, or the taporot anx (specific datafield for tapot scripts). The output, whether it is committed to the scriptpubki, the amount, both, or neither. You can also decide which outputs and inputs apply to these restrictions.
How TXFIELDSELECOR is kept together, it has some complexity and flexibility, and you can read all the fine details Here If you are interested in the proposed BIP, but it allows you to take to overcome the main point Absolutely Which parts of the transaction are restricted by the covenant when a person goes to spend an encountilated output, and which are not there, up to a very granular degree.
What is useful for txhash
First, TXHash allows you to do everything you can do with CTV. Therefore, all the values provided by the CTV are also provided by TXHASH to customize the coordination costs of the currently possible current with pre-stable transactions. But it supercharges that capacity on a large scale. Instead of being committed to the entirety of transactions, you can be committed to parts you care.
These are two big benefits in the right theory with the bat. First, it becomes easier for layer to be dealt with band fees management for Twos. Currently the use of anchor output is required for two settlement transactions for fees-bumps layer, which pays for the child, where a transaction for parents can add to a net fee for both an output spending output. TXHash allows you to commit to the output of your counterparts only in a polynomial transaction, and whatever you want, leave you free to do (warns here to make it safe so that a third party cannot burn fees to all your funds), which involves a slight decrease in the transaction.
Second, the door is now open to the multipartery protocol to guarantee the rash can be guaranteed what off-chain transactions are doing. Some users can now get a guarantee of how their coins will be spent, but do not care what some other groups of users do with them. I may be sure that a TXFieldselector is guaranteed that my coins have been handled properly, and I don’t care where someone else’s coins go.
In combination with Checksigfromstack (CSFS), TXHASH can facilitate perfectly generalized Sighash system. The Sighash flag is a part of a signature that suggests to examine the signature against which parts of the transaction. They are currently:
- Sighash_all – Signs all input and output
- Sighash_none – Signs all input and no output
- Sighash_single – This input signs all input and output with the same index of input
None of these Sighash flags allow any new input to be added without any transaction without any transaction, but each has a version of any kind that only signs its own input and appropriate output, then allows someone to add new inputs, and for any of any of the sighash_none and sighash_single’s sighash_single. New output.
By being able to “sideload” new TXFIELDSELECTORs using CSFS, users can simulate a sighash system that allows them to choose and choose a sign for individual pieces of a transaction.
TXHash also allows to apply equality between the input and output value using individual tXFieldselectors that are only committed to the single value area of an input or output that you want to inspect, and then ensure that their hashs are similar on the stack.
Concluding idea
TXHash is a potential supercharging of CTV, which enables an incredibly granted degree of introspection of expenses transactions that can be incredibly powerful, especially in combination with something like CSFS.
However, this power is adequately expressive that it opens the door of an incredibly large design space. One that can potentially have a material impact on the overall encouragement of bitcoin. Things such as ensuring equality in output or input are getting very close to the area required for reliable automatic exchange on-chains. It is a serious source of mineral extractable value (mev), a very serious incentive and centralization problem for other blockchain.
TXHash should not be completely rejected, as this protocol provides incredibly powerful primitive to take advantage of developers, but those who will build with it should be weighed against positive.