Mastodon Bitcoin Covenants: CHECKTEMPLATEVERIFY (BIP 119) Trending Global News - Trending Global News
0

Bitcoin Covenants: CHECKTEMPLATEVERIFY (BIP 119) Trending Global News

Share
Uncategorized

This is the first article in a series that is deep diving in the proposals of individual covenant that has reached a point of deepening at one point of maturity.

Checktempleveveriffy As I mentioned in the introduction article of this series, there are many concerns in the ecosystem about the coverage that are very flexible that are enabling things that air the very harmful consequences for bitcoins.

CTV was specially designed to tighten its abilities to avoid any of those concerns. First to understand how CTV works, we need to understand individual parts of bitcoin transactions.

This is a very high -level view of bitcoin transactions. It contains inputs, or unphet coins (UTXOS), and outputs, new unexpected coins that will create transactions when confirmed in a block. There are too many pieces that we will pass, but this is the highest level of view of the transaction structure.

Each transaction also contains a version number field for complete transactions, which reflects the prevention of new versions of rules or features. There is also a marker and flag, which are set on specific values ​​to use transactions, using segvit. This is followed by the number of input in input count, transactions. Then real inputs come.

Each input has a txid of transaction, which created the unexpected coin spent, a wout that output is being spent in that transaction, the size of the scriptsig, and scriptsig, which is going to prove the unlocking script that the input is being authorized by its locking script rules, and a sequence number is used in the end Is, which uses relative time. IE has input for a certain number of blocks or lengths of time since its construction.

The output is the next piece of count data, the number of outputs in the transaction. This is followed by a real output, which contains the amount of shatosis assigned to that output, scriptpubi size and real scriptpubki, which is a locking script for that output. Finally NlockTime Field applies a timelock value to the timstamp or block height that applies to the entire transaction.

Each segwit transaction also consists of a witness section, where each input consisted of a stack item, with script stack, how many things will be placed on the real data items to go to a size area for each item and to go to the stack.

How CTV works

CTV is an opkode that enables the most basic form of introspection and further data carrying out of all covenant proposals. This allows a script to take a pre-defined 32 byte hash and compare that against the hash of most areas of spending transactions. If the actual expenses are derived from the transaction, the transaction is invalid.

The fields for this are:

  • n version
  • nlockTime
  • Input calculation
  • A hash of all nepers
  • Output count
  • All output hash
  • Input index (location of input in transaction, first input, 2, etc.)

All these areas are not with CTV haveh, in their entirety, and with the ability to choose and choose. This is the degree of introspection, CTV enables, “The locking script of the input being spent hash the hash ish,” that is this, “that is. Hash is essentially committed to complete transactions except for the actual input. One reason is that the hash does not include inputs. To lock the output for 32 byte hash with CTV, you have to know the hash of the transaction that you are sure that it is the only way to spend it. This hash will have to be included to verify the input locked with CTV against CTV. That transaction needs to be First You make full transactions. This is not possible.

You can also nest the CTV script, ie an initial CTV script that is committed to transactions with output including CTV script. This is what allows CTV to “carry”. It all carries forward in behavior, although whatever is contained in the series of data transactions. You can do this in principle for an infinite depth, but you are limited to a finite depth in practice as the nest should be generated backwards from the end. This is because each level, or “hop”, should be the hash of transactions, for the next one, otherwise you cannot make a locking script in the first place. If you do not already know the next transaction, you cannot generate the previous one.

What is useful for CTV

CTV allows you to restrict an output so that it can be spent only by an accurate pre-defined transaction, according to the rules of consensus. Some of you must be asking what is the big thing, we can already sign the transaction. If the level of introspection is so limited that it can complete only a few which we can already have only pre-compulsion, then what is the value?

First of all, pre-stable transactions open the possibility of a holder (s) to signed new transactions and spend those coins in a different way. You have to trust that the keyrier will not do so, or will remove the key required to sign (on which you have to trust them). CTV completely removes that belief. Once the expenditure transaction is defined and the output locked for that CTV hash is made, there is no possibility of spending in another way to be applied by the consensus.

Currently, the only way around that trust is to involve themselves in pre-compulsion using multicing. Then you can be fully certain that no other legitimate transactions can be spent in a different way until you choose to sign anyone. The problem is that more people are involved, at the same time a transaction is more difficult and incredible to ensure a transaction. The previous small size This becomes a completely impractical problem to solve it firmly.

The CTV gives people a way to know that a set of transactions is committed without everyone, which is to get them online to sign at the same time. This makes the coordination process very simpler, whenever they can allow someone else to get the necessary information, and once the person has information from everyone, they can create a series of CTV transactions without someone else’s participation, and everyone can verify and everyone can be sure that the correct result is only possible.

It is incredibly valuable in itself, but CTV can also enable even more valuable things in combination with other opcodes, which we will see in the next article.

Concluding idea

CTV is a tightly banned covenant covenant that enables introspection and further data that is so limited that it is not more than the actual functionality of anything that can be done with pre–composed transactions. The price proposal is not to enable new functionality in itself, but the efficiency, scalability and safety guarantee of what can be created in the present can be greatly improved using pre—edged transactions. This alone is a major benefit for almost every current protocol using pre-stable transactions.

Here are some projects that show how well it came out and it was ascertained that this particular covenant has been compared to others:

  • A original payment pool Example By Shashinxo,
  • A CTV vault execution By James O’BirneWhich went to offer OP_VAULT (which still uses CTV).
  • Instead, a proof-off-concept port of the second-ease-based transaction-based arc implement by Steven Rouge to use CTV.
  • Sapio language By Jeremy Rubin Self, a high-level language for the construction of contracts with CTVs (supporting the use of pre-stable transactions instead).
  • A proposal for a very basic coinpool design by John Law, Timeout Trees, John Law.
  • Many others Possible protocolSuch as customized Discare Log Contracts (DLC), non-Interactive Lightning Channels one party can open without another, and even decentralized methods to pool together for miners.

CTV is an incredibly mature offer at this point, with a high value adding, and there is no risk of enabling anything to run concerns around the coven. This should not only be considered very seriously, but should have been activated years ago in my personal opinion.