-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how does pos ethereum prevent bribery for late block proposal? #111
Comments
Worry 1: Late execution block proposals:Thanks for bringing up this issue on timeliness of block proposals. This is a known issue with the protocol and active exploit of this issue will lead to accelerated mitigation. However, it's a known problem for which we have a solution in mind already. The solution is (block, slot)-voting, it just needs some details figured out. tldr:
Worry 2: ReorgsThe three attacks mentioned in our paper are fixed by the aforementioned Proposer LMD Score Boosting. One of the attacks in the other paper by Neu et al. is not an attack on PoS Ethereum. The other one is fixed by removing equiovcating validators from fork choice consideration. I am happy to go into more detail on this here or elsewhere, but didn't want to go beyond scope in this comment. Some other commentsThere is actually one more "sub-slot":
This means that if the aggregators don't hear your attestations some time before the 8s mark they will likely not include them, meaning you're incentivized to release them before the 8s mark (if you want them to be included asap).
Both solo and multi-validators can modify the source code. It is not clear to me how there is an advantage only available to one or the other. Controlling lots of validators does not mean you control lots of nodes on the p2p layer. You can, but typically you'll use the same beacon node that handles the p2p stuff. And again, both a solo- and multi-validator could run multiple p2p nodes. One advantage that someone controlling many validators has: They are more likely to also control an aggregator in the relevant (committee, slot)-pair in question. This means a large enough adversary could potentially circumvent the 8s deadline without foregoing inclusion rewards. And finally, one question for you: Rather than an average value for what each additional second of waiting is worth, do you have data on the distribution of this? I wanted to post this already, but I'll think more about some of the other questions mentioned. Let me know, if there are follow-up questions etc. |
To expand on this. If proposer of slot N is regularly willing to be "dishonest" (deviating from spec and normal software) and wait well past the 4s mark, then it is reasonable to believe the proposer of slot N+1 will (also be dishonest) utilize their proposer boost to re-org that proposer (by building on N's parent) and to steal MEV from proposer at slot N. So it is not actually clear that waiting near or past the 4s mark is a viable strategy to get more MEV due to this strategy being attackable by the next slot proposer. Beyond that. A general note here on this security issue. Mentioned by @casparschwa but worth being very clear what's at stake here. Ethereum PoS has a number of known upgrades in the pipeline. Some are feature enhancements (e.g. sharded data) while some are security enhancements (e.g. proof of execution, DAS, etc). While we (researchers, developers, community) would like to prioritize shipping features, if known security issues become active targets, security enhancements will have to be prioritized Manipulating the release of blocks between 4 and 11s in a slot is a known degenerate case with a proposed fix (called (block, slot) fork choice). This is explicitly against the "honest" spec and would (1) fairly attributable and (2) seen as nefarious behavior. In the event that flashbots, some large pool, or some other mechanism begins to exploit this issue to shift the timing equillibrium, it will accelerate the priority of shipping (block, slot) at the expense of important (desired?) scalability features. |
I'm curious about how much the honest block that builds on top of the late block would degrade and whether that's something we can quantify. For example, say at slot N, a dishonest proposer releases block at 11s and gains X more MEV. Would it be fair to estimate that at slot N+1, the honest proposer releases block at 0s and loses X MEV that it would have gained? Assuming both proposers use mev-boost and connect to different relays or same relay (would that make a big difference?) |
There's also an active prototype by the lighthouse team to combat this: sigp/lighthouse#2860 |
Hey everyone! Thanks a lot for you comments here, and thanks in particular to @casparschwa and @fradamt for the conversations offline and the detailed answers above. They've been critical in writing this reply! TLDR:
One misunderstanding corrected privately that I'll relay here is an attestation of slot n can only get included in the block from slot n+1 (the earliest). You'll find below further details on all of the above: Mitigations (summarizing the above - feel free to skip to the 'additional comments' and later sections)Currently, there is no network-wide mitigation for late block proposals that's implemented and all a proposer has to do is to make sure that the next proposer hears their block (block n) by the time they start constructing their block (block n+1). This means proposers today can propose a block very late in their slot. One immediate mitigation that's implemented in some clients is Proposer LMD score boosting. This was implemented for another issue than late block proposals but turns out to be helpful for our issue too. In a nutshell, this would allow the next proposer to re-org the previous one out if they proposed their block too late. How does it work? An advanced version of that mitigation that avoids relying on the proposer but instead on the attester committee is (block,slot) voting. This currently has a rough spec but if i understand correctly needs more work before being implemented. In (block,slot) voting, committee members can vote on an empty slot (which they weren't able to previously), meaning the empty slot now accumulates fork choice weight making it harder for a late block to become canonical. This enshrines the 4s rule in-protocol, without needing proposer LMD score boost. Finally, there are other mitigation discussions at an experimental stage like retroactive timely rewards for block proposers, effectively changing the components of the block proposer reward to include timeliness. One problem with this is that it is only effective if this reward is higher than the reward from a proposer stands to make from 'late MEV' which makes it problematic since MEV rewards can shift while this parameters may be static. You can learn more about these mitigations in this document from @casparschwa here: (Un)-Timeliness in PoS Ethereum Some additional comments:
how would you be able to detect this behavior?
So, can we close this issue?I don't think so! There is one oustanding concern worth discussing: Even if proposer-boost is implemented network-wide, and even with (block,slot) voting, there is still an incentive for proposers to propose as late as they can within the boundaries given to them (ie. as close as possible to the 4s mark). Because the block would be proposed around the 4s deadline, some attesters would likely miss it as they vote on the latest head they've seen. This would affect their total rewards since voting on timely head gives 14/64 of total validator rewards (so roughly 10% of their reward). The ideal strategy for attesters is that if they're protected from 'proposer_boost', they might as well wait 0.5s later to make sure they're in the group that sees the proposer slot. The future proposers now might push their proposal to 4.5s rather than 4s. You can imagine this game being iterated, pushing block proposal deadlines further and further without any network-wide coordination needed. (Read more about this in here by @fradamt https://notes.ethereum.org/HO8UXG4rSdmH4Sv16iWKuw?view#Shifting-timing-equilbria-of-block-releasing-amp-attestations ) There is more complexity to this problem to think about such as:
If the network does move in unison doing this behavior, should we expect a drift over time of block proposals and attestations? So where does that leave us?
Further researchQuantifying MEV: Understanding the degenerate case better: It's also worth asking the question, why is it bad if blocks are proposed later? I'm asking this question because I'd like to be able to point to something written to explain why a validator/validator pool who's acting under economically rational assumption shouldn't do this. From all our conversation above, the answer seems to be:
Against deterministic block times? |
We are starting data collection for mev rewards around our relay in flashbots/flashbots-data-transparency#9 and flashbots/flashbots-data-transparency#6 |
TLDR: There exist a financial incentive for the execution payload to be proposed later than the anticipated time window for it. We worry that this might lead to favoring larger validators, encourage attester bribing infrastructure and might contribute to making consensus attacks described in recent papers more likely.
Context:
The beacon chain has slots. A slot is currently every 12s. Within this slot exists an execution chain block as well as consensus objects. While there is theoretically (12s-epsilon) time to put the beacon block together within the slot, there are actually sub-slots within this slot that are softly enforced by consensus clients. These sub-slots are necessary in order to account for propagation time (incl. network delays) to attesters and for the proper construction of a beacon block.
Afaik - an execution chain block is supposed to be proposed in the first 4s of the 12s slot. This gives 8s for it to be voted on by attesters and in MEV-Boost, leaves enough for the body to be revealed by the end of the slot. For eg. see
waitToOneThirdOrValidBlock()
in Prysm's client here: https://github.com/prysmaticlabs/prysm/blob/8c8f1bb9c18ebbc42241848a328ed275b12587e5/validator/client/attest.go#L250 (thanks @terencechain )Worry 1: Late execution block proposals:
In theory, the proposer has until 12s-epsilon to submit a beacon block. This means the execution chain block could be constructed maybe at 11s rather than 4s in. This time difference means the builder would have an additional 7s to construct a block. In those 7s, new transactions could’ve come in and made the block more profitable.
The proposer and builders now have an incentive to delay the block submission as much as possible.
This is problematic because:
Questions:
The good news is that we have numbers to quantify this, in particular, Flashbots finds that on average, each additional second of waiting is worth 0.034 eth in additional miner payment (incl. 1559 tips). The outlier numbers we have (top 0.1% of blocks excluding tips - only bundle payments) are around 1 eth/s (thx @metachris and @Ruteri ). These numbers generally seem too small for this worry to be relevant.
The bad news is that this quantification is imperfect. In particular, if someone can delay their ultimate proposal to a few seconds later, they are able to do cross-domain arbitrage with low-latency domains more effectively. Priced in, this might be worth large sums of money.
To-do:
Worry 2: Reorgs
Two papers (https://arxiv.org/pdf/2203.01315.pdf and https://eprint.iacr.org/2021/1413.pdf) were recently released detailing 5 attacks on PoS consensus (co-authored by @casparschwa @barnabemonnot et.al). One attack in particular relies on the timing of a block proposal.
We worry wether the financial incentives outlined above exert an upwards pressure on the likeliness of such a timing attack happening in the wild. I understand these attacks have been fixed and suspect this worry can be easily alleviated by @casparschwa sharing how these attacks were fixed.
We open the discussion here and look forward to your questions and comments :)!
The text was updated successfully, but these errors were encountered: