FIP: Improving EC security with Consistent Broadcast #501
Replies: 4 comments 6 replies
-
I think the approach of reducing the expected number of blocks from 5 to 1 means increasing the probability of having no blocks in a given epoch, significantly affecting performance (1 is in expectation). I suggest adding this con to that approach. Also, the hackmd link should be publicly available or not linked in this proposal? Has the security of the traditional approach (and the new synchronous patch) been analysed in terms of different finalisation blockdepths? |
Beta Was this translation helpful? Give feedback.
-
Thanks for the proposal! I note that the mitigation path of removing tipsets is more complex than merely changing the expected number of blocks from 5 to 1. While a single secret leader election would bring many benefits, my understanding is that it's a somewhat open problem. But happily your recommended mitigation is much simpler. |
Beta Was this translation helpful? Give feedback.
-
Not fully understand what's the difference than just simply extending the cutoff time to 12s (6+6) timeline. |
Beta Was this translation helpful? Give feedback.
-
@guy-goren , as mentioned, a storage provider is free to take or not take this approach. That is, this is not a protocol change, but in implementation. Then, the question is why a rational storage provider is willing to adopt it. Let's say there are two storage providers P1 and P2. P1 takes this approach with cutoff time at the 6th second and setting delta=6s, and P2 does not adopt it but set the cutoff time to the 12s. Remember the two storage providers will start the election proof calculation and do wPoSt after 12s in an epoch since 6+6=12. It looks it's more beneficial when not adopting it as a rational storage provider. Is there anything wrong here? |
Beta Was this translation helpful? Give feedback.
-
FIP: Improving EC security with Consistent Broadcast
Simple Summary
Modifies client behaviour (in particular the miners) to verify that the sender is not equivocating before accepting a block.
Abstract
Currently, a block is accepted if it is received before the cutoff time and is the first from its sender in the epoch. Blocks that are received after the cutoff time are ignored. This mechanism enables an attacker to exploit the cutoff in order to send equivocating blocks (i.e., different blocks in the same epoch, with the same "winning ticket") to different miners, causing miners to build upon different tipsets and, hence, damaging the progress of the honest chain.
This proposal suggests a simple fix to the above. A recipient waits a predefined time (e.g. 6 seconds) between receiving a block and accepting it. If, during this time, the recipient detects equivocation, it does not accept the block. By waiting, the recipient can be practically certain that a sender's equivocation will be suppressed since by this time (practically) all other miners would also hear of the block via gossip.
Change Motivation
A security analysis shows that, given the current "best effort" broadcast combined with the cutoff time, an attacker with$>20%$ of the power (storage) can break the security of Filecoin. The proposed improvement essentially replaces the best effort broadcast (beb) with a variant of consistent broadcast (cb). The difference is, in short, that beb broadcast allows two honest miners to deliver different blocks published by an equivocating Byzantine miner in the same epoch, which cb does not. The result will be that an attacker will require $>44%$ of the total power (adjusted storage) to successfully mount this particular attack.
Specification
The following pseudocode describes the consistent broadcast verification algorithm at a high level. Notice that the proposed change affects only the Filecoin miner as a receiver of a tipset; sending (and gossiping) a block remains unchanged.
Delta
is a tunable parameter which corresponds to the assumed upper bound on gossip delay (originating from an honest node). The protocol also usesblock_set
, a dictionary where a key is a tuple<round, winning_ticket>
and a value is a set of blocks (for efficiency, blocks could be represented by their hashes).Garbage collection is handled orthogonally:$k\ge1$ epochs (depending on how long you wish to allow block propagation -- currently $k=1$ in EC).
block_set[round, winning_ticket]
can be deleted afterDesign Rationale
The design goal is to introduce a simple change without severe repercussion to other functionalities of the systems. This means approaching the core of the matter (the mechanism that enable equivocation). This allows for orthogonal changes in the incentive design mechanism, since the change does not tie them together.
Potential strategies
The ConsensusLab team explored potential mitigation strategies and narrowed down the list for the following possible strategies: (for more details see this document)
Removing tipsets from EC, effectivelly boiling down the protocol to a longest-chain instead of a longest-tipset protocol. By removing tipsets and having a traditional blockchain design (i.e., one block per epoch) the problem is mitigated.
👍 Simple to implement -- changing the expected number of blocks from 5 to 1.
👍 Easier to analyse theoretically -- trivially follows the existing literature on Proof-of-Stake blockchains.
👎 Damages the expected settelment times in the simple case. I.e., it takes longer (more epochs) to achieve 99% settlement certainty against the simple block witholding attack.
👎 The impact of a change would be substantial and very possibly negatively percieved by the community. Changing the number of blocks per epoch affects the miners economic calculations directly and is very visible to miners and the entire ecosystem. This is a very negative point about this option.
👎 Requires a Filecoin upgrade. Might split the blockchain between adopting miners and not-yet adopting miners.
Adding an asynchronous consistent broadcast layer. By adding a Consistent broadcast (C-BCast) the attacker can no longer equivocate. This solves the problem at its core.
👍 Strikes at the core of the issue --- the equivocation of the attacker, by making a very targetted and specific consensus change.
👍 Arguably easier to be accepted by miners. They feel no meaningful difference (same number of expected blocks, same payments, etc.), the change is behind the scenes only.
👍 Does not depend on timing assumptions.
👎 Requires a Filecoin upgrade. A miner that adopts the change cannot receive blocks from miners that didn't adopt the change.
Adding a synchronous consistent BCast layer (with the 6 second
magic number
).👍 Strikes at the core of the issue --- the equivocation of the attacker, by making a very targetted and specific consensus change.
👍 Arguably easier to be accepted by miners. They feel no meaningful difference (same number of expected blocks, same payments, etc.), the change is behind the scenes only.
👍 Does not require a fork.
👎 Depends on timing assumptions. That is, gossip propagation within 6 seconds.
The ConsensusLab research team recommends the use of synchronous consistent broadcast as the mitigation strategy (i.e., the last of the three proposed mitigations). The benefits of easy adoption due to only "behind the scence changes" and no Filecoin-upgrade required, outweigh the shortcomings (timing assumptions). Moreover, even if the timing assumptions are violated, the consistency degrades gracefully (that is, a slightly longer than expected gossip delay would lead to only a small amount of equivocating blocks being accepted rather than to a "cliff phenomenon" where all equivocating blocks are accepted). Also, using the synchronous approach does not require significant changes to the underlying broadcast protocol, which is already well tested and has built-in failure detecting mechnisms.
Backwards Compatibility
The proposal does not introduce backward compatibility issues. A miner that adopted the change will still accept blocks from honest non-adopting miners, and non-adopting miners will still accept blocks from adopting miners. The systems' security will improve monotonically with the share of adopting miners.
Test Cases
The following tests need to be done:
Security Considerations
Replacing the naive best-effort broadcast with consistent broadcast improves considerably the security of Filecoin. There is the risk of using the synchronous approach which relies on timing assumptions (in cases of extreme network asynchrony, in which case the modified protocol would not be worse in terms in security than the current protocol). However, the benefits of the synchronous approach outweigh the risks.$>12$ suffices, and 2) the additional 6 seconds waiting period does not require resources, so it may be used to precompute (e.g. winning PoSt) for the mining period.
Regarding liveness, we do not forsee problems due to the added delay prior to acceptance. This is because 1) assuming a worst-case propagation delay of 6 secondes, any
cutoff
Incentive Considerations
The proposal is intentionally decoupled from incentive considerations. It is neither dependent on them, nor does it limit changes to incentive mechanisms.
A question may arise: isn't equivocation slashable in Filecoin, and therfore should not concern us?
Equivocating is indeed slashable, however, there are 2 issues regarding slashing as a solution.
tl;dr: 1) conceptually, it is dangerous to rely on rationality that is based only on internal incentives. 2) Slashing/Blacklisting does not solve the problem.
Product Considerations
By mitigating attack on Filecoin, the proposal improves the resilience of the system. The proposal does not require any operational changes (besides adopting the protocol update) from the users.
Implementation
The prototype implementation lives in the following repo:
Copyright
Copyright and related rights waived via CC0.
Beta Was this translation helpful? Give feedback.
All reactions