Some thoughts on fraud proofs and phase 2 of sharding #441
bowenwang1996
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As we all know, one important feature of phase 2 of sharding is that no validator node needs to track all shards. In order to achieve that, the current nightshade design relies on hidden validators and fishermen to submit fraud proofs when they see an invalid state transition. The fraud proofs can be verified by all validators without having access to any shard's state and therefore even if an entire shard is corrupted, the network's security is not compromised.
However, as we get closer to phase 2, the team noticed a problem: a single malicious validator can cause the chain to rollback. This is because each shard is essentially an optimistic rollup and the state transition (new state root) committed to the main chain for a specific shard entirely depends on the validator that produces the chunk. This means that a malicious validator can single handled commit an invalid state transition. Since validators on other shard do not validate this state transition, the block that contains this invalid state transition won't be immediately discarded and will rather be built upon until there is a fraud proof that shows the invalid state transition. The main problems here are 1) the stake that can cause the chain to rollback is quite low and 2) a misconfigured validator can easily cause the chain to be rolled back.
Before we discuss solutions, I think it is important to understand the problems here more deeply: why is it bad for the chain to be rolled back? We can think about this from two different perspectives:
Regarding solutions, I think there are generally two directions of thinking: addressing it on the protocol level and addressing it on the application level.
C
to be included in a blockH
, there needs to be at least 2 validators from this shard who sign off on the chunk, i.e, they verify that the state transition of the previous chunk proposed by C is correct. In terms of implementation, we can augment approvals to include such verdict, i.e, since each validator is assigned to some shard, their approvals can include a post state root of the previous block to verify the validity of the previous state transition. This way we can reduce the overhead caused by this extra step. Likely it will still slow down the block production though.One unresolved problem here is how light clients should operate if final blocks could contain invalid state. Light clients on their own cannot determine the validity of the state roots included in the light client blocks and have to depend on something external for this purpose.
Beta Was this translation helpful? Give feedback.
All reactions