• About
  • Advertise
  • Privacy & Policy
  • Contact
coinmarketcap.yt
Advertisement
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us
No Result
View All Result
coinmarketcap.yt
No Result
View All Result
Home Bitcoin

taproot – How to determine whether an input is of type witness_v0_keyhash or witness_v1_taproot?

coinmarketcap.yt by coinmarketcap.yt
December 15, 2022
in Bitcoin
0
btcpay – LTC Address Derivation Path from Address and Seed
0
SHARES
0
VIEWS
Share on FacebookShare on Twitter

So your question asks about inputs. The types witness_v0_keyhash and witness_v1_taproot are generally associated with outputs. However, inputs can also (sort of) be categorized by what is in the input script and/or the segregated witness.

First of all, witness_v0_keyhash outputs are of the form:

OP_0
<20-byte hash>

Whereas, witness_v1_taproot outputs are of the form:

OP_1
<32-byte hash>

But the inputs that redeem these outputs don’t necessarily have to all be of the same format.

If we look at a recent witness_v0_keyhash output, for example aa64f3a8e692e585a50d441d82f6ddc5cbc1ae33176fd645066a1de4734262e4 (output 0), we see an example of this output type. It is two fields: OP_0, followed by the 20-byte hash.

Now if we look at the input that redeemed this output, which is a27f50775ce85e02815fd9e30f9bcc242deabc1789797d24177ad757b67036f5 (input 0), we see that it is very simple. As a segregated witness transaction, it has an empty input script and nothing but a signature and a public key in the segregated witness. Almost all inputs that redeem witness_v0_keyhash outputs are of that same format. Some things to note are that it is the old-style elliptic curve signature and has a sighash byte appended to the end of it, making it a variable length signature. The public key is a 33-byte compressed public key.

Let’s compare that to a recent witness_v1_taproot output, for example 7aeb0447d99fb9755ad21846cef74a1b24bb6a75c56c85a39379c5097d230021 (output 0). It is also two fields: OP_1, followed by the 32-byte hash.

The input that redeems this output, which is 1eac74f5d124b9f5f2b606ca8f9a37dca3dddd890b66e19b6a761ec693f2467a (input 1), is even more simple. It too contains an empty input script, but the segregated witness is nothing but a 64-byte, uniform-length, signature.

But redeeming Taproot outputs can get more complicated if you start getting into script path spending. In the old days, there was P2PKH and P2SH, key vs. script methods for redeeming outputs. The data was moved to a different part of the transaction when those output types became P2WPKH and P2WSH. But with Taproot, there is one output type that accommodates both key path and script path spending. So there are many different types of inputs that are possible. These are explained in BIP 340, BIP 341 and BIP 342.

So your question asks about inputs. The types witness_v0_keyhash and witness_v1_taproot are generally associated with outputs. However, inputs can also (sort of) be categorized by what is in the input script and/or the segregated witness.

First of all, witness_v0_keyhash outputs are of the form:

OP_0
<20-byte hash>

Whereas, witness_v1_taproot outputs are of the form:

OP_1
<32-byte hash>

But the inputs that redeem these outputs don’t necessarily have to all be of the same format.

If we look at a recent witness_v0_keyhash output, for example aa64f3a8e692e585a50d441d82f6ddc5cbc1ae33176fd645066a1de4734262e4 (output 0), we see an example of this output type. It is two fields: OP_0, followed by the 20-byte hash.

Now if we look at the input that redeemed this output, which is a27f50775ce85e02815fd9e30f9bcc242deabc1789797d24177ad757b67036f5 (input 0), we see that it is very simple. As a segregated witness transaction, it has an empty input script and nothing but a signature and a public key in the segregated witness. Almost all inputs that redeem witness_v0_keyhash outputs are of that same format. Some things to note are that it is the old-style elliptic curve signature and has a sighash byte appended to the end of it, making it a variable length signature. The public key is a 33-byte compressed public key.

Let’s compare that to a recent witness_v1_taproot output, for example 7aeb0447d99fb9755ad21846cef74a1b24bb6a75c56c85a39379c5097d230021 (output 0). It is also two fields: OP_1, followed by the 32-byte hash.

The input that redeems this output, which is 1eac74f5d124b9f5f2b606ca8f9a37dca3dddd890b66e19b6a761ec693f2467a (input 1), is even more simple. It too contains an empty input script, but the segregated witness is nothing but a 64-byte, uniform-length, signature.

But redeeming Taproot outputs can get more complicated if you start getting into script path spending. In the old days, there was P2PKH and P2SH, key vs. script methods for redeeming outputs. The data was moved to a different part of the transaction when those output types became P2WPKH and P2WSH. But with Taproot, there is one output type that accommodates both key path and script path spending. So there are many different types of inputs that are possible. These are explained in BIP 340, BIP 341 and BIP 342.

Previous Post

Why Bitcoin Now: Andreas Antonopoulos and Dan Held on Bitcoin’s Monetary Policy – Ep.192

Next Post

Light Clients and Proof of Stake

coinmarketcap.yt

coinmarketcap.yt

Next Post
Dodging a bullet: Ethereum State Problems

Light Clients and Proof of Stake

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Stay Connected test

  • 23.8k Followers
  • 99 Subscribers
  • Trending
  • Comments
  • Latest
Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

Breaking Barriers: How Bitcoin Can Transform The Real Estate Industry

June 2, 2023
Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

Living in Merida Mexico – Cost of Living in Mexico – Tips for living in Mexico on a Budget

December 25, 2022
Singapore Financial Authority Orders Crypto Companies to Keep Customer Assets in Trust 

Singapore Financial Authority Orders Crypto Companies to Keep Customer Assets in Trust 

July 3, 2023
DeeLance Leads Freelancing’s Web3 Future

DeeLance Leads Freelancing’s Web3 Future

April 30, 2023
Introduction to Bitcoin: what is bitcoin and why does it matter?

Introduction to Bitcoin: what is bitcoin and why does it matter?

0
Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

Bitcoin Explained in the Bitcoin Basics Workshop CBP Prep [Free Workshop Extras – See Description]

0
Crypto Security: Passwords and Authentication – Livestream aantonop

Crypto Security: Passwords and Authentication – Livestream aantonop

0
Bitcoin for Beginners: Bitcoin Explained in Simple Terms

Bitcoin for Beginners: Bitcoin Explained in Simple Terms

0
Best Websites To Buy Gift Card With Cryptocurrency 2023

Best Websites To Buy Gift Card With Cryptocurrency 2023

September 25, 2023
Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

September 25, 2023
Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

September 25, 2023
Where Can You Do Online Shopping With Bitcoin In 2023

Where Can You Do Online Shopping With Bitcoin In 2023

September 25, 2023

Recent News

Best Websites To Buy Gift Card With Cryptocurrency 2023

Best Websites To Buy Gift Card With Cryptocurrency 2023

September 25, 2023
Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

Prices for Cobalt Used in Electric Vehicle Batteries Crash Following Oversupply from Miners

September 25, 2023
Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

Ethereum Name Service Price Prediction for Today, September 24 – ENS Technical Analysis

September 25, 2023
Where Can You Do Online Shopping With Bitcoin In 2023

Where Can You Do Online Shopping With Bitcoin In 2023

September 25, 2023
coinmarketcap.yt

© 2022 All Rights Reserved coinmarketcap.yt

Navigate Site

  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

No Result
View All Result
  • Home
  • Bitcoin
  • Blockchain
  • Ethereum
  • Market
  • Videos
  • Tools
  • Bridges
  • Privacy Policy
  • Contact Us

© 2022 All Rights Reserved coinmarketcap.yt