10.02.2016 Views

Bitcoin and Cryptocurrency Technologies

1Qqc4BN

1Qqc4BN

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Sidechains. The sidechains vision is that of numerous flourishing altcoins that rapidly innovate <strong>and</strong><br />

experiment, using <strong>Bitcoin</strong> as a sort of reserve currency. As of 2015 it is only a proposal, but one that is<br />

being actively worked on <strong>and</strong> has serious traction in the <strong>Bitcoin</strong> community. The proposal is still in<br />

flux, <strong>and</strong> we’ll take the liberty to simplify some details for pedagogical purposes.<br />

The obvious but impractical way to extend <strong>Bitcoin</strong> to allow converting coins from a sidechain back to<br />

bitcoins is this: encode all of the sidechain’s rules into <strong>Bitcoin</strong>, including validating all of the<br />

sidechain’s transactions <strong>and</strong> checking the sidechain’s proof‐of‐work. The reason this is impractical is<br />

that the resulting extensions to <strong>Bitcoin</strong>’s script would be too complex, <strong>and</strong> the verification effort<br />

needed for <strong>Bitcoin</strong> nodes would be prohibitive. Besides, the complexity <strong>and</strong> effort would grow with<br />

the number of pegged sidechains.<br />

The SPV trick.​The trick to avoiding this complexity is to use “SPV proofs.” Recall from Chapter 3 that<br />

Simplified Payment Verification is used by lightweight clients such as mobile apps for <strong>Bitcoin</strong>. SPV<br />

nodes don’t validate transactions they’re not interested in; they merely verify block headers. Instead<br />

of worrying about the longest ​valid​branch, SPV clients merely look for evidence that the transaction<br />

they care about is in the longest branch, valid or not, <strong>and</strong> that it has received some number of<br />

confirmations. They assume that the miners who created these blocks wouldn’t have put in the effort<br />

to mine them without validating the transactions in those blocks.<br />

Perhaps, then, we could extend <strong>Bitcoin</strong>’s script with an instruction to verify a proof that a particular<br />

transaction (say, one that destroyed a coin) happened in the sidechain. The <strong>Bitcoin</strong> nodes doing this<br />

verification would still be fully validating as far as <strong>Bitcoin</strong>’s block chain is concerned, but they would<br />

do relatively lightweight SPV verification of events in the sidechain.<br />

Contesting a transfer.​This is better, but still not ideal. To do even simplified verification, <strong>Bitcoin</strong><br />

nodes would still have to connect to the sidechain’s peer‐to‐peer network (for each pegged<br />

sidechain!) <strong>and</strong> track all of the sidechain block headers so that they can determine the longest<br />

sidechain branch. What we want instead is this: when a transaction tries to convert a coin in a<br />

sidechain back into a bitcoin, it contains all the information that <strong>Bitcoin</strong> nodes need in order to verify<br />

its legitimacy, that is, to verify that a particular sidechain transaction happened. This is the notion of<br />

an “SPV proof.”<br />

Here we present one way in which it could work, with the caveat that this component of Sidechains is<br />

still an area of research. To reference a sidechain transaction in <strong>Bitcoin</strong>, the user must provide proof<br />

of (1) inclusion of the sidechain transaction in a sidechain block <strong>and</strong> (2) sidechain block headers<br />

showing that this block has received a certain number of confirmations which cumulatively represent<br />

a certain amount of proof of work. <strong>Bitcoin</strong> nodes will verify these claims, but will make no attempt to<br />

verify that the chain of block headers presented is the longest. Instead, they will wait for a certain<br />

defined period, say a day or two, to allow other users to present evidence that the block headers<br />

presented in step 2 above are ​not​on the longest branch. If such evidence is presented within the<br />

defined period, the acceptance of the sidechain transaction in <strong>Bitcoin</strong> will be invalidated.<br />

283

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!