genesis

package
v0.2012.2 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Overview

Package genesis provides consensus config flags that should be part of the genesis state.

Index

Constants

View Source
const (
	// GasOpTxByte is the gas operation identifier for costing each transaction byte.
	GasOpTxByte transaction.Op = "tx_byte"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Genesis

type Genesis struct {
	Backend    string     `json:"backend"`
	Parameters Parameters `json:"params"`
}

Genesis contains various consensus config flags that should be part of the genesis state.

func (*Genesis) SanityCheck

func (g *Genesis) SanityCheck() error

SanityCheck does basic sanity checking on the genesis state.

type Parameters

type Parameters struct {
	TimeoutCommit      time.Duration `json:"timeout_commit"`
	SkipTimeoutCommit  bool          `json:"skip_timeout_commit"`
	EmptyBlockInterval time.Duration `json:"empty_block_interval"`

	MaxTxSize      uint64          `json:"max_tx_size"`
	MaxBlockSize   uint64          `json:"max_block_size"`
	MaxBlockGas    transaction.Gas `json:"max_block_gas"`
	MaxEvidenceNum uint32          `json:"max_evidence_num"`

	// StateCheckpointInterval is the expected state checkpoint interval (in blocks).
	StateCheckpointInterval uint64 `json:"state_checkpoint_interval"`
	// StateCheckpointNumKept is the expected minimum number of state checkpoints to keep.
	StateCheckpointNumKept uint64 `json:"state_checkpoint_num_kept,omitempty"`
	// StateCheckpointChunkSize is the chunk size parameter for checkpoint creation.
	StateCheckpointChunkSize uint64 `json:"state_checkpoint_chunk_size,omitempty"`

	// GasCosts are the base transaction gas costs.
	GasCosts transaction.Costs `json:"gas_costs,omitempty"`

	// PublicKeyBlacklist is the network-wide public key blacklist.
	PublicKeyBlacklist []signature.PublicKey `json:"public_key_blacklist,omitempty"`
}

Parameters are the consensus parameters.

Jump to

Keyboard shortcuts

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