-
Notifications
You must be signed in to change notification settings - Fork 746
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
Non-laziness hashes #639
Comments
Is this strictly necessary? The risk if all validators are lazy is that they will not be able to detect bad blocks. However, if dispute initiators earn a proportion of the reward then there is an incentive never to be the last lazy validator. Also, the downsides of being slashed are so large that it should dissuade validators from being lazy in the first place. |
I think it's just nice to have. This was @burdges's idea that I resurrected when discussing time overruns because @eskimor suggested using them to catch and penalize lazy validators, e.g. if the median execution time is 20s and you report 2s you probably didn't execute it. |
We've two costly development steps here:
What is left that could happen now? We could put
We'd need a migration path for this hash in the approval votes for whenever the wasm changes, so another option is to simply to prepare this migration path in the approval votes. |
I think, I found a suitable slashing strategy that should also resolve the issue and should be pretty trivial to implement. |
This is very old, but I just came across the idea of “attention challenges”: https://medium.com/offchainlabs/cheater-checking-how-attention-challenges-solve-the-verifiers-dilemma-681a92d9948e. Not sure whether Arbitrum ended up using this.
f(x) would be whatever we extract from PVF execution and r chosen by the backer. It requires a bit more computation, but most of the time doesn’t require including the non-laziness hashes with approval votes nor checking a sample of them before paying paravalidator rewards. |
Near’s Nightshade sharding design uses an availability protocol based on Polkadot’s with proof of non-laziness for availability recovery. Note that here “chunks” are like parachain blocks and “onepart messages” are like chunks:
|
We need proof that validators are actually checking parablocks rather than being lazy and just always backing and approving them. This will be particularly important when we implement rewards for parachain consensus.
A general format is to have backers and approval checkers take some succinct "proof of work" data that is not posted on-chain, hash it with their public key, and include it with their backing statement or approval vote. It can then be checked at a later time by anyone with the parablock data.
An easy option is to just prove that validators recovered the parablock data by using a hash of the data as the non-laziness receipt. It would be ideal, though, to do better and actually prove execution. For this, we want an output of the wasm compiler that has the following properties:
From discussions with @s0me0ne-unkn0wn, one option that fits these criteria might be a hash of a particular memory page.
Finally, there's the question of how we check the non-laziness hashes. We'd ideally like to do this as part of the protocol, but can't include it in approval checking since it would require approval checkers who distributed their votes earlier to check the hashes of approval checkers who distributed votes for the same parablock after them. Instead, we should check non-laziness hashes at a later time -- anytime before the parablock data is pruned, but likely at the end of each era if we assume parachain consensus rewards will be distributed at the same time as those for relay chain consensus -- and only randomly sample a portion of them that provides a sufficiently high chance lazy validators will eventually be caught. We can then deny their rewards and probably also slash and disable them.
The text was updated successfully, but these errors were encountered: