Live data from Hacker News

Proof-Of-Work is a Decentralized Clock

grisha.org

1–10 of 130 posts

Re: Proof-Of-Work is a Decentralized Clock

#2
Can someone who knows the technical details of bitcoin answer the following questions? Suppose initially A owns 1BTC and B owns 0BTC. Suppose A publishes a signed transaction that would give 1BTC to B, and simultaneously B publishes a signed transaction that would give 1BTC to C. If a miner includes both transactions in a block, is the block valid? Does it depend on the order of the transactions within the block (A's transfer to B preceding B's transfer to C)?

Re: Proof-Of-Work is a Decentralized Clock

#4
post #2

Can someone who knows the technical details of bitcoin answer the following questions? Suppose initially A owns 1BTC and B owns 0BTC. Suppose A publishes a signed transaction that would give 1BTC to B, and simultaneously B publishes a signed transaction that would give 1BTC to C. If a miner includes both transactions in a block, is the block valid? Does it depend on the order of the transactions within the block (A's…

The block is valid only if the transactions are in the correct order, but the miner is incentivized to figure out the right order (specifically incentivized to include as many transactions as possible).

Edit: You are always spending a specific input, so to broadcast B->C, B would have to wait for A->B and specifically name that transaction. The miner _could_ receive these transactions out of order, but that should not be an issue.

Re: Proof-Of-Work is a Decentralized Clock

#5
> Nothing Happens Between Blocks

Actually, this is only partially true. With Lightning, things can most certainly "happen" in between blocks. Granted, some things that "happen" may never make it to the main chain, but many things will get rolled up and committed for all to "see".

This is, ironically, how reality works.

Re: Proof-Of-Work is a Decentralized Clock

#6
post #2

Can someone who knows the technical details of bitcoin answer the following questions? Suppose initially A owns 1BTC and B owns 0BTC. Suppose A publishes a signed transaction that would give 1BTC to B, and simultaneously B publishes a signed transaction that would give 1BTC to C. If a miner includes both transactions in a block, is the block valid? Does it depend on the order of the transactions within the block (A's…

The protocol says to only accept valid blocks.

Part of being a valid block is "only spend BTC you have". B-to-A-first violates that.

Other miners would reject such a block as invalid and refuse to propagate it. Even if some did, the vast majority would not consider it valid, and the next published block (new transactions + proof of work) would extend from a block that didn't have that transaction in it.

Re: Proof-Of-Work is a Decentralized Clock

#8
post #7

But it isn’t a clock because it doesn’t tell us how much time has passed. PoW allows for the creation of an ordering. I’m not sure these metaphors are helpful.

> But it isn’t a clock because it doesn’t tell us how much time has passed.

Not necessarily: https://en.wikipedia.org/wiki/Logical_clock

Re: Proof-Of-Work is a Decentralized Clock

#9
post #2

Can someone who knows the technical details of bitcoin answer the following questions? Suppose initially A owns 1BTC and B owns 0BTC. Suppose A publishes a signed transaction that would give 1BTC to B, and simultaneously B publishes a signed transaction that would give 1BTC to C. If a miner includes both transactions in a block, is the block valid? Does it depend on the order of the transactions within the block (A's…

A side topic you might find interesting, "Miners are not your friends" [0] which focuses on ways that miners have a mechanism and incentive to subtly exploit some badly-made interactions.

[0] https://blog.keep.network/miners-arent-your-friends-cde9b6e0...

Re: Proof-Of-Work is a Decentralized Clock

#10
post #7

But it isn’t a clock because it doesn’t tell us how much time has passed. PoW allows for the creation of an ordering. I’m not sure these metaphors are helpful.

I believe the reference is to a vector clock [0]

[0] https://en.wikipedia.org/wiki/Vector_clock

Post reply on HN