TAPROOT, the next bitcoin evolution

Serving your script fresh

Merkle Tree, Schnorr signatures

How Bitcoin works today and what taproot improves for the future

Example

if $ = 0 then sendto A else sendto B
  • without taproot using classical hash256 function
output = hash256(“if $ = 0 then sendto A else sendto B”)
  • with taproot the hash function is slightly more complex, to prevent from a few known attack schemes :
output = hash(hash(hash(hash(if $=0)+hash(then))+hash(hash(sendto)+hash(A)))+hash(hash(else)+hash(hash(sendto)+hash(B)))
The values of the green bubbles are actually fingerprints that does not leak their meanings
  • the script if $ = 0 then sendto A else sendto B
  • The input $ so when it is executed. If you send $=0, then the funds are sent to A, otherwise the funds are sent to B
  • If you want to send the fund to A, in order to rebuild and validate the merkle tree, you must include
- 'if $=0'
- 'then'
- 'sendto'
- 'A'
- H = hash(hash(else)+hash(hash(sendto)+hash(B)))
- $ = 0
You don’t publish anything meaningful about B, only a hash
  • If you want to send the fund to B, in order to rebuild and validate the merkle tree, you must include
- 'if $=0'
- H1 = hash(then)
- H2 = hash(hash(sendto)+hash(A))
- 'else'
- 'sendto'
- 'B'
- $ = 1
Nothing meaningful about A, only 2 hashes
  HASH160 DUP <R-HASH> EQUAL
IF
"24h" CHECKSEQUENCEVERIFY
2DROP
<Alice's pubkey>
ELSE
<Commit-Revocation-Hash> EQUAL
NOTIF
"Timestamp" CHECKLOCKTIMEVERIFY DROP
ENDIF
<Bob's pubkey>
ENDIF
CHECKSIG
1 - HASH160 <R-HASH> EQUALVERIFY "24h" CHECKSEQUENCEVERIFY <Alice's pubkey> CHECKSIGVERIFY2 - HASH160 <Commit-Revocation-Hash> EQUALVERIFY <Bob's pubkey> CHECKSIGVERIFY3 - "Timestamp" CHECKLOCKTIMEVERIFY <Bob's pubkey> CHECKSIGVERIFY

Schnorr Signatures for better privacy

What you can do with taproot

--

--

--

I do crypto my own way

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Bunicorn Monthly Highlight — July 2021

Why PLUGChain is a strong competitor on NFTs versus Solana and Ethereum

What is POLLEN ?

Dear Blockchain, You Were Not the First Decentralized Network.

Thinkium distributed business

The Worth of $RELI: What is the Importance of our Governance Token?

Battle of Nodes: Songs of Valor

Hot Wheels NFT Garage Series 1 Coming to WAX

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
FX Thoorens

FX Thoorens

I do crypto my own way

More from Medium

Are Stablecoins Like EurPlus(EURP) the Answer to All Crypto Problems?

Ethereum :Digital oil powering the next gen of the internet

YOU CAN PAY WITH BITCOIN AND OTHER CRYPTO CURRENCIES IN GUCCI STORES

Bitcoin Part 1: Understanding Money