DAL: no rewards for undetected traps
What
This MR makes it so a delegate that has been denounced for not detecting a trap during a cycle does not receive the corresponding rewards for that cycle.
The MR also adds a "denounced" field in the output of the DAL participation RPC.
Why
This allows to test DAL accusations before implementing slashing.
It can be easily reverted when slashing is finalized.
How
We change the storage format of (this was the initial version, up to and including V3)Storage.Dal_already_denounced: instead of a set of tuples (level, slot_index, delegate), we store a map from delegates to (level, slot_index) pairs. We do not expect the length of this list to be big.
We add a new storage Dal_denounced_delegates storing the set of denounced delegates during a cycle (from V4 onwards).