From 7b44c81fe90448b8b6f78506156db9e169538750 Mon Sep 17 00:00:00 2001 From: Diane Gallois-Wong Date: Wed, 22 Jan 2025 16:06:18 +0100 Subject: [PATCH 1/2] Doc/alpha: replace max_slashing_period with denunciation_period and slashing_delay --- docs/alpha/consensus.rst | 16 ++++++++++------ docs/alpha/token_management.rst | 4 ++-- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/alpha/consensus.rst b/docs/alpha/consensus.rst index 3b36556225e6..ee03ed32fe97 100644 --- a/docs/alpha/consensus.rst +++ b/docs/alpha/consensus.rst @@ -300,16 +300,18 @@ slashed amount; the rest of the slashed amount is burned. If a delegate's deposit is smaller than the slashed amount, the deposit is simply emptied. -The evidence for double signing at a given level can be collected by any -:ref:`accuser` and included as an *accusation* operation in a block -for a period of ``MAX_SLASHING_PERIOD``. +The evidence for double signing at a given level can be collected by +any :ref:`accuser` and included as a *denunciation* +operation in a block in the same cycle as the double signing or in the +``DENUNCIATION_PERIOD`` next cycles. As soon as a delegate is denounced for any double signing, it is immediately :ref:`forbidden` from both baking and attesting for at least 2 cycles. The actual slashing and denunciation rewarding happen at the end of -the last cycle of the slashing period of the misbehavior. +cycle ``n + SLASHING_DELAY`` for a misbehavior that happened in cycle +``n``. Note that selfish baking is not an issue in Tenderbake: say we are at round ``r`` and the validator which is proposer at round ``r+1`` does not (pre)attest @@ -375,6 +377,8 @@ Consensus related protocol parameters - 7000 * - ``CONSENSUS_THRESHOLD`` - ``ceil(2 * CONSENSUS_COMMITTEE_SIZE / 3)`` = 4667 + * - ``DENUNCIATION_PERIOD`` + - 1 cycle * - ``MINIMAL_BLOCK_DELAY`` - 8s * - ``BLOCKS_PER_CYCLE`` @@ -393,10 +397,10 @@ Consensus related protocol parameters - 600 ęś© * - ``MINIMAL_PARTICIPATION_RATIO`` - 2/3 - * - ``MAX_SLASHING_PERIOD`` - - 2 cycles * - ``PERCENTAGE_OF_FROZEN_DEPOSITS_SLASHED_PER_DOUBLE_BAKING`` - 5% + * - ``SLASHING_DELAY`` + - 1 cycle The above list of protocol parameters is a subset of the :ref:`protocol constants `. diff --git a/docs/alpha/token_management.rst b/docs/alpha/token_management.rst index dc15b074e806..dc48e9022201 100644 --- a/docs/alpha/token_management.rst +++ b/docs/alpha/token_management.rst @@ -107,8 +107,8 @@ The field ``kind`` allows to identify the type of container account, it can have - just a ``"delegate"`` to designate collectively the deposits of all stakers and the delegate itself. - the field ``"cycle"`` contains either the cycle at which the funds have been - unstaked or the last unslashable cycle (``MAX_SLASHING_PERIOD + - CONSENSUS_RIGHTS_DELAY`` before current cycle) if it is greater than the unstaking + unstaked or the last unslashable cycle (``CONSENSUS_RIGHTS_DELAY + + SLASHING_DELAY + 1`` before current cycle) if it is greater than the unstaking cycle. - ``"bonds"`` represents the accounts of frozen bonds. Bonds are like deposits. -- GitLab From 31d4f4d7d7974000262ac6516b908b581cffa9a0 Mon Sep 17 00:00:00 2001 From: Diane Gallois-Wong Date: Wed, 22 Jan 2025 16:30:03 +0100 Subject: [PATCH 2/2] Changelog: max_slashing_period replacement --- docs/protocols/alpha.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/protocols/alpha.rst b/docs/protocols/alpha.rst index 7607bec1698b..d37cf619ce1f 100644 --- a/docs/protocols/alpha.rst +++ b/docs/protocols/alpha.rst @@ -79,6 +79,17 @@ Protocol parameters - Rename ``consensus_threshold`` to ``consensus_threshold_size``. (MR :gl:`!15979`) +- Replace the ``max_slashing_period = 2`` protocol constant with two + constants ``denunciation_period = 1`` and ``slashing_delay = + 1``. The behavior of denunciations and slashing is unaffected by + this change. Indeed, ``denunciation_period`` represents how many + cycles after the misbehavior cycles still accept denunciations, + whereas ``max_slashing_period`` was the total number of cycles + accepting denunciation including the misbehavior cycle, so the + denunciation window remains the same. The slashing for a misbehavior + from cycle ``n`` still happens at the end of cycle ``n + + max_slashing_period - 1 = n + slashing_delay``. (MR :gl:`!15990`) + Bug Fixes --------- -- GitLab