Documentation ¶
Index ¶
- func InputTreeBalance(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (abi.TokenAmount, error)
- func InputTreeBurntFunds(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (abi.TokenAmount, error)
- func InputTreeMinerAvailableBalance(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid) (map[address.Address]abi.TokenAmount, error)
- func MigrateStateTree(ctx context.Context, store cbor.IpldStore, stateRootIn cid.Cid, ...) (cid.Cid, error)
- type ActorMigration
- type Config
- type MigrationInfo
- type PowerUpdater
- type PowerUpdates
- type StateMigration
- type StateMigrationResult
- type StringKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InputTreeBalance ¶
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 }
Click to show internal directories.
Click to hide internal directories.