Versions in this module Expand all Collapse all v1 v1.0.0 Aug 15, 2021 Changes in this version + const HCApply + const HCCurrent + const HCRevert + var DefaultChainIndexCacheSize = 32 << 10 + var DefaultMsgMetaCacheSize = 2048 + var DefaultTipSetCacheSize = 8192 + var ErrNotifeeDone = errors.New("notifee is done and should be removed") + func ActorStore(ctx context.Context, bs bstore.Blockstore) adt.Store + func ComputeNextBaseFee(baseFee types.BigInt, gasLimitUsed int64, noOfBlocks int, epoch abi.ChainEpoch) types.BigInt + func DrawRandomness(rbase []byte, pers crypto.DomainSeparationTag, round abi.ChainEpoch, ...) ([]byte, error) + func FlushValidationCache(ds datastore.Batching) error + func NewChainRand(cs *ChainStore, blks []cid.Cid) vm.Rand + func PutMessage(bs bstore.Blockstore, m storable) (cid.Cid, error) + func ReorgOps(lts func(types.TipSetKey) (*types.TipSet, error), a, b *types.TipSet) ([]*types.TipSet, []*types.TipSet, error) + type BlockMessages struct + BlsMessages []types.ChainMsg + Miner address.Address + SecpkMessages []types.ChainMsg + WinCount int64 + type ChainIndex struct + func NewChainIndex(lts loadTipSetFunc) *ChainIndex + func (ci *ChainIndex) GetTipsetByHeight(_ context.Context, from *types.TipSet, to abi.ChainEpoch) (*types.TipSet, error) + func (ci *ChainIndex) GetTipsetByHeightWithoutCache(from *types.TipSet, to abi.ChainEpoch) (*types.TipSet, error) + type ChainStore struct + func NewChainStore(chainBs bstore.Blockstore, stateBs bstore.Blockstore, ds dstore.Batching, ...) *ChainStore + func (cs *ChainStore) ActorStore(ctx context.Context) adt.Store + func (cs *ChainStore) AddBlock(ctx context.Context, b *types.BlockHeader) error + func (cs *ChainStore) AddToTipSetTracker(b *types.BlockHeader) error + func (cs *ChainStore) BlockMsgsForTipset(ts *types.TipSet) ([]BlockMessages, error) + func (cs *ChainStore) ChainBlockstore() bstore.Blockstore + func (cs *ChainStore) Close() error + func (cs *ChainStore) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error) + func (cs *ChainStore) Contains(ts *types.TipSet) (bool, error) + func (cs *ChainStore) Export(ctx context.Context, ts *types.TipSet, inclRecentRoots abi.ChainEpoch, ...) error + func (cs *ChainStore) FlushValidationCache() error + func (cs *ChainStore) ForceHeadSilent(_ context.Context, ts *types.TipSet) error + func (cs *ChainStore) GetBeaconRandomness(ctx context.Context, blks []cid.Cid, pers crypto.DomainSeparationTag, ...) ([]byte, error) + func (cs *ChainStore) GetBlock(c cid.Cid) (*types.BlockHeader, error) + func (cs *ChainStore) GetCMessage(c cid.Cid) (types.ChainMsg, error) + func (cs *ChainStore) GetChainRandomness(ctx context.Context, blks []cid.Cid, pers crypto.DomainSeparationTag, ...) ([]byte, error) + func (cs *ChainStore) GetGenesis() (*types.BlockHeader, error) + func (cs *ChainStore) GetHeaviestTipSet() *types.TipSet + func (cs *ChainStore) GetLatestBeaconEntry(ts *types.TipSet) (*types.BeaconEntry, error) + func (cs *ChainStore) GetMessage(c cid.Cid) (*types.Message, error) + func (cs *ChainStore) GetParentReceipt(b *types.BlockHeader, i int) (*types.MessageReceipt, error) + func (cs *ChainStore) GetPath(ctx context.Context, from types.TipSetKey, to types.TipSetKey) ([]*api.HeadChange, error) + func (cs *ChainStore) GetSignedMessage(c cid.Cid) (*types.SignedMessage, error) + func (cs *ChainStore) GetTipSetFromKey(tsk types.TipSetKey) (*types.TipSet, error) + func (cs *ChainStore) GetTipsetByHeight(ctx context.Context, h abi.ChainEpoch, ts *types.TipSet, prev bool) (*types.TipSet, error) + func (cs *ChainStore) Import(r io.Reader) (*types.TipSet, error) + func (cs *ChainStore) IsAncestorOf(a, b *types.TipSet) (bool, error) + func (cs *ChainStore) IsBlockValidated(ctx context.Context, blkid cid.Cid) (bool, error) + func (cs *ChainStore) Load() error + func (cs *ChainStore) LoadMessagesFromCids(cids []cid.Cid) ([]*types.Message, error) + func (cs *ChainStore) LoadSignedMessagesFromCids(cids []cid.Cid) ([]*types.SignedMessage, error) + func (cs *ChainStore) LoadTipSet(tsk types.TipSetKey) (*types.TipSet, error) + func (cs *ChainStore) MarkBlockAsValidated(ctx context.Context, blkid cid.Cid) error + func (cs *ChainStore) MaybeTakeHeavierTipSet(ctx context.Context, ts *types.TipSet) error + func (cs *ChainStore) MessagesForBlock(b *types.BlockHeader) ([]*types.Message, []*types.SignedMessage, error) + func (cs *ChainStore) MessagesForTipset(ts *types.TipSet) ([]types.ChainMsg, error) + func (cs *ChainStore) NearestCommonAncestor(a, b *types.TipSet) (*types.TipSet, error) + func (cs *ChainStore) PersistBlockHeaders(b ...*types.BlockHeader) error + func (cs *ChainStore) PutMessage(m storable) (cid.Cid, error) + func (cs *ChainStore) PutTipSet(ctx context.Context, ts *types.TipSet) error + func (cs *ChainStore) ReadMsgMetaCids(mmc cid.Cid) ([]cid.Cid, []cid.Cid, error) + func (cs *ChainStore) ReorgOps(a, b *types.TipSet) ([]*types.TipSet, []*types.TipSet, error) + func (cs *ChainStore) SetGenesis(b *types.BlockHeader) error + func (cs *ChainStore) SetHead(ts *types.TipSet) error + func (cs *ChainStore) StateBlockstore() bstore.Blockstore + func (cs *ChainStore) SubHeadChanges(ctx context.Context) chan []*api.HeadChange + func (cs *ChainStore) SubscribeHeadChanges(f ReorgNotifee) + func (cs *ChainStore) TryFillTipSet(ts *types.TipSet) (*FullTipSet, error) + func (cs *ChainStore) UnmarkBlockAsValidated(ctx context.Context, blkid cid.Cid) error + func (cs *ChainStore) VMSys() vm.SyscallBuilder + func (cs *ChainStore) WalkSnapshot(ctx context.Context, ts *types.TipSet, inclRecentRoots abi.ChainEpoch, ...) error + func (cs *ChainStore) Weight(ctx context.Context, ts *types.TipSet) (types.BigInt, error) + type FullTipSet struct + Blocks []*types.FullBlock + func NewFullTipSet(blks []*types.FullBlock) *FullTipSet + func (fts *FullTipSet) Cids() []cid.Cid + func (fts *FullTipSet) TipSet() *types.TipSet + type HeadChangeCoalescer struct + func NewHeadChangeCoalescer(fn ReorgNotifee, minDelay, maxDelay, mergeInterval time.Duration) *HeadChangeCoalescer + func (c *HeadChangeCoalescer) Close() error + func (c *HeadChangeCoalescer) HeadChange(revert, apply []*types.TipSet) error + type HeadChangeEvt struct + ApplyCount int + From types.TipSetKey + FromHeight abi.ChainEpoch + RevertCount int + To types.TipSetKey + ToHeight abi.ChainEpoch + type ReorgNotifee = func(rev, app []*types.TipSet) error + func WrapHeadChangeCoalescer(fn ReorgNotifee, minDelay, maxDelay, mergeInterval time.Duration) ReorgNotifee