
This is the third article in a series Deep diving in the individual era proposals that have reached a point of maturity that deserves an in -depth collapse.
Txhash and Checktxhashverify (Txhash), which was presented by Stephen Rose and Brandon Black with a non -specific number, is a “template based” era that can be seen in theory as an extension or version more advanced than Checktemplayify (CTV).
Before entering the microscopic courage of how TXHash works, let’s update parts of data in Bitcoin.
At a high level, you have the outputs, inputs and witnesses (or the cinema fence for non -secret transactions in the inputs).
Global Transactions fields:
- Release
- A sign, indicates Segwit with the value of science
- Science, refers to Segwit with the value of science
- Number of inputs
- The number of outputs
- NLOCKTIME, used in Timelocks
Each input contains:
- TXID from the previous transaction
- Vout
- Scriptsig size
- Scriptsig (if it is a non -Siguet) transaction)
- Sequence number (used for RBF promotion marks and relativity timing).
Each output contains:
- Satoshis quantity for directing
- Scriptpkyysize, the size of the text software lock
- Scriptpubkey, the actual locking program
We can ignore the field of witnesses when looking at TXHASH or Checktxhashverify where the OPCODE code does not restrict the witness’s field to maintain certain characteristics.
How do Txhash works
Both TXHASH (TAPSCRIPT only) and Checktchashverify (old text program and Tapscript have different behaviors on the stack due to the differences between the old text program and Tapscript. For the purposes of this article, these differences are not material, so we will simply ignore them.
If CTV is the code of the covenant that restricts Bitcoin out to be spent only exactly and exactly, Txhash is a super -charging version of CTV that allows you to choose and choose exactly the transaction pieces and must be spent in a completely defined way, and any pieces of treatment can be anyone who anyone wants.
It gives you the best in the two worlds, and requires doing something when spending a currency restricted to the covenant, but then allowing the user to do everything they want with the rest of the money available to them or the treatment they formulate.
This is accomplished using “TxfieldSeption”.
CTV is simply used one fragmentation for pre -determined treatment to check the time to spend time. With Txhash, you need a way to deliver parts of the information you adhere to, and what information is not. This is the TXFILDSELECTOR function.
Txfieldsect is mainly a series of guns (which can be changing in length), with each bit that reaches the fields in the treatment that the retail will be verified. This allows you to define specific fields of treatment, nlockTime, version, etc. It allows you to define specific fields of inputs and outputs, that is, to include or not the sequence number, or the previous output identifier, or Taproot supplement (TAPROOT text). Outputs, whether to adhere to Scriptpubkey, or the amount of the amount, or not. You can also select the outputs and inputs that these restrictions apply.
There is some complexity and flexibility in how to put TXFIELDSECTOR together, and you can read all the fine details here In the proposed BIP if you are interested in that, but the main point you must take away is that it allows you to choose exactly Any parts of the transaction are restricted by the covenant when someone goes to spend the comfortable output, and which parts are not, to the very granular degree.
What is txhash is useful for
First, Txhash allows you to do everything you can with CTV. So, all the value of CTV is also provided to improve coordination costs for anything currently possible with previously signed transactions by TXHash. But it is highly charging that is widely able. Instead of having to adhere to the full treatment, you can only adhere to the parts you care about.
This has great benefits directly off the bat. First of all, in managing the domain fees for the layer, dealing with Twos becomes easier to deal with it. Currently the use of the anchor outputs for the second -layer layer with settlement transactions with the child is required to pay the parents, where the transaction can spend the output unintentionally one can add to the net fees of both. TXHash only allows you to adhere to the outputs of your corresponding parties in multi -party treatment, and leave you free to do everything you want (the warning here that other things must be done to make this safe so that the third party cannot burn all your money on the fees), including a slight decrease in the RBF treatment.
Second, the door is now open to multi -party protocols to allow a granular guarantee about what transactions outside the chain are committed. Some users can now get a guarantee on how to spend their coins, but they do not pay attention to what another group of users is doing with their groups. I can be sure that Txfieldsector guarantees the treatment of my metal work properly, and I should not care about the place where anyone else goes.
In partnership with Checksgfromstack (CSFS), Txhash can facilitate the fully generalized Sighash system. Sighash is part of the signature that transmits parts of the transaction to verify the signature. They are currently:
- Sighash_all – sign all inputs and outputs
- Sighash_none – sign all inputs and no outputs
- Sighash_Single – Sign all inputs and output with the same index of this input
None of these steam flags allows the addition of any new inputs to treatment without nullifying them, but each has a copy of anything that only signs on their inputs and appropriate outputs, allowing anyone else to add new inputs, and new outputs for Anyonecanpay version of Sighash_none and Gighash_Single.
With the ability to “download” the new “TXFIELDSERORS” using CSFS, users can simulate the Sighash system that allows them to choose the individual parts of the transaction committed by the signature or not.
Txhash also allows the implementation of the value of inputs and outputs using individual TXFIELDSELECTS devices that only adhere to the field of one value of the input or output that you want to search, then ensure their fragmentation in the stack.
Final ideas
Txhash is a potentially superccharged CTV, which provides incredibly granular degree of contemplation of spending that can be incredibly strong, especially with something like CSFS.
However, this power is sufficiently expressive to open the door to incredibly large design space. One can have a physical effect on Bitcoin’s overall incentives. Things such as ensuring equality between outputs or inputs are very close to the lands of what is required for authenticable authenticity. This is a dangerous source of extractive value from mines (MEV), which was a very serious incentive and central problem for other Blockchains to deal with it.
TXHash should not be rejected at all, as it provides incredibly strong primitives for protocol developers to benefit from them, but potential effects should be evaluated when people will build with the positives.
The post Bitcoin Covenants: TXHASH And CHECKTXHASHVERIFY(BIP 346) first appeared on Investorempires.com.