diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-17 09:12:50 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:23 +0800 |
commit | 9493109f2be4507605e6b17e406bf8fd147ab3c8 (patch) | |
tree | 84fee3d1fb2095ff5ba793bdfccba89970bc8f89 /vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go | |
parent | 9ee92eff068b09246ab6446efa39abfc0c7bd8a8 (diff) | |
download | go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar.gz go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar.bz2 go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar.lz go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar.xz go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.tar.zst go-tangerine-9493109f2be4507605e6b17e406bf8fd147ab3c8.zip |
dex: implement recovery mechanism (#258)
* dex: implement recovery mechanism
The DEXON recovery protocol allows us to use the Ethereum blockchain as a
fallback consensus chain to coordinate recovery.
* fix
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go index 45a1fc7d5..ddd6c3bb9 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/interfaces.go @@ -101,8 +101,12 @@ type Governance interface { // Return the genesis configuration if round == 0. Configuration(round uint64) *types.Config - // CRS returns the CRS for a given round. - // Return the genesis CRS if round == 0. + // CRS returns the CRS for a given round. Return the genesis CRS if + // round == 0. + // + // The CRS returned is the proposed or latest reseted one, it would be + // changed later if corresponding DKG set failed to generate group public + // key. CRS(round uint64) common.Hash // Propose a CRS of round. @@ -162,3 +166,12 @@ type Ticker interface { // Retart the ticker and clear all internal data. Restart() } + +// Recovery interface for interacting with recovery information. +type Recovery interface { + // ProposeSkipBlock proposes a skip block. + ProposeSkipBlock(height uint64) error + + // Votes gets the number of votes of given height. + Votes(height uint64) (uint64, error) +} |