Live data from Hacker News

Proof-Of-Work is a Decentralized Clock

grisha.org

111–120 of 130 posts

Re: Proof-Of-Work is a Decentralized Clock

#111
post #99

> There is a separate consensus in a rare but common case of two consecutive ticks being associated with conflicting blocks. The conflict is resolved by what block will be associated with the next tick, rendering one of the disputed blocks “orphan”. How the chain will continue is a matter of chance It being a "matter of chance" may be false and thus the thesis that this clock is "decentralized" should be questioned.…

Fascinating, I found this article by Vitalik that explains what happened. In v0.8 they swapped from BerkleyDB to LevelDB but due to a bug the two chains started diverting. https://bitcoinmagazine.com/articles/bitcoin-network-shaken-...

Yup, we'll never know if the bug was intentional or not, and that's why the fix being centrally coordinated is scary. Maybe it was a legitimate mistake, but maybe one of the developers planned this and executed large double-spends on the 0.8 branch because he knew 0.7 would be ultimately chosen. The fact that nothing prevents this type of attack is worrisome.

You can see how the developers behaved like a central authority in the IRC logs of the bitcoin-dev channel. More info here: https://freedom-to-tinker.com/2015/07/28/analyzing-the-2013-...

Re: Proof-Of-Work is a Decentralized Clock

#112
post #107
post #46

This analysis is obviously wrong, if the important thing was establishing a global clock, you could just use GPS receivers. Ordering transactions works also without proof of work, just including a hash of an existing transaction or block in a new transaction or block and this proofs the order of those transactions or blocks relative to each other. No clock required at all. And also exactly what Bitcoin does but which…

I think you have to be more precise when making claims of this sort; in this case "establishing a global clock" is not very precisely defined. Suppose we have an oracle that implements this protocol: it publishes a new public key every hour, and at any time someone can present it a blob of data which it will sign with the private key corresponding to the current hour's public key. Furthermore, you can query it for th…

I think you have to be more precise when making claims of this sort; in this case "establishing a global clock" is not very precisely defined.

I meant this in the straight forward sense and what GPS essentially provides, a means to globally agree on the current time with a reasonable high resolution.

Suppose we have an oracle that implements this protocol: it publishes a new public key every hour, and at any time someone can present it a blob of data which it will sign with the private key corresponding to the current hour's public key. Furthermore, you can query it for the set of all blobs it has signed with a given public key.

You don't state it explicitly but from »[...] the set of all blobs it has signed with a given public key [...]« I assume more than one blob can be signed with any key pair and I would then also assume every user can get an arbitrary number of blobs signed with each key pair, right? Or did you imagine a limit per user or key pair?

It is obvious that one can implement a distributed ledger with the only security assumption (for each user) being "I trust this oracle" and "I can determine the current time".

This is, at least to me, not obvious and I tend somewhat towards thinking is it not possible or at least not easy. If my interpretation from above is correct and there is no limit on the number of blobs that can be signed with each key pair then it seems to be at least non-obvious how one could reimplement Bitcoin on top of the oracle. Everyone could just fork and create arbitrary long chains of blocks because there is no proof of work slowing the participants down which I turn means that the longest chain is not necessarily the one that the majority considers valid.

Only if the oracle had a limited capacity and all participants flooded the oracle with request as fast as possible one could hope that the majority would be able to create the longest chain assuming the oracle processes all requests fairly. Maybe there is a way [substantially different from Bitcoin] to build a distributed ledger on top of this oracle but, as already said, it is at least to me not so obvious that I could quickly figure out how to do so.

Re: Proof-Of-Work is a Decentralized Clock

