1
1
Let me preface this by saying that I'm a novice, but this is my rough understanding of how Bitcoin's blockchain works. (This is largely based on blog posts like this one.) If person A wants to transfer a certain amount of Bitcoin to person B, he signs a message authorizing the transfer using his private key. A minor can examine the message, and using a program that performs a certain mathematical operation, can verify that person A really did sign the message. But there's the issue of, how do we know that the miner really did do the computational work needed to verify the signature? This is solved by something called a "proof-of-work" protocol, by which the miner can demonstrate that he did the verification computation.
I was reminded of all this when hearing about the notion of "external state contracts", a type of Smart Contract described briefly at the 35 minute mark of this video and in more detail in this Bitcoin wiki article. In an external state contract, certain disputes about objective features of the world can be resolved automatically, instead of trusting a third-party human arbitrator to decide fairly. For instance, contract could specify that in the event of a dispute about a sports bet, a computer program (with source code specified in the contract) would be automatically run that consults a sports database, determines who won the bet, and the bitcoin is automatically transferred accordingly. But the Bitcoin wiki article describes an issue with this: how do you determine that the computer program that's supposed to resolve the dispute has actually been run, and if so whether the output of the program is being reported fairly by the computer that ran it? The article suggests using one or more "Trusted Computers" known as oracles, which both parties trust to run the code properly and not misrepresent the output.
But it occurs to me that the issue with external state contracts is analogous to the issue I described above that's solved with the blockchain. So why can't you solve it the same way in this case? That is to say, just as proof-of-work protocols can be used to demonstrate that a miner ran the code that determines whether a signature is authentic, why can't you make miners run dispute-resolution code for external state contracts, and then determine whether they really ran the code using proof-of-work protocols? That would eliminate the need for a Trusted Computer.
Is there any significant difference between the two cases that would make this unworkable? Has this been done already?
Any help would be greatly appreciated.
Thank You in Advance.
Let's take a simple example: person A and person B make a bet on whether the billionth digit of pi is odd or even. They both run the same program, and person A claims that the output is that the digit is odd, whereas person B claims it's even. Clearly one of them is lying, but how can we resolve who wins the bet? You can trust one or more third-party arbitrators to run the program themselves, but that defeats the purpose of programmable clauses in smart contracts, which is to remove the need for trusted third-party arbitrators in resolving contract disputes. – Keshav Srinivasan – 2014-04-08T21:58:35.567
That depends on how you define "the digits of pi" or "according the program" for purposes of the contract. One way would be to put a pi-digit-calculating program into the blockchain's contract. (Note that the scripting language is loopless and Turing-incomplete so it would probably be long.) Then, it's verified like any other script: everyone who sees the blocks containing these grinds through the program to check who gets the payoff, and they reject transactions predicated on the wrong answer.
This is why you usually just want to designate an address of a trusted party to make the call. – Silas Barta – 2014-04-09T01:23:32.103
As for whether smart contracts are supposed to remove the need for trusted 3rd party arbitrators, I don't think they are. In some cases, the resolution of the contract is so mechanical that it can eliminate the need for the trusted party. However, when someone has to make a judgment, the purpose of these smart contracts is only to provide a reliable escrow infrastructure -- so that the arbitrator can only give the money to one of the main parties, and not e.g. run off with it. – Silas Barta – 2014-04-09T01:27:47.393