types11

package
v1.1.0-beta7 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 12 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ABCIPubKeyTypeEd25519   = "ed25519"
	ABCIPubKeyTypeSr25519   = "sr25519"
	ABCIPubKeyTypeSecp256k1 = "secp256k1"

	MaxBlockSizeBytes = 104857600
)
View Source
const (
	MaxChainIDLen = 50
)

Variables

Functions

This section is empty.

Types

type Address

type Address = crypto.Address

type AppState

type AppState struct {
	Note         string             `json:"note"`
	StartHeight  uint64             `json:"start_height"`
	Validators   []Validator        `json:"validators,omitempty"`
	Candidates   []types.Candidate  `json:"candidates,omitempty"`
	Accounts     []types.Account    `json:"accounts,omitempty"`
	Coins        []Coin             `json:"coins,omitempty"`
	FrozenFunds  []types.FrozenFund `json:"frozen_funds,omitempty"`
	UsedChecks   []types.UsedCheck  `json:"used_checks,omitempty"`
	MaxGas       uint64             `json:"max_gas"`
	TotalSlashed string             `json:"total_slashed"`
}

type BlockParams

type BlockParams struct {
	MaxBytes int64 `json:"max_bytes"`
	MaxGas   int64 `json:"max_gas"`
	// Minimum time increment between consecutive blocks (in milliseconds)
	// Not exposed to the application.
	TimeIotaMs int64 `json:"time_iota_ms"`
}

func DefaultBlockParams

func DefaultBlockParams() BlockParams

type Coin

type Coin struct {
	Name      string           `json:"name"`
	Symbol    types.CoinSymbol `json:"symbol"`
	Volume    string           `json:"volume"`
	Crr       uint             `json:"crr"`
	Reserve   string           `json:"reserve"`
	MaxSupply string           `json:"max_supply"`
}

type ConsensusParams

type ConsensusParams struct {
	Block     BlockParams     `json:"block"`
	Evidence  EvidenceParams  `json:"evidence"`
	Validator ValidatorParams `json:"validator"`
}

func DefaultConsensusParams

func DefaultConsensusParams() *ConsensusParams

func (*ConsensusParams) Validate

func (params *ConsensusParams) Validate() error

type EvidenceParams

type EvidenceParams struct {
	MaxAgeNumBlocks int64         `json:"max_age_num_blocks"` // only accept new evidence more recent than this
	MaxAgeDuration  time.Duration `json:"max_age_duration"`
}

func DefaultEvidenceParams

func DefaultEvidenceParams() EvidenceParams

DefaultEvidenceParams Params returns a default EvidenceParams.

type GenesisDoc

type GenesisDoc struct {
	GenesisTime     time.Time          `json:"genesis_time"`
	ChainID         string             `json:"chain_id"`
	ConsensusParams *ConsensusParams   `json:"consensus_params,omitempty"`
	Validators      []GenesisValidator `json:"validators,omitempty"`
	AppHash         common.HexBytes    `json:"app_hash"`
	AppState        json.RawMessage    `json:"app_state,omitempty"`
}

func (*GenesisDoc) SaveAs

func (genDoc *GenesisDoc) SaveAs(file string) error

func (*GenesisDoc) ValidateAndComplete

func (genDoc *GenesisDoc) ValidateAndComplete() error

type GenesisValidator

type GenesisValidator struct {
	Address Address       `json:"address"`
	PubKey  crypto.PubKey `json:"pub_key"`
	Power   int64         `json:"power"`
	Name    string        `json:"name"`
}

type Validator

type Validator struct {
	TotalBipStake string          `json:"total_bip_stake"`
	PubKey        types.Pubkey    `json:"pub_key"`
	AccumReward   string          `json:"accum_reward"`
	AbsentTimes   *types.BitArray `json:"absent_times"`
}

type ValidatorParams

type ValidatorParams struct {
	PubKeyTypes []string `json:"pub_key_types"`
}

func DefaultValidatorParams

func DefaultValidatorParams() ValidatorParams

DefaultValidatorParams returns a default ValidatorParams, which allows only ed25519 pubkeys.

Jump to

Keyboard shortcuts

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