genesis

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2022 License: Apache-2.0, MIT Imports: 32 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Ticket = types.Ticket{
	VRFProof: []byte{
		0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec,
		0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec, 0xec,
	},
}

Ticket is the ticket to place in the genesis block header (which can't be derived from a prior ticket), used in the evaluation of the messages in the genesis block, and *also* the ticket value used when computing the genesis state (the parent state of the genesis block).

Functions

func Init

Init initializes a DefaultSyncer in the given repo.

Types

type InitFunc

type InitFunc func(cst cbor.IpldStore, bs blockstoreutil.Blockstore) (*types.BlockHeader, error)

InitFunc is the signature for function that is used to create a genesis block.

func LoadGenesis added in v1.7.0

func LoadGenesis(ctx context.Context, rep repo.Repo, sourceName string, network string) (InitFunc, error)

func MakeGenesis

func MakeGenesis(ctx context.Context, rep repo.Repo, outFile, genesisTemplate string, para *config.ForkUpgradeConfig) InitFunc

MakeGenesis return a func to construct a genesis block

type VM

type VM interface {
	ApplyGenesisMessage(from address.Address, to address.Address, method abi.MethodNum, value abi.TokenAmount, params interface{}) (*vm.Ret, error)
	Flush(ctx context.Context) (tree.Root, error)
}

VM is the view into the LegacyVM used during genesis block creation.

Jump to

Keyboard shortcuts

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