One of the issues of PoS as far as I understand is the randomness that selects a staker. Ouroboros Praos, and also BABE use VRFs (Verifiable Random Functions) to assign primary and secondary leaders roles to block producers. What's special about this is that only the individual block producer knows whether they're gonna win a block, making targeted attacks infeasible. All good so far.
If I understand correctly, secondary leaders exist in case primaries are not available for any reason (whether it's network latency issue, or being offline). Basically to solve the liveliness problem. BABE chooses the longest chain by finding the most primaries in a chain.
Let's say I'm a bad block producer, and I want to produce a certain outcome on the blockchain. What prevents me from doing that by:
- Producing the block, and keeping it with me (not broadcasting it)
- Waiting for the secondary producer to publish
- If I like the outcome, I keep it, otherwise, I publish my block and overwrite it
I can even see Sassafras having the same issue, because it pre-publishes the list of producers to eliminate the probability of having missing producers in slots (the current problem with BABE). What if a producer holds off publishing their block and waits for the next producer in order to publish and then overwrites their work if they don't like it? Same issue with primary and secondary producers.
This is an attack that's prevented in bitcoin by giving all miners the same strength/chainwork per block height. Basically the chainwork is a function of the difficulty, not the inverse of the hash of a block.