From f2a6d560f51dc23e440b714ef2e3753141b85eac Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Fri, 19 Nov 2021 15:42:48 +0800 Subject: [PATCH 1/5] add details of consensus fault slashing --- content/glossary/_index.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/content/glossary/_index.md b/content/glossary/_index.md index 5b622c9a7..93617704f 100644 --- a/content/glossary/_index.md +++ b/content/glossary/_index.md @@ -78,8 +78,22 @@ The algorithm(s) and logic needed so that the state of the blockchain is agreed ## Consensus Fault Slashing -Consensus Fault Slashing is the penalty that a miner incurs for committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality. - +Consensus Fault Slashing is the penalty that a miner incurs for committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality. the detailed error checking process is as follows + +1. whether byte data in params is legal block data +2. whether block epoch between UpgradeOrangeHeight - policy.ChainFinality and UpgradeOrangeHeight + policy.ChainFinality +3. two blocks cannot be the same +4. both blocks must be produced by the same miner +5. epoch of sencond block must bigger or equal than the first one +6. whether two blocks and extra blocks belongs to one of [three consensus faults](expected_consensus#types-of-faults +), +7. heck if the signature of both block is correct + - block epoch must be whthin lastest ChainFinality epoch after network version7 + - get the state when the block height is generated and than get the actor of message receiver,no gas fee is required + - to get the miner info of messager receiver in the previous step, requires a gas fee + - get worker address of miner,requires a gas fee. + - use the worker address obtained in the previous step to verify that the signature + ## Cron Actor The [_Cron Actor_](sysactors) is a scheduler actor that runs critical functions at every epoch. From 6e2765eab11aa0a4859f20ec347d3f12a70c1233 Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Fri, 19 Nov 2021 16:22:50 +0800 Subject: [PATCH 2/5] format --- content/glossary/_index.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/content/glossary/_index.md b/content/glossary/_index.md index 93617704f..2184beffa 100644 --- a/content/glossary/_index.md +++ b/content/glossary/_index.md @@ -81,19 +81,18 @@ The algorithm(s) and logic needed so that the state of the blockchain is agreed Consensus Fault Slashing is the penalty that a miner incurs for committing consensus faults. This penalty is applied to miners that have acted maliciously against the network's consensus functionality. the detailed error checking process is as follows 1. whether byte data in params is legal block data -2. whether block epoch between UpgradeOrangeHeight - policy.ChainFinality and UpgradeOrangeHeight + policy.ChainFinality +2. whether block epoch between UpgradeOrangeHeight - policy.ChainFinality and UpgradeOrangeHeight + policy.ChainFinality 3. two blocks cannot be the same 4. both blocks must be produced by the same miner 5. epoch of sencond block must bigger or equal than the first one -6. whether two blocks and extra blocks belongs to one of [three consensus faults](expected_consensus#types-of-faults -), +6. whether two blocks and extra blocks belongs to one of [three consensus faults](expected_consensus#types-of-faults), 7. heck if the signature of both block is correct - block epoch must be whthin lastest ChainFinality epoch after network version7 - get the state when the block height is generated and than get the actor of message receiver,no gas fee is required - to get the miner info of messager receiver in the previous step, requires a gas fee - get worker address of miner,requires a gas fee. - use the worker address obtained in the previous step to verify that the signature - + ## Cron Actor The [_Cron Actor_](sysactors) is a scheduler actor that runs critical functions at every epoch. From fc94ac6ffab8c26d485fb39b0d073c0e6fda093d Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Tue, 23 Nov 2021 13:17:15 +0800 Subject: [PATCH 3/5] update consensus fault penalty --- content/algorithms/expected_consensus/_index.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/content/algorithms/expected_consensus/_index.md b/content/algorithms/expected_consensus/_index.md index 7b5d5be85..888363d22 100644 --- a/content/algorithms/expected_consensus/_index.md +++ b/content/algorithms/expected_consensus/_index.md @@ -397,11 +397,14 @@ This is detectable when a given miner submits two blocks that satisfy any of the A single consensus fault results into: -- miner termination and removal of power from the power table, -- loss of all pledge collateral (which includes the initial pledge and blocks rewards yet to be vested) +- a higger penalty is applied, the amount is approximately the reward of the report height +- unable to become leader within ChainFinality epoch +- unable to submit PreCommitMessage, PreCommitBatchMessage and eclareFaultsRecovered message within ChainFinality epoch ### Detection and Reporting A node that detects and reports a consensus fault is called "slasher". Any user in Filecoin can be a slasher. They can report consensus faults by calling the `ReportConsensusFault` on the `StorageMinerActor` of the faulty miner. The slasher is rewarded with a portion of the penalty paid by the offending miner's `ConsensusFaultPenalty` for notifying the network of the consensus fault. Note that some slashers might not get the full reward because of the low balance of the offending miners. However rational honest miners are still incentivised to notify the network about consensus faults. The reward given to the slasher is a function of some initial share (`SLASHER_INITIAL_SHARE`) and growth rate (`SLASHER_SHARE_GROWTH_RATE`) and it has a maximum `maxReporterShare`. Slasher's share increases exponentially as epoch elapses since the block when the fault is committed (see `RewardForConsensusSlashReport`). Only the first slasher gets their share of the pledge collateral and the remaining pledge collateral is burned. The longer a slasher waits, the higher the likelihood that the slashed collateral will be claimed by another slasher. + + From e5f5cdd73964b5121a44a6ba198bcf05720ee0bf Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Wed, 1 Dec 2021 09:02:21 +0800 Subject: [PATCH 4/5] format --- content/algorithms/expected_consensus/_index.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/content/algorithms/expected_consensus/_index.md b/content/algorithms/expected_consensus/_index.md index 888363d22..9336aeb63 100644 --- a/content/algorithms/expected_consensus/_index.md +++ b/content/algorithms/expected_consensus/_index.md @@ -406,5 +406,3 @@ A single consensus fault results into: A node that detects and reports a consensus fault is called "slasher". Any user in Filecoin can be a slasher. They can report consensus faults by calling the `ReportConsensusFault` on the `StorageMinerActor` of the faulty miner. The slasher is rewarded with a portion of the penalty paid by the offending miner's `ConsensusFaultPenalty` for notifying the network of the consensus fault. Note that some slashers might not get the full reward because of the low balance of the offending miners. However rational honest miners are still incentivised to notify the network about consensus faults. The reward given to the slasher is a function of some initial share (`SLASHER_INITIAL_SHARE`) and growth rate (`SLASHER_SHARE_GROWTH_RATE`) and it has a maximum `maxReporterShare`. Slasher's share increases exponentially as epoch elapses since the block when the fault is committed (see `RewardForConsensusSlashReport`). Only the first slasher gets their share of the pledge collateral and the remaining pledge collateral is burned. The longer a slasher waits, the higher the likelihood that the slashed collateral will be claimed by another slasher. - - From f7db09f8c37b6881f8e7b2a3ae63423d64a4125e Mon Sep 17 00:00:00 2001 From: hunjixin <1084400399@qq.com> Date: Wed, 1 Dec 2021 09:07:30 +0800 Subject: [PATCH 5/5] fix spell --- content/algorithms/expected_consensus/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/algorithms/expected_consensus/_index.md b/content/algorithms/expected_consensus/_index.md index 9336aeb63..a73b6ec15 100644 --- a/content/algorithms/expected_consensus/_index.md +++ b/content/algorithms/expected_consensus/_index.md @@ -399,7 +399,7 @@ A single consensus fault results into: - a higger penalty is applied, the amount is approximately the reward of the report height - unable to become leader within ChainFinality epoch -- unable to submit PreCommitMessage, PreCommitBatchMessage and eclareFaultsRecovered message within ChainFinality epoch +- unable to submit PreCommitMessage, PreCommitBatchMessage and DeclareFaultsRecovered message within ChainFinality epoch ### Detection and Reporting