Documentation ¶
Index ¶
- Variables
- func InitDefaultKeypairs(idx int) (PubKey, PrivKey, []ValidatorInfo)
- type Poa
- func (h *Poa) AmILeader(blockHeight common.BlockNum) bool
- func (h *Poa) CheckTxn(txn *types.SignedTxn) error
- func (h *Poa) CompeteLeader(blockHeight common.BlockNum) common.Address
- func (h *Poa) EndBlock(block *types.Block)
- func (h *Poa) FinalizeBlock(block *types.Block)
- func (h *Poa) InitChain(block *types.Block)
- func (h *Poa) IsValidator(addr common.Address) bool
- func (h *Poa) LocalAddress() common.Address
- func (h *Poa) StartBlock(block *types.Block)
- func (h *Poa) ValidatorsP2pID() (peers []peer.ID)
- func (h *Poa) VerifyBlock(block *types.Block) error
- type PoaConfig
- type ValidatorConf
- type ValidatorInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultSecrets = []string{
"node1",
"node2",
"node3",
}
Functions ¶
func InitDefaultKeypairs ¶
func InitDefaultKeypairs(idx int) (PubKey, PrivKey, []ValidatorInfo)
Types ¶
type Poa ¶
type Poa struct { *tripod.Tripod MevLess *MEVless.MEVless `tripod:"mevless,omitempty"` // contains filtered or unexported fields }
func (*Poa) FinalizeBlock ¶
func (*Poa) LocalAddress ¶
func (*Poa) StartBlock ¶
func (*Poa) ValidatorsP2pID ¶
type PoaConfig ¶
type PoaConfig struct { KeyType string `toml:"key_type"` // secret for generating keypair. MySecret string `toml:"my_secret"` Validators []*ValidatorConf `toml:"validators"` // block out interval, millisecond BlockInterval int `toml:"block_interval"` // the number of packing txns from txpool, default 5000 PackNum uint64 `toml:"pack_num"` PrettyLog bool `toml:"pretty_log"` }
func DefaultCfg ¶
func LoadCfgFromPath ¶ added in v1.1.0
type ValidatorConf ¶
Click to show internal directories.
Click to hide internal directories.