Documentation ¶
Index ¶
- func ActorHeadKey(addr address.Address, head cid.Cid) string
- func ExpirationsAmtKey(expirationsAmt cid.Cid) string
- func MarketPrevDealProposalsInKey(m address.Address) string
- func MarketPrevDealStatesInKey(m address.Address) string
- func MarketPrevDealStatesOutKey(m address.Address) string
- func MarketPrevProviderSectorsOutKey(m address.Address) string
- func MinerPrevSectorsInKey(m address.Address) string
- func MinerPrevSectorsOutKey(m address.Address) string
- func PartitionsAmtKey(partitionsAmt cid.Cid) string
- func RunMigration(ctx context.Context, cfg Config, cache MigrationCache, store cbor.IpldStore, ...) (*builtin.ActorTree, error)
- func SectorsAmtKey(sectorsAmt cid.Cid) string
- type ActorMigration
- type ActorMigrationInput
- type ActorMigrationResult
- type CachedMigrator
- type CodeMigrator
- type Config
- type Logger
- type MemMigrationCache
- func (m *MemMigrationCache) Clone() *MemMigrationCache
- func (m *MemMigrationCache) Load(key string, loadFunc func() (cid.Cid, error)) (cid.Cid, error)
- func (m *MemMigrationCache) Read(key string) (bool, cid.Cid, error)
- func (m *MemMigrationCache) Update(other *MemMigrationCache)
- func (m *MemMigrationCache) Write(key string, c cid.Cid) error
- type MigrationCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActorHeadKey ¶
func ActorHeadKey(addr address.Address, head cid.Cid) string
func ExpirationsAmtKey ¶
func ExpirationsAmtKey(expirationsAmt cid.Cid) string
func MarketPrevDealProposalsInKey ¶ added in v0.13.1
func MarketPrevDealProposalsInKey(m address.Address) string
func MarketPrevDealStatesInKey ¶ added in v0.13.1
func MarketPrevDealStatesInKey(m address.Address) string
func MarketPrevDealStatesOutKey ¶ added in v0.13.1
func MarketPrevDealStatesOutKey(m address.Address) string
func MarketPrevProviderSectorsOutKey ¶ added in v0.13.1
func MarketPrevProviderSectorsOutKey(m address.Address) string
func MinerPrevSectorsInKey ¶
func MinerPrevSectorsInKey(m address.Address) string
func MinerPrevSectorsOutKey ¶
func MinerPrevSectorsOutKey(m address.Address) string
func PartitionsAmtKey ¶
func PartitionsAmtKey(partitionsAmt cid.Cid) string
func RunMigration ¶ added in v0.11.0
func SectorsAmtKey ¶
func SectorsAmtKey(sectorsAmt cid.Cid) string
Types ¶
type ActorMigration ¶
type ActorMigration interface { // MigrateState 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, input ActorMigrationInput) (result *ActorMigrationResult, err error) MigratedCodeCID() cid.Cid // Deferred returns true if this migration should be run after all non-deferred migrations have completed. Deferred() bool }
func CachedMigration ¶
func CachedMigration(cache MigrationCache, m ActorMigration) ActorMigration
type ActorMigrationInput ¶
type ActorMigrationInput struct { Address address.Address // actor's address Head cid.Cid Cache MigrationCache // cache of existing cid -> cid migrations for this actor }
type ActorMigrationResult ¶
type ActorMigrationResult struct { NewCodeCID cid.Cid NewHead cid.Cid }
type CachedMigrator ¶
type CachedMigrator struct { ActorMigration // contains filtered or unexported fields }
Migrator that uses cached transformation if it exists
func (CachedMigrator) Deferred ¶ added in v0.13.1
func (c CachedMigrator) Deferred() bool
func (CachedMigrator) MigrateState ¶
func (c CachedMigrator) MigrateState(ctx context.Context, store cbor.IpldStore, in ActorMigrationInput) (*ActorMigrationResult, error)
type CodeMigrator ¶
type CodeMigrator struct {
OutCodeCID cid.Cid
}
Migrator which preserves the head CID and provides a fixed result code CID.
func (CodeMigrator) Deferred ¶ added in v0.13.1
func (n CodeMigrator) Deferred() bool
func (CodeMigrator) MigrateState ¶
func (n CodeMigrator) MigrateState(_ context.Context, _ cbor.IpldStore, in ActorMigrationInput) (*ActorMigrationResult, error)
func (CodeMigrator) MigratedCodeCID ¶
func (n CodeMigrator) MigratedCodeCID() cid.Cid
type Config ¶
type Config struct { // Number of migration worker goroutines to run. // More workers enables higher CPU utilization doing migration computations (including state encoding) MaxWorkers uint // Capacity of the queue of jobs available to workers (zero for unbuffered). // A queue length of hundreds to thousands improves throughput at the cost of memory. JobQueueSize uint // Capacity of the queue receiving migration results from workers, for persisting (zero for unbuffered). // A queue length of tens to hundreds improves throughput at the cost of memory. ResultQueueSize uint // Time between progress logs to emit. // Zero (the default) results in no progress logs. ProgressLogPeriod time.Duration // The epoch at which the upgrade will run. UpgradeEpoch abi.ChainEpoch }
Config parameterizes a state tree migration
type MemMigrationCache ¶
func NewMemMigrationCache ¶
func NewMemMigrationCache() *MemMigrationCache
func (*MemMigrationCache) Clone ¶
func (m *MemMigrationCache) Clone() *MemMigrationCache
func (*MemMigrationCache) Load ¶
func (m *MemMigrationCache) Load(key string, loadFunc func() (cid.Cid, error)) (cid.Cid, error)
func (*MemMigrationCache) Read ¶
func (m *MemMigrationCache) Read(key string) (bool, cid.Cid, error)
func (*MemMigrationCache) Update ¶
func (m *MemMigrationCache) Update(other *MemMigrationCache)
func (*MemMigrationCache) Write ¶
func (m *MemMigrationCache) Write(key string, c cid.Cid) error
Click to show internal directories.
Click to hide internal directories.