nv4

package
v2.3.12 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2021 License: Apache-2.0, MIT Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InputTreeBalance

func InputTreeBalance(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (abi.TokenAmount, error)

func InputTreeBurntFunds

func InputTreeBurntFunds(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (abi.TokenAmount, error)

InputTreeBurntFunds returns the current balance of the burnt funds actor as defined by the given state tree

func InputTreeMinerAvailableBalance

func InputTreeMinerAvailableBalance(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (map[address.Address]abi.TokenAmount, error)

InputTreeMinerAvailableBalance returns a map of every miner's outstanding available balance at the provided state tree. It is used for validating that the system has enough funds to unburn all debts and add them to fee debt.

func MigrateStateTree

func MigrateStateTree(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid, priorEpoch abi.ChainEpoch, cfg Config) (cid.Cid, error)

Migrates the filecoin state tree starting from the global state tree and upgrading all actor state.

Types

type ActorMigration

type ActorMigration struct {
	OutCodeCID     cid.Cid
	StateMigration StateMigration
}

type Config

type Config struct {
	MaxWorkers int
}

Config parameterizes a state tree migration

func DefaultConfig

func DefaultConfig() Config

type MigrationInfo

type MigrationInfo struct {
	// contains filtered or unexported fields
}

type PowerUpdater

type PowerUpdater interface {
	ApplyTo(*PowerUpdates)
}

type PowerUpdates

type PowerUpdates struct {
	// contains filtered or unexported fields
}

type StateMigration

type StateMigration interface {
	// Loads an actor's state from an input store and writes new state to an output store.
	// Returns the new state head CID.
	MigrateState(ctx context.Context, store cbor.IpldStore, head cid.Cid, info MigrationInfo) (result *StateMigrationResult, err error)
}

type StateMigrationResult

type StateMigrationResult struct {
	NewHead      cid.Cid
	Transfer     abi.TokenAmount
	PowerUpdates []PowerUpdater
}

type StringKey

type StringKey string

An adt.Map key that just preserves the underlying string.

func (StringKey) Key

func (k StringKey) Key() string

Jump to

Keyboard shortcuts

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