#113
While the analysis contained in this article is rather arbitrary, blustery and imprecise, there is a mechanism by which blockchains can serve as 'partially synchronized clocks.' One interesting facet about Bitcoin is that the model under which you analyze the effect of network delays can give you different results about how unsynchronized local copies of the blockchain can become. In the paper, "Analysis of Blockchains in Asynchronous Networks" [0], a certain (and more realistic) model is used in which adversarial miners are allowed to delay forwarding of blocks that they receive. The goal of this model is to describe how networking can account for changes to the probability of selfish mining [1]. The authors of [0] prove that for Bitcoin, under some assumptions about the maximum delay an adversary can use and the block production rate, is consistent because it has both a lower bound on how much chains between different participants can differ as well as an upper bound about how far ahead a single participant can grow their chain. Note that all of these statements have to be interpreted as statements "with high probability" relative to security parameters.

In [0], the authors argue that Bitcoin, in particular, is a partially-synchronized global clock, and they take advantage of it in [2] to make a hybrid blockchain-DB system that provides more traditional eventual consistency guarantees.

NOTE: I'm not an author of any of these papers, just a casual observer

[0] https://eprint.iacr.org/2016/454.pdf

[1] https://arxiv.org/abs/1311.0243

[2] https://eprint.iacr.org/2016/917.pdf

Re: Proof-Of-Work is a Decentralized Clock

#114
post #91
post #30

I think some of this is kind of wrong. Mostly the claim that "The Difficulty is Intergalactic" is just flat wrong. Consider a miner on mars with 10% of the hash-rate on earth. Lets say the light delay from earth to mars is 10 minutes (it is 14 on average). Now, suppose mars has last seen block B_0 and it was mined on earth (as would happen most often due to 90% of the hash rate being there). We will call E_1 the next…

« for sha-256 using brute force, this probability is totally 0 » It's not zero. It's very small, but not zero. The difference between being "theoretically exactly zero" and "very small" (yet practically zero) is why we can say SHA-256 is memoryless.

But sha-256 is actually memory-full. Or rather, lets model sha-256 as a random oracle.

