Module denunciation

Module denunciation 

Source
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§

BlockHeaderDenunciation
A Variant of Denunciation enum for block header
BlockHeaderDenunciationDeserializer 🔒
Deserializer for BlockHeaderDenunciation
BlockHeaderDenunciationPrecursor
DenunciationPrecursor variant for block header
BlockHeaderDenunciationSerializer 🔒
Serializer for BlockHeaderDenunciation
DenunciationDeserializer
Deserializer for Denunciation
DenunciationIndexDeserializer
Deserializer for DenunciationIndex
DenunciationIndexSerializer
Serializer for DenunciationIndex
DenunciationSerializer
Serializer for Denunciation
EndorsementDenunciation
A Variant of Denunciation enum for endorsement
EndorsementDenunciationDeserializer 🔒
Deserializer for EndorsementDenunciation
EndorsementDenunciationPrecursor
DenunciationPrecursor variant for endorsement
EndorsementDenunciationSerializer 🔒
Serializer for EndorsementDenunciation

Enums§

Denunciation
A denunciation enum
DenunciationError
Denunciation error
DenunciationIndex
Index for Denunciations in collections (e.g. like a HashMap…)
DenunciationIndexTypeId 🔒
DenunciationPrecursor
Lightweight data for Denunciation creation (avoid storing heavyweight secured header or secure share endorsement, see denunciation pool)
DenunciationTypeId