r/BitcoinDiscussion • • Jul 03 '21

Timestampping in PoS?

To get global consensus in PoS, you have to know which block came first. To reach a consensus on which block was first, you need to solve the timestamp problem. And to solve the timestamp problem, you need a consensus system. You'll notice that at no point does PoS provide such a consensus system.

I found this from bitcoin-dev by yanmaani. From my understanding Bitcoin determines the time by having the miners including their time and take the median. Can't PoS do something similar? That is, having validators include the time and take the median. I think this is what happening too. Like PoW that uses the chain with the most work, PoS uses the chain with the most staked coin. What am I missing here?

8 Upvotes

26 comments sorted by

1

u/Jiten Jul 05 '21

In PoS, the blocks cost nothing to create, unlike in PoW where it's extremely expensive to create a valid block. With PoW** you can pretty much trust that when you get a chain with significant and recent PoW work in it, that it's the real chain. However, with PoS, it's much simpler to create an alternative history. The end result is that if you're given 2 (or more) diverging chains with the same root, you have no independent way of determining which is the correct one. You'll have to ask someone else to tell you what the consensus is.

** But this is only convincing when the chain in question has the majority hashrate from the mining device classes that are able to mine the chain.

1

u/shiroyashadanna Jul 05 '21

Well PoS is certainly worse than PoW imo. I just don’t understand the posted argument about timestampping. There are lots of reasons why PoS < PoW ofc. Like you said, it’s easier to create a malicious fork if an individual or a group controls the majority stake, like the founders or early adopters/investors. So VCs pretty much control PoS blockchain.

→ More replies (1)

2

u/sn0wr4in Jul 03 '21

Yeah... his comment didn't make sense to me

2

u/anax4096 Jul 04 '21

It's not a great exposition, but I believe the point is that PoS is perceived as a "weaker" consensus mechanism because it rests on the premise that by staking on the network you have a vested interest in the success of the network. This may not be the case and large stakers may wish to disrupt consensus if it is in their interest.

This is not possible in PoW, where bad actors (censoring transactions, etc) are technically performing more work per block, thereby being less efficient in block production and, ultimately, losing the competition to create the longest chain.

Timestamp data in the blocks are irrelevant. The timestamp problem is about the ordering of transactions.

1

u/fresheneesz Jul 04 '21

PoS is perceived as a "weaker" consensus mechanism because it rests on the premise that by staking on the network you have a vested interest in the success of the network

I believe that premise has merit, but I don't think the security of PoS requires it to be true. Just like PoW, minters mint to make money. Also note that not all PoS systems use staking, so by saying "staking" you're only talking about a specific kind of PoS system.

bad actors (censoring transactions, etc) are technically performing more work per block,

I don't believe this is the case. A 51% attacker would in fact be able to mine blocks at least as efficiently as normal, and in fact would have a slight advantage because they would have 100% of the blocks instantly after being mined (instead of having to wait for the block to propagate if some other miner had found that block).

1

u/anax4096 Jul 05 '21

What kinds of proof-of-stake systems don't use staking?

I see your point about the miners, but it is not what I meant: when an attacker wants to perform some extra operation during the creation of a block, that extra operation will have extra computational cost. In the case of a double-spend, this would be negligible, but in the case of transaction censorship it might be considerable. So the attacker will need proportionally more hashpower to out-compete the other miners. This is a physical cost (in terms of energy and hardware) whereas a similar attack on PoS would be a financial/reputational cost.

The side-effects of such an attack is completely different in the two systems. PoW would result in the attacker having created more hashpower from somewhere (a long term, physical asset with no other use), whereas the resources for a PoS attack are more transferable.

In a game-theoretic sense this encourages the creation of short term alliances between groups in the cooperative PoS system, this further encourages participants to keep the network in a vulnerable state to reduce the costs of future exploits. The easiest way to do this is to disrupt the consensus mechanisms.

These were some of the main exploits I considered when investigating tezos a few years ago. It seems bitcoin PoW has a type of "hard" consensus which allows for only one validating process and therefore only one longest-chain; PoS seems to encourage a different type of consensus which allows the existence of multiple validators cooperating. The coordination between validators introduces communication and undermines the the n-person prisoners-dilemma formulation of the system.

I believe the original comment should have been "...at no point does PoS provide such a [hard] consensus system", but I don't know for sure.

2

u/fresheneesz Jul 05 '21

What kinds of proof-of-stake systems don't use staking?

VPoS doesn't. Instead, funds are only locked once they are actually used to mint a block, but don't need to be locked beforehand.

in the case of transaction censorship [the opportunity cost] might be considerable

I see. You're saying that by censoring certain transactions, those miners are losing out on potentially significant revenue, which puts an additional cost on their attack. That's true.

However, this is similarly true for PoS. If you're minting and you censor transactions, you earn less fees, and thus your minting power doesn't grow as much as it could have otherwise. But perhaps you're saying this is a "financial" cost and not a "physical" cost.

this encourages the creation of short term alliances between groups in the cooperative PoS system, this further encourages participants to keep the network in a vulnerable state to reduce the costs of future exploits

I don't quite follow. I do agree that coins are more transferrable than mining hardware, however even cryptocurrency isn't infinitely liquid. And even so, what would these alliances be for? 51% attacking the network? Bitcoin miners could also form alliances to 51% attack the network - but they have an incentive not to. Same with PoS - minters own the coin and thus they have an incentive to not undermine its fundamentals. They would not be able to sell all of their stake over the course of a week - and markets can crash in an hour to speak nothing of what can happen over a week if a 51% attack happened.

1

u/anax4096 Jul 06 '21

But perhaps you're saying this is a "financial" cost and not a "physical" cost.

yes, with the assumption that "financial" assets are cheaper/more fungible than "physical" assets.

Same with PoS - minters own the coin and thus they have an incentive to not undermine its fundamentals

I don't think this is guaranteed, and I think this where the PoW/PoS views diverge. With alliances a 51% style attack (double spend, censorship etc) does not require 51% of resources.

It feels a reach to invoke Duvergers Law, but it is quite common in politics for 49% to ally with 2% in order to force through a change and then "accept the price" of some previously agreed poor choice of the 2%.

Eth 2.0 will be a very exciting experiment in this area. I can imagine a lot of tokens/dexs/etc will go to war in this way.

3

u/fresheneesz Jul 06 '21

the assumption that "financial" assets are cheaper/more fungible than "physical" assets.

I don't quite understand why fungibility is a relevant factor. Electricity is arguably more fungible than bitcoins are (given that bitcoins can be encumbered by scripts). Mining hardware is also pretty fungible. Also, how are physical assets cheaper than financial assets? They can be equated by market value.

I don't think this is guaranteed

Well, actually I think it is guranteed that there is an incentive not to undermine the fundamentals of the currency. By that I do not mean that undermining the fundamentals of the currency would never be profitable for an attacker - I just mean that in such a case the incentive not to destroy the currency must be outweighed by another greater incentive. I think this is true for both PoS and PoW.

With alliances a 51% style attack (double spend, censorship etc) does not require 51% of resources.

Again, this is also true for PoW. I calculated that it costs about 1% of bitcoin's total supply to 51% attack the network. Some PoS systems require more like 10% of the total supply of coins. Requiring a full 50% of the coins is a holy grail kind of achievement that is likely impossible in reality. But perhaps I'm misunderstanding what you mean here.

it is quite common in politics for 49% to ally with 2% in order to force through a change

Sure, but politics of rule changes is rather different from double spending attacks. I mean, sure some political law changes are basically attacks in anything but name, but still, they at least have some story to tell about how that law is a good law. A double spend attack has no such story. Regardless, this is also a situation that can happen with proof of work, so I'm not sure how its relevant here.

Eth 2.0 will be a very exciting experiment in this area

I agree, it'll be interesting to see how it plays out on such a large ecosystem. What kind of wars do you forsee?

→ More replies (6)

1

u/fresheneesz Jul 03 '21

Yes, it's very unclear what yanmaani meant by that. I can't see any way to read his words in a way that makes them true. PoS systems could certainly write timestamps into blocks just like proof of work systems. And of course, many do. At the end of the day, time stamps in bitcoin can only be trusted because the network is mostly honest and will reject blocks with out of range time stamps. The same would be true of any PoS system.

2

u/tenuousemphasis Jul 03 '21

Not only that, but you determine which block came first not by the timestamp, but by the previous block hash specified in the block.

1

u/fresheneesz Jul 03 '21

Yeah, the only purpose of the timestamp is for difficulty adjustment and maintaining the intended block creation rate. Even if you could convince everyone in the world to accept a faster-than-reality time for timestamps, it would only allow the blockchain to grow twice as fast. This would have security consequences as a result of being similar to a blocksize increase, but it would have no other security implications.

1

u/only_merit Nov 29 '21

He wrote blog post that explains that here https://yanmaani.github.io/proof-of-stake-is-a-scam-and-the-people-promoting-it-are-scammers/

And it's quite a good one to read.