Moreover, lets assume there is an input that leads sha-256 to be our target (so the probability of finding a solution isn't 0 at all). Take the shortest input that meets our target, and call it L. Now, brute-force try all inputs up to length L. You know have P(find solution after 2^L tries) = 1. This cannot happen for a memoryless process.

If you pick your inputs randomly, it remains a memoryless process.

Re: Proof-Of-Work is a Decentralized Clock

#115
post #54

Earlier quoted context omitted.

A long enough interval could work within the solar system, but without FTL communication, an actual intergalactic version would require intervals longer than human lifespans. It seems to me that different solar systems wouldn't be able to maintain a single blockchain, they'd each need their own.

In Neptune's Brood there were "slow" currencies where transactions had to be settled by communication with other star systems. It was created as a deliberate way to drive colonization of new star systems, since the only way to create more of it was to colonize more systems. The founders of a colony could end up quite wealthy, if they survived the attempt. Of course, for every-day transactions there were also "fast" c…

Since I won't have time to read this book for at least several months - what are those colonists able to spend their newfound wealth on? Goods that will have to travel from lightyears away?

Re: Proof-Of-Work is a Decentralized Clock

#116
post #107

Earlier quoted context omitted.

I think you have to be more precise when making claims of this sort; in this case "establishing a global clock" is not very precisely defined. Suppose we have an oracle that implements this protocol: it publishes a new public key every hour, and at any time someone can present it a blob of data which it will sign with the private key corresponding to the current hour's public key. Furthermore, you can query it for th…

I think you have to be more precise when making claims of this sort; in this case "establishing a global clock" is not very precisely defined. I meant this in the straight forward sense and what GPS essentially provides, a means to globally agree on the current time with a reasonable high resolution. Suppose we have an oracle that implements this protocol: it publishes a new public key every hour, and at any time som…

Yes, a user can sign multiple blobs. One construction is this: we agree on some genesis state (no block rewards are issued in this protocol). Call a transaction pre-valid if the transaction is signed by the oracle. A transaction is valid iff it is pre-valid, it is a valid state transaction (valid signature, enough balance etc) and if the originating account made no other pre-valid transactions during the same hour. Then you get finality after 1 hour (every user can agree on the set of valid transactions, and an account holder can finalize a valid transaction after waiting at most 1 hr), and no account can make more than one transaction per hour.

You can modify the rules of the protocol to be slightly more complicated to relax the "no more than 1 tx/account/hr" rule optimistically.

Re: Proof-Of-Work is a Decentralized Clock

#117
post #80

Earlier quoted context omitted.

The valid sha ties this block to the exact point in time at which the solution was found. It does not, it just sets a lower bound on the time. I can totally mine a block linking directly to the genesis block today. All it proofs is that it happened after the previous block was created. And so does SHA( ) without any mining. Also that no other block happened at this same point in time. Also not true, I can totally min…

May be to understand it better consider the blockchain (i.e. how ticks are recorded) vs the actual ticks as they happen in "real life". At the risk of sounding like a broken record: when the SHA puzzle is solved is the exact point at which the block which is the input to the SHA is mined. I sounds almost "duh - what other time could it be?", but upon some reflection, this is quite remarkable, because a point in time…

At the risk of sounding like a broken record: when the SHA puzzle is solved is the exact point at which the block which is the input to the SHA is mined. [...] because a point in time is tied to a block of data.

I don't get it, so let's try once again. You mine a block, say this [1] one. How is it tied to any particular point in time? It includes a time stamp but that is not the time the block was mined, the block may have been mined before or after that point in time, no way I can tell just from looking at the block.

There is also the hash of the previous block [2] in there but that does not tell my at which point in time the block was mined either. The only thing I can conclude is that the block was mined after the block referenced by the previous block hash but there is no indication of how much time passed in between. And looking at the previous block does not help either because there is nothing in there indicating any point in time.

Or even better, let's do a thought experiment. With a fast enough computer I could have performed all the calculations of the last ten years that led to the Bitcoin block chain as of today within the first hour after the genesis block was mined on January 3rd 2009. Identical to the very last bit. But none of the blocks would have been mined at the same point in time as they were in the actual Bitcoin block chain. I obviously would not have known any of the transactions that would occur over the next ten years but I could of course have guessed them.

Or let's not be that wild and mine the entire Bitcoin block chain within one hour, let's just imagine all the blocks were mined one second earlier than they actually were. This hypothetical Bitcoin block chain could also be identical to the very last bit to the actual one but again none of the corresponding blocks would have been mined at the same point in time. And the fact that two bit-identical block chains could exist but where no two corresponding blocks were mined at the exact same point in time proves that nothing in there ties any block to a specific point in time.

[1] https://blockchain.info/block/0000000000000000001f6d740116db...

[2] https://blockchain.info/block/0000000000000000001a1c88ce0b57...

Re: Proof-Of-Work is a Decentralized Clock

#118

Earlier quoted context omitted.

May be to understand it better consider the blockchain (i.e. how ticks are recorded) vs the actual ticks as they happen in "real life". At the risk of sounding like a broken record: when the SHA puzzle is solved is the exact point at which the block which is the input to the SHA is mined. I sounds almost "duh - what other time could it be?", but upon some reflection, this is quite remarkable, because a point in time…

At the risk of sounding like a broken record: when the SHA puzzle is solved is the exact point at which the block which is the input to the SHA is mined. [...] because a point in time is tied to a block of data. I don't get it, so let's try once again. You mine a block, say this [1] one. How is it tied to any particular point in time? It includes a time stamp but that is not the time the block was mined, the block ma…

OK, at the time the solution was found, and the miner went "hooray I solved a block!". That's exactly when the the blockchain clock ticked and on that tick the block was mined.

You can't know precisely what "human" time it was in hh:mm:ss, nor does it matter (because the blockchain operates in its own clock). But you do know the "blockchain time" (which is the parent height + 1).

Your first example block was mined exactly at blockchain time known as "height 518807" the second at 518806.

Note that the (first) block happened exactly, not a femtosecond before or after, but exactly at "height 518807". Such precision is not possible with our "human time".

Re: Proof-Of-Work is a Decentralized Clock

#119
post #30

I think some of this is kind of wrong. Mostly the claim that "The Difficulty is Intergalactic" is just flat wrong. Consider a miner on mars with 10% of the hash-rate on earth. Lets say the light delay from earth to mars is 10 minutes (it is 14 on average). Now, suppose mars has last seen block B_0 and it was mined on earth (as would happen most often due to 90% of the hash rate being there). We will call E_1 the next…

>> SHA is Memoryless and Progress-Free > Technically false, because memory-less processes have positive probabilty of yielding no block after 2^256 tries, whereas for sha-256 using brute force, this probability is totally 0. I don't think this matters at the current hash-rate though. You may be right about my use of "memoryless", though it won't matter at any hashrate :) "...brute-force attacks against 256-bit keys w…

That depends on how much quantum computing would speed up the collision search.

Re: Proof-Of-Work is a Decentralized Clock

#120

Earlier quoted context omitted.

At the risk of sounding like a broken record: when the SHA puzzle is solved is the exact point at which the block which is the input to the SHA is mined. [...] because a point in time is tied to a block of data. I don't get it, so let's try once again. You mine a block, say this [1] one. How is it tied to any particular point in time? It includes a time stamp but that is not the time the block was mined, the block ma…

OK, at the time the solution was found, and the miner went "hooray I solved a block!". That's exactly when the the blockchain clock ticked and on that tick the block was mined. You can't know precisely what "human" time it was in hh:mm:ss, nor does it matter (because the blockchain operates in its own clock). But you do know the "blockchain time" (which is the parent height + 1). Your first example block was mined ex…

Okay, now I understand what we are talking about but I still don't find it remarkable in any way. I can come up with an endless number of similar processes. For example the FTP clock. I have a public FTP server and at some point in time I create a directory named 1. Then I open that directory and create a subdirectory named 2. Then 3 another level deeper. And 4. And... I don't see what is special about such a process.

Also note that this is not precise in any meaningful sense, neither in the case of Bitcoin nor in the case of my FTP clock, we are just labeling random points in time with names like »the point in time I found block 12345.« or »the point in time I created the subdirectory 42«. I could throw a plate against a wall at label that as »the point in time that plate hit the wall«.

This labeling does not establish any regular interval, it does not help identifying what this point in time was or what else happened at this point in time. It's a trivial tautology, every event happens at exactly the point in time it happens. And every clock is as precise - in your sense - as Bitcoin, the exact point in time this clocked switched from 11:59:59 to 12:00:00 is not different at all from the exact point in time you minded block 12345.

Maybe that clock was actually 5 minutes fast and it was really only 11:55:00 but that is inconsequential for the way you use »price«, every tick of that clock still labels a precise point in time. But an actual good clock is useful because it assigns labels like »2018-04-18 19:49:17« at regular intervals with some precision depending on the nature of the clock. Bitcoin, the FTP clock, and the plate hitting the wall are useless in that sense because the relation between points in time and the assigned label are to a large extend random. You could use Bitcoin as a crude clock with an time resolution of about ten minutes but that is not a good clock.

Finally note that the Bitcoin clock does not even really tick at the point in time you mined a block because that block might get orphaned or simply rejected for whatever reasons. Only in hindsight can you say that it ticked when this or that block was mined, once there are enough blocks on top of it that it becomes reasonably unlikely that another chain might become the longest one.

Wait, finally finally. What is the point in time you mined block 12345 exactly? There are zillions of subatomic particles moving around in you mining hardware, how would you ever be able to pin down precisely when you mined a block? Did you mine it now or do you have to wait until this electron over there also passes through that transistor here and increase the charge on the capacitor to the left another tiny bit? When you really think about it, the point in time you mined block 12345 becomes quite a fuzzy concept at the microscale. And so even before you start thinking about the uncertainty principle or relativity.

Post reply on HN