Expand description
denunciation Copyright (c) 2022 MASSA LABS info@massa.net Denunciation intro
Currently, nothing prevents a user from producing multiple blocks (for the same Slot) or endorsing a block multiple times. If an invalid Denunciation will just be ignored, a valid Denunciation will slash some locked rolls. Note that this proposal aims at dissuading ‘rational’ users from causing damage but does help against ‘byzantine’ actors that just want to disturb or break the blockclique (at any cost).
Denunciation structure
A denunciation embeds some information such as Slot, the slot from the block header or the endorsements (+ index) A public key: the public key of the secure share endorsement or secured header 2 Hashes & 2 Signatures
All of this constitutes a proof (and is verifiable) that a user produced multiple (at least 2) blocks or endorsements
Denunciation creation
Denunciations are created in a Denunciation pool, receiving new blocks & block headers & endorsements from various places.
The denunciation pool is also responsible of returning a list of denunciations to insert into a new block header.
After execution, the denunciation is kept for some time inside executed_denunciations
in order to prevent multiple executions. Note that this structure is part of the final state hash and thus is bootstrapped.
Denunciation execution
When a Denunciation is proven valid, we then need to ensure that the user has sufficient funds. If we cannot deduct the funds on node balance or staked rolls, we will use ‘locked’ rolls` (or Deferred credits). Selling a roll will lock it for some time (== 4 cycles). Note that it restricts the time, a denunciation can be produced (A constant value will be defined for this).
Punishment model
A valid denunciation slashes locked rolls only. It does not forfeit slot rewards
(EndorsementCreatorReward, EndorsementTargetReward, BlockCreatorReward) for the
denouncing block. A validator denounced in a block may still receive those rewards in the
same slot. That is intentional: excluding denounced addresses from same-slot rewards would
make the effective penalty depend on whether they were also selected by draws for that slot,
which is not a coherent punishment model.
Structs§
- Block
Header Denunciation - A Variant of Denunciation enum for block header
- Block
Header 🔒Denunciation Deserializer - Deserializer for
BlockHeaderDenunciation - Block
Header Denunciation Precursor - DenunciationPrecursor variant for block header
- Block
Header 🔒Denunciation Serializer - Serializer for
BlockHeaderDenunciation - Denunciation
Deserializer - Deserializer for
Denunciation - Denunciation
Index Deserializer - Deserializer for
DenunciationIndex - Denunciation
Index Serializer - Serializer for
DenunciationIndex - Denunciation
Serializer - Serializer for
Denunciation - Endorsement
Denunciation - A Variant of Denunciation enum for endorsement
- Endorsement
Denunciation 🔒Deserializer - Deserializer for
EndorsementDenunciation - Endorsement
Denunciation Precursor - DenunciationPrecursor variant for endorsement
- Endorsement
Denunciation 🔒Serializer - Serializer for
EndorsementDenunciation
Enums§
- Denunciation
- A denunciation enum
- Denunciation
Error - Denunciation error
- Denunciation
Index - Index for Denunciations in collections (e.g. like a HashMap…)
- Denunciation
Index 🔒Type Id - Denunciation
Precursor - Lightweight data for Denunciation creation (avoid storing heavyweight secured header or secure share endorsement, see denunciation pool)
- Denunciation
Type Id