Documentation
¶
Index ¶
- Variables
- func ActorStore(ctx context.Context, bs blockstore.Blockstore) adt.Store
- func Copy(ctx context.Context, from, to blockstore.Blockstore, root cid.Cid) error
- type ChainFork
- func (c *ChainFork) GetForkUpgrade() *config.ForkUpgradeConfig
- func (c *ChainFork) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
- func (c *ChainFork) HandleStateForks(ctx context.Context, root cid.Cid, height abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) HasExpensiveFork(ctx context.Context, height abi.ChainEpoch) bool
- func (c *ChainFork) ParentState(ts *block.TipSet) cid.Cid
- func (c *ChainFork) StateTree(ctx context.Context, st cid.Cid) (*vmstate.State, error)
- func (c *ChainFork) UpgradeActorsV2(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) UpgradeCalico(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) UpgradeFaucetBurnRecovery(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) UpgradeIgnition(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) UpgradeLiftoff(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (c *ChainFork) UpgradeRefuel(ctx context.Context, root cid.Cid, epoch abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- type IFork
- type MockFork
- func (mockFork *MockFork) GetForkUpgrade() *config.ForkUpgradeConfig
- func (mockFork *MockFork) GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
- func (mockFork *MockFork) HandleStateForks(ctx context.Context, root cid.Cid, height abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
- func (mockFork *MockFork) HasExpensiveFork(ctx context.Context, height abi.ChainEpoch) bool
- type Upgrade
- type UpgradeFunc
- type UpgradeSchedule
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpensiveFork = errors.New("refusing explicit call due to state fork at epoch")
Functions ¶
func ActorStore ¶
func ActorStore(ctx context.Context, bs blockstore.Blockstore) adt.Store
func Copy ¶
func Copy(ctx context.Context, from, to blockstore.Blockstore, root cid.Cid) error
Types ¶
type ChainFork ¶
type ChainFork struct {
// contains filtered or unexported fields
}
func NewChainFork ¶
func NewChainFork(cr chainReader, ipldstore cbor.IpldStore, bs blockstore.Blockstore, forkUpgrade *config.ForkUpgradeConfig) (*ChainFork, error)
func (*ChainFork) GetForkUpgrade ¶
func (c *ChainFork) GetForkUpgrade() *config.ForkUpgradeConfig
func (*ChainFork) GetNtwkVersion ¶
func (*ChainFork) HandleStateForks ¶
func (*ChainFork) HasExpensiveFork ¶
func (*ChainFork) UpgradeActorsV2 ¶
func (*ChainFork) UpgradeCalico ¶
func (*ChainFork) UpgradeFaucetBurnRecovery ¶
func (*ChainFork) UpgradeIgnition ¶
func (*ChainFork) UpgradeLiftoff ¶
type IFork ¶
type IFork interface {
HandleStateForks(ctx context.Context, root cid.Cid, height abi.ChainEpoch, ts *block.TipSet) (cid.Cid, error)
GetNtwkVersion(ctx context.Context, height abi.ChainEpoch) network.Version
HasExpensiveFork(ctx context.Context, height abi.ChainEpoch) bool
GetForkUpgrade() *config.ForkUpgradeConfig
}
type MockFork ¶
type MockFork struct{}
func NewMockFork ¶
func NewMockFork() *MockFork
func (*MockFork) GetForkUpgrade ¶
func (mockFork *MockFork) GetForkUpgrade() *config.ForkUpgradeConfig
func (*MockFork) GetNtwkVersion ¶
func (*MockFork) HandleStateForks ¶
func (*MockFork) HasExpensiveFork ¶
type Upgrade ¶
type Upgrade struct {
Height abi.ChainEpoch
Network network.Version
Expensive bool
Migration UpgradeFunc
}
type UpgradeFunc ¶
type UpgradeFunc func(ctx context.Context, oldState cid.Cid, height abi.ChainEpoch, ts *block.TipSet) (newState cid.Cid, err error)
UpgradeFunc is a migration function run at every upgrade.
- The oldState is the state produced by the upgrade epoch.
- The returned newState is the new state that will be used by the next epoch.
- The height is the upgrade epoch height (already executed).
- The tipset is the tipset for the last non-null block before the upgrade. Do not assume that ts.Height() is the upgrade height.
type UpgradeSchedule ¶
type UpgradeSchedule []Upgrade
func (UpgradeSchedule) Validate ¶
func (us UpgradeSchedule) Validate() error
Click to show internal directories.
Click to hide internal directories.