TaiwanBitdevs / TaiwanBitdevs.github.io

台灣 BitDevs Website
https://bitdevs.tw/
MIT License
2 stars 4 forks source link

📥 Add to our May Topics #6

Closed DanGould closed 1 year ago

DanGould commented 2 years ago

BIP 119 OP_CTV & activation drama

What is a Covenant:

Covenants are a category of proposed changes to Bitcoin’s consensus rules that would allow a script to prevent an authorized spender from spending to certain other scripts. —Bitcoin OpTech

How does CTV actually work? CTV takes the top item on the Bitcoin Virtual Machine's stack and verifies that the “template hash” of the current transaction matches that value. This necessarily means that if you wish to spend the coins protected by CTV, you must have known the template hash of the spending transaction before depositing funds into the CTV protected address.

Why is this? Since the template hash of the spending transaction is embedded in the script you are sending your coins to, and because hash functions are one-way, you had to know this value up front: Solving for it after the fact would be equivalent to breaking Bitcoin's mining algorithm.

As a result of this design, CTV has a property that makes it much simpler than some of the competing proposals. First, all “exit paths” of a CTV contract are known up front. This makes analysis of the safety of CTV contracts significantly easier and therefore less likely to lock your funds up forever.

Before we wrap up the discussion of how CTV works, let's talk about what goes into the “template hash,” as this is ultimately what you are having to commit to before generating the CTV contract. The template hash covers the transaction's version, locktime, number of inputs, sequence numbers, number or outputs, the hash of the outputs and values. This is every part of the transaction except the exact input IDs and the witnesses. Essentially, this means you have to know the exact transaction you want to use to spend these coins. This gives the design very little wiggle room in which there could be bugs in the design that allow for vulnerabilities. This is another reason why CTV has a much smaller surface to analyze than other proposals — Keags @ https://bitcoinmagazine.com/technical/exploring-bip119-and-changes-made-to-bitcoin

Why might this be controversial?

how we can run it now

Central African Republic makes bitcoin legal tender

Recursive Covenants

Bitcoin core 23 released with cjdns support

rust-bitcoin 0.28.0 "The Taproot Release"

LN-VPN - VPN provider with Lightning Payment

Tor Congestion Control arrives to v0.4.7

Magma: A New Channel Marketplace on Lightning

PeerSwap

DanGould commented 2 years ago

Mempool.space

Mempool is the most full it has been in one year

UST Collapse

DLCs

DLCs is to enable contracts between two parties directly on the Bitcoin blockchain that settle via a trsted oracle to determine the contract outcome.

https://github.com/discreetlogcontracts/dlcspecs/blob/master/Introduction.md

https://suredbits.com/discreet-log-contracts-part-2-how-they-work-adaptor-version/