github.com/klaytn/klaytn@v1.10.2/consensus/istanbul/doc.go (about) 1 // Copyright 2018 The klaytn Authors 2 // This file is part of the klaytn library. 3 // 4 // The klaytn library is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU Lesser General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // The klaytn library is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU Lesser General Public License for more details. 13 // 14 // You should have received a copy of the GNU Lesser General Public License 15 // along with the klaytn library. If not, see <http://www.gnu.org/licenses/>. 16 17 /* 18 Package istanbul is a BFT based consensus engine which implements consensus/Engine interface. 19 Istanbul engine was inspired by Clique POA, Hyperledger's SBFT, Tendermint, HydraChain and NCCU BFT. 20 21 Istanbul engine is using 3-phase consensus and it can tolerate F faulty nodes where N = 3F + 1 22 23 In Klaytn, it is being used as the main consensus engine after modification for supports of Committee, Reward and Governance. 24 Package istanbul has three sub-packages, core, backend, and validator. Please refer to each package's doc.go for more information. 25 26 Source Files 27 28 Various interfaces, constants and utility functions for Istanbul consensus engine 29 - `backend.go`: Defines Backend interface which provides application specific functions for Istanbul core 30 - `config.go`: Provides default configuration for Istanbul engine 31 - `errors.go`: Defines three errors used in Istanbul engine 32 - `events.go`: Defines events which are used for Istanbul engine communication 33 - `types.go`: Defines message structs such as Proposal, Request, View, Preprepare, Subject and ConsensusMsg 34 - `utils.go`: Provides three utility functions: RLPHash, GetSignatureAddress and CheckValidatorSignature 35 - `validator.go`: Defines Validator, ValidatorSet interfaces and Validators, ProposalSelector types 36 */ 37 package istanbul