Documentation
¶
Index ¶
- Constants
- func AdjustInitActorStartID(ctx context.Context, bs blockstore.Blockstore, stateroot cid.Cid, val uint64) (cid.Cid, error)
- func ComputeProof(ctx context.Context, epp ElectionPoStProver, pi *ProofInput) (*types.EPostProof, error)
- func ComputeVRF(ctx context.Context, sign SignFunc, worker, miner address.Address, p uint64, ...) ([]byte, error)
- func MakeInitialStateTree(bs bstore.Blockstore, actmap map[address.Address]types.BigInt) (*state.StateTree, error)
- func MinerCreateBlock(ctx context.Context, sm *stmgr.StateManager, w *wallet.Wallet, ...) (*types.FullBlock, error)
- func SetupCronActor(bs bstore.Blockstore) (*types.Actor, error)
- func SetupInitActor(bs bstore.Blockstore, addrs []address.Address) (*types.Actor, error)
- func SetupStorageMarketActor(bs bstore.Blockstore, sroot cid.Cid, deals []actors.StorageDealProposal) (cid.Cid, error)
- func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid, gmcfg *GenMinerCfg) (cid.Cid, []actors.StorageDealProposal, error)
- func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error)
- func VerifyVRF(ctx context.Context, worker, miner address.Address, p uint64, ...) error
- type ChainGen
- func (cg *ChainGen) Genesis() *types.BlockHeader
- func (cg *ChainGen) GenesisCar() ([]byte, error)
- func (cg *ChainGen) NextTipSet() (*MinedTipSet, error)
- func (cg *ChainGen) NextTipSetFromMiners(base *types.TipSet, miners []address.Address) (*MinedTipSet, error)
- func (cg *ChainGen) ResyncBankerNonce(ts *types.TipSet) error
- func (cg *ChainGen) YieldRepo() (repo.Repo, error)
- type ElectionPoStProver
- type GenMinerCfg
- type GenesisBootstrap
- type MinedTipSet
- type MiningCheckAPI
- type ProofInput
- type SignFunc
Constants ¶
View Source
const ( DSepTicket = 1 DSepElectionPost = 2 )
Variables ¶
This section is empty.
Functions ¶
func AdjustInitActorStartID ¶
func AdjustInitActorStartID(ctx context.Context, bs blockstore.Blockstore, stateroot cid.Cid, val uint64) (cid.Cid, error)
func ComputeProof ¶
func ComputeProof(ctx context.Context, epp ElectionPoStProver, pi *ProofInput) (*types.EPostProof, error)
func ComputeVRF ¶
func MakeInitialStateTree ¶
func MinerCreateBlock ¶
func SetupCronActor ¶
func SetupCronActor(bs bstore.Blockstore) (*types.Actor, error)
func SetupInitActor ¶
func SetupInitActor(bs bstore.Blockstore, addrs []address.Address) (*types.Actor, error)
func SetupStorageMarketActor ¶
func SetupStorageMarketActor(bs bstore.Blockstore, sroot cid.Cid, deals []actors.StorageDealProposal) (cid.Cid, error)
func SetupStorageMiners ¶
func SetupStorageMiners(ctx context.Context, cs *store.ChainStore, sroot cid.Cid, gmcfg *GenMinerCfg) (cid.Cid, []actors.StorageDealProposal, error)
func SetupStoragePowerActor ¶
func SetupStoragePowerActor(bs bstore.Blockstore) (*types.Actor, error)
Types ¶
type ChainGen ¶
type ChainGen struct { CurTipset *store.FullTipSet Timestamper func(*types.TipSet, uint64) uint64 Miners []address.Address // contains filtered or unexported fields }
func NewGenerator ¶
func (*ChainGen) Genesis ¶
func (cg *ChainGen) Genesis() *types.BlockHeader
func (*ChainGen) GenesisCar ¶
func (*ChainGen) NextTipSet ¶
func (cg *ChainGen) NextTipSet() (*MinedTipSet, error)
func (*ChainGen) NextTipSetFromMiners ¶
func (cg *ChainGen) NextTipSetFromMiners(base *types.TipSet, miners []address.Address) (*MinedTipSet, error)
func (*ChainGen) ResyncBankerNonce ¶
This function is awkward. It's used to deal with messages made when simulating forks
type ElectionPoStProver ¶
type ElectionPoStProver interface { GenerateCandidates(context.Context, sectorbuilder.SortedPublicSectorInfo, []byte) ([]sectorbuilder.EPostCandidate, error) ComputeProof(context.Context, sectorbuilder.SortedPublicSectorInfo, []byte, []sectorbuilder.EPostCandidate) ([]byte, error) }
type GenMinerCfg ¶
type GenMinerCfg struct { PreSeals map[string]genesis.GenesisMiner // The addresses of the created miner, this is set by the genesis setup MinerAddrs []address.Address PeerIDs []peer.ID }
type GenesisBootstrap ¶
type GenesisBootstrap struct {
Genesis *types.BlockHeader
}
func MakeGenesisBlock ¶
func MakeGenesisBlock(bs bstore.Blockstore, balances map[address.Address]types.BigInt, gmcfg *GenMinerCfg, ts uint64) (*GenesisBootstrap, error)
type MinedTipSet ¶
type MinedTipSet struct { TipSet *store.FullTipSet Messages []*types.SignedMessage }
type MiningCheckAPI ¶
type MiningCheckAPI interface { ChainGetRandomness(context.Context, types.TipSetKey, int64) ([]byte, error) StateMinerPower(context.Context, address.Address, *types.TipSet) (api.MinerPower, error) StateMinerWorker(context.Context, address.Address, *types.TipSet) (address.Address, error) StateMinerSectorSize(context.Context, address.Address, *types.TipSet) (uint64, error) StateMinerProvingSet(context.Context, address.Address, *types.TipSet) ([]*api.ChainSectorInfo, error) WalletSign(context.Context, address.Address, []byte) (*types.Signature, error) }
type ProofInput ¶
type ProofInput struct {
// contains filtered or unexported fields
}
func IsRoundWinner ¶
func IsRoundWinner(ctx context.Context, ts *types.TipSet, round int64, miner address.Address, epp ElectionPoStProver, a MiningCheckAPI) (*ProofInput, error)
Click to show internal directories.
Click to hide internal directories.