reconfig

package
v0.0.0-...-9fbb145 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 13, 2021 License: MIT Imports: 28 Imported by: 1

Documentation

Overview

Package reconfig implements Cypherium reconfiguration.

Package reconfig implements Cypherium reconfiguration.

Index

Constants

View Source
const Gossip_MSG = 8

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {
	BlockChain() *core.BlockChain
	KeyBlockChain() *core.KeyBlockChain
	CandidatePool() *core.CandidatePool
	Engine() pow.Engine
	ExtIP() net.IP
	TxPool() *core.TxPool
}

Backend wraps all methods required for mining.

type Reconfig

type Reconfig struct {
	// contains filtered or unexported fields
}

Reconfig reconfiguration.

func NewReconfig

func NewReconfig(db cphdb.Database, cph Backend, config *params.ChainConfig, mux *event.TypeMux, engine pow.Engine, extIP net.IP) *Reconfig

NewReconfig call by backend

func (*Reconfig) CheckMinerPort

func (reconf *Reconfig) CheckMinerPort(addr string, blockN uint64, keyblockN uint64)

func (*Reconfig) Exceptions

func (reconf *Reconfig) Exceptions(blockNumber int64) []string

func (*Reconfig) ReconfigIsRunning

func (reconf *Reconfig) ReconfigIsRunning() bool

ReconfigIsRunning call by backend

func (*Reconfig) Start

func (reconf *Reconfig) Start(config *common.NodeConfig)

Start call by miner

func (*Reconfig) Stop

func (reconf *Reconfig) Stop()

Stop call by miner

func (*Reconfig) TakePartInNumberList

func (reconf *Reconfig) TakePartInNumberList(address common.Address, backCheckNumber int64) []string

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service work for protcol

func (*Service) Broadcast

func (s *Service) Broadcast(data *hotstuff.HotstuffMessage) []error

Broadcast call by hotstuff

func (*Service) CheckView

func (s *Service) CheckView(data []byte) error

CheckView call by hotstuff

func (*Service) Committee_OnStored

func (s *Service) Committee_OnStored(keyblock *types.KeyBlock, mb *bftview.Committee)

func (*Service) Committee_Request

func (s *Service) Committee_Request(kNumber uint64, hash common.Hash)

Request committee for keyblock

func (*Service) CurrentState

func (s *Service) CurrentState() ([]byte, string, uint64)

CurrentState call by hotstuff

func (*Service) Exceptions

func (s *Service) Exceptions(blockNumber int64) []string

func (*Service) GetCurrentView

func (s *Service) GetCurrentView() *bftview.View

func (*Service) GetExtra

func (s *Service) GetExtra() []byte

GetExtra call by hotstuff

func (*Service) GetPublicKey

func (s *Service) GetPublicKey() []*bls.PublicKey

GetPublicKey call by hotstuff

func (*Service) LeaderAckTime

func (s *Service) LeaderAckTime() time.Time

func (*Service) OnNewView

func (s *Service) OnNewView(data []byte, extraes [][]byte) error

OnNewView --------------------------------------------------------------------------

func (*Service) OnPropose

func (s *Service) OnPropose(isKeyBlock bool, state []byte, extra []byte) error

OnPropose call by hotstuff

func (*Service) OnViewDone

func (s *Service) OnViewDone(kSign *hotstuff.SignedState, tSign *hotstuff.SignedState) error

OnViewDone call by hotstuff

func (*Service) Propose

func (s *Service) Propose() (e error, kState []byte, tState []byte, extra []byte)

Propose call by hotstuff

func (*Service) ResetLeaderAckTime

func (s *Service) ResetLeaderAckTime()

func (*Service) Self

func (s *Service) Self() string

Self call by hotstuff

func (*Service) SwitchOK

func (s *Service) SwitchOK() bool

func (*Service) TakePartInNumberList

func (s *Service) TakePartInNumberList(address common.Address, checkKeyNumber int64) []string

func (*Service) Write

func (s *Service) Write(id string, data *hotstuff.HotstuffMessage) error

Write call by hotstuff------------------------------------------------------------------------------------------------

Directories

Path Synopsis
Package bftview implements Cypherium committee common operation functions.
Package bftview implements Cypherium committee common operation functions.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL