genesis

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: Apache-2.0, MIT Imports: 48 Imported by: 8

Documentation

Index

Constants

View Source
const AccountStart = 100
View Source
const MaxAccounts = MinerStart - AccountStart
View Source
const MinerStart = 1000

Variables

View Source
var GenesisNetworkVersion = func() network.Version {

	if build.UpgradeBreezeHeight >= 0 {
		return network.Version0
	}
	if build.UpgradeSmokeHeight >= 0 {
		return network.Version1
	}
	if build.UpgradeIgnitionHeight >= 0 {
		return network.Version2
	}
	if build.UpgradeActorsV2Height >= 0 {
		return network.Version3
	}
	if build.UpgradeLiftoffHeight >= 0 {
		return network.Version3
	}
	return build.ActorUpgradeNetworkVersion - 1
}()

TODO: Get from build TODO: make a list/schedule of these.

View Source
var RootVerifierID address.Address

Functions

func MakeInitialStateTree

func MakeInitialStateTree(ctx context.Context, bs bstore.Blockstore, template genesis.Template) (*state.StateTree, map[address.Address]address.Address, error)

func MinerAddress

func MinerAddress(genesisIndex uint64) address.Address

func SetupCronActor

func SetupCronActor(bs bstore.Blockstore) (*types.Actor, error)

func SetupInitActor

func SetupInitActor(bs bstore.Blockstore, netname string, initialActors []genesis.Actor, rootVerifier genesis.Actor, remainder genesis.Actor) (int64, *types.Actor, map[address.Address]address.Address, error)

func SetupRewardActor

func SetupRewardActor(bs bstore.Blockstore, qaPower big.Int) (*types.Actor, error)

func SetupStorageMarketActor

func SetupStorageMarketActor(bs bstore.Blockstore) (*types.Actor, error)

func SetupStorageMiners

func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid, miners []genesis.Miner) (cid.Cid, error)

func SetupStoragePowerActor

func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error)

func SetupSystemActor

func SetupSystemActor(bs bstore.Blockstore) (*types.Actor, error)

func SetupVerifiedRegistryActor

func SetupVerifiedRegistryActor(bs bstore.Blockstore) (*types.Actor, error)

func VerifyPreSealedData

func VerifyPreSealedData(ctx context.Context, cs *store.ChainStore, stateroot cid.Cid, template genesis.Template, keyIDs map[address.Address]address.Address) (cid.Cid, error)

Types

type GenesisBootstrap

type GenesisBootstrap struct {
	Genesis *types.BlockHeader
}

Jump to

Keyboard shortcuts

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