Browse Source

adr: ADR-051: Double Signing Risk Reduction (#4262)

* Add adr-051 to docs

* add details

* Update docs/architecture/adr-051-double-signing-protection-with-tendermint-mode.md

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* rename adr-051 for only double singing protection

* remove contents about tendermint mode

* change title to Double Signing Rist Reduction

* rename adr md file

* add a adr link to ToC

Co-authored-by: b-harvest <38277329+dlguddus@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
pull/4344/head
dongsamb 4 years ago
committed by Anton Kaliaev
parent
commit
696e13e1ff
2 changed files with 54 additions and 0 deletions
  1. +1
    -0
      docs/architecture/README.md
  2. +53
    -0
      docs/architecture/adr-051-double-signing-risk-reduction.md

+ 1
- 0
docs/architecture/README.md View File

@ -64,4 +64,5 @@ Note the context/background should be written in the present tense.
- [ADR-039-Peer-Behaviour](./adr-039-peer-behaviour.md)
- [ADR-041-Proposer-Selection-via-ABCI](./adr-041-proposer-selection-via-abci.md)
- [ADR-043-Blockchain-RiRi-Org](./adr-043-blockchain-riri-org.md)
- [ADR-051-Double-Signing-Risk-Reduction](./adr-051-double-signing-risk-reduction.md)
- [ADR-052-Tendermint-Mode](./adr-052-tendermint-mode.md)

+ 53
- 0
docs/architecture/adr-051-double-signing-risk-reduction.md View File

@ -0,0 +1,53 @@
# ADR 051: Double Signing Risk Reduction
## Changelog
* 27-11-2019: Initial draft
* 13-01-2020: Separate into 2 ADR, This ADR will only cover Double signing Protection and ADR-052 handle Tendermint Mode
* 22-01-2020: change the title from "Double signing Protection" to "Double Signing Risk Reduction"
## Context
To provide a risk reduction method for double signing incidents mistakenly executed by validators
- Validators often mistakenly run duplicated validators to cause double-signing incident
- This proposed feature is to reduce the risk of mistaken double-signing incident by checking recent N blocks before voting begins
- When we think of such serious impact on double-signing incident, it is very reasonable to have multiple risk reduction algorithm built in node daemon
## Decision
We would like to suggest a double signing risk reduction method.
- Methodology : query recent consensus results to find out whether node's consensus key is used on consensus recently or not
- When to check
- When the state machine starts `ConsensusReactor` after fully synced
- When the node is validator ( with privValidator )
- When `cs.config.DoubleSignCheckHeight > 0`
- How to check
1. When a validator is transformed from syncing status to fully synced status, the state machine check recent N blocks (`latest_height - double_sign_check_height`) to find out whether there exists consensus votes using the validator's consensus key
2. If there exists votes from the validator's consensus key, exit state machine program
- Configuration
- We would like to suggest by introducing `double_sign_check_height` parameter in `config.toml` and cli, how many blocks state machine looks back to check votes
- `double_sign_check_height = {{ .Consensus.DoubleSignCheckHeight }}` in `config.toml`
- `tendermint node --double_sign_check_height` in cli
- State machine ignore checking procedure when `vote-check-height == 0`
## Status
Proposed
## Consequences
### Positive
- Validators can avoid double signing incident by mistakes. (eg. If another validator node is voting on consensus, starting new validator node with same consensus key will cause panic stop of the state machine because consensus votes with the consensus key are found in recent blocks)
- We expect this method will prevent majority of double signing incident by mistakes.
### Negative
- When the risk reduction method is on, restarting a validator node will panic because the node itself voted on consensus with the same consensus key. So, validators should stop the state machine, wait for some blocks, and then restart the state machine to avoid panic stop.
### Neutral
## References
- Issue [#4059](https://github.com/tendermint/tendermint/issues/4059) : double-signing protection

Loading…
Cancel
Save