Documentation
¶
Index ¶
- Constants
- func NewWatcherCreate(db *harmonydb.DB, ethClient *ethclient.Client, pcs *chainsched.CurioChainSched)
- func NewWatcherRootAdd(db *harmonydb.DB, ethClient *ethclient.Client, pcs *chainsched.CurioChainSched)
- func Verify(proof contract.PDPVerifierProof, root [32]byte, position uint64) bool
- type InitProvingPeriodTask
- func (ipp *InitProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (ipp *InitProvingPeriodTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (ipp *InitProvingPeriodTask) TypeDetails() harmonytask.TaskTypeDetails
- type InitProvingPeriodTaskChainApi
- type NextProvingPeriodTask
- func (n *NextProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (n *NextProvingPeriodTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (n *NextProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (n *NextProvingPeriodTask) TypeDetails() harmonytask.TaskTypeDetails
- type NextProvingPeriodTaskChainApi
- type PDPNotifyTask
- func (t *PDPNotifyTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (t *PDPNotifyTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (t *PDPNotifyTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (t *PDPNotifyTask) TypeDetails() harmonytask.TaskTypeDetails
- type ProofSetCreate
- type ProofSetRootAdd
- type ProveTask
- func (p *ProveTask) Adder(taskFunc harmonytask.AddTaskFunc)
- func (p *ProveTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
- func (p *ProveTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
- func (p *ProveTask) GenerateProofs(ctx context.Context, pdpService *contract.PDPVerifier, proofSetID int64, ...) ([]contract.PDPVerifierProof, error)
- func (p *ProveTask) TypeDetails() harmonytask.TaskTypeDetails
- type ProveTaskChainApi
- type RootAddEntry
Constants ¶
View Source
const LeafSize = proof.NODE_SIZE
Variables ¶
This section is empty.
Functions ¶
func NewWatcherCreate ¶
func NewWatcherCreate(db *harmonydb.DB, ethClient *ethclient.Client, pcs *chainsched.CurioChainSched)
func NewWatcherRootAdd ¶
func NewWatcherRootAdd(db *harmonydb.DB, ethClient *ethclient.Client, pcs *chainsched.CurioChainSched)
NewWatcherRootAdd sets up the watcher for proof set root additions
Types ¶
type InitProvingPeriodTask ¶
type InitProvingPeriodTask struct {
// contains filtered or unexported fields
}
func NewInitProvingPeriodTask ¶
func NewInitProvingPeriodTask(db *harmonydb.DB, ethClient *ethclient.Client, fil NextProvingPeriodTaskChainApi, chainSched *chainsched.CurioChainSched, sender *message.SenderETH) *InitProvingPeriodTask
func (*InitProvingPeriodTask) Adder ¶
func (ipp *InitProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*InitProvingPeriodTask) CanAccept ¶
func (ipp *InitProvingPeriodTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*InitProvingPeriodTask) Do ¶
func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*InitProvingPeriodTask) TypeDetails ¶
func (ipp *InitProvingPeriodTask) TypeDetails() harmonytask.TaskTypeDetails
type InitProvingPeriodTaskChainApi ¶
type InitProvingPeriodTaskChainApi interface {
ChainHead(context.Context) (*chainTypes.TipSet, error)
}
type NextProvingPeriodTask ¶
type NextProvingPeriodTask struct {
// contains filtered or unexported fields
}
func NewNextProvingPeriodTask ¶
func NewNextProvingPeriodTask(db *harmonydb.DB, ethClient *ethclient.Client, fil NextProvingPeriodTaskChainApi, chainSched *chainsched.CurioChainSched, sender *message.SenderETH) *NextProvingPeriodTask
func (*NextProvingPeriodTask) Adder ¶
func (n *NextProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*NextProvingPeriodTask) CanAccept ¶
func (n *NextProvingPeriodTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*NextProvingPeriodTask) Do ¶
func (n *NextProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*NextProvingPeriodTask) TypeDetails ¶
func (n *NextProvingPeriodTask) TypeDetails() harmonytask.TaskTypeDetails
type NextProvingPeriodTaskChainApi ¶
type NextProvingPeriodTaskChainApi interface {
ChainHead(context.Context) (*chainTypes.TipSet, error)
}
type PDPNotifyTask ¶
type PDPNotifyTask struct {
// contains filtered or unexported fields
}
func NewPDPNotifyTask ¶
func NewPDPNotifyTask(db *harmonydb.DB) *PDPNotifyTask
func (*PDPNotifyTask) Adder ¶
func (t *PDPNotifyTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*PDPNotifyTask) CanAccept ¶
func (t *PDPNotifyTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*PDPNotifyTask) Do ¶
func (t *PDPNotifyTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)
func (*PDPNotifyTask) TypeDetails ¶
func (t *PDPNotifyTask) TypeDetails() harmonytask.TaskTypeDetails
type ProofSetCreate ¶
type ProofSetRootAdd ¶
type ProofSetRootAdd struct {
ProofSet uint64 `db:"proofset"`
AddMessageHash string `db:"add_message_hash"`
}
Structures to represent database records
type ProveTask ¶
type ProveTask struct {
// contains filtered or unexported fields
}
func NewProveTask ¶
func NewProveTask(chainSched *chainsched.CurioChainSched, db *harmonydb.DB, ethClient *ethclient.Client, fil ProveTaskChainApi, sender *message.SenderETH, cpr *cachedreader.CachedPieceReader) *ProveTask
func (*ProveTask) Adder ¶
func (p *ProveTask) Adder(taskFunc harmonytask.AddTaskFunc)
func (*ProveTask) CanAccept ¶
func (p *ProveTask) CanAccept(ids []harmonytask.TaskID, engine *harmonytask.TaskEngine) (*harmonytask.TaskID, error)
func (*ProveTask) GenerateProofs ¶
func (p *ProveTask) GenerateProofs(ctx context.Context, pdpService *contract.PDPVerifier, proofSetID int64, seed abi.Randomness, numChallenges int) ([]contract.PDPVerifierProof, error)
func (*ProveTask) TypeDetails ¶
func (p *ProveTask) TypeDetails() harmonytask.TaskTypeDetails
type ProveTaskChainApi ¶
type ProveTaskChainApi interface {
StateGetRandomnessDigestFromBeacon(ctx context.Context, randEpoch abi.ChainEpoch, tsk chainTypes.TipSetKey) (abi.Randomness, error) //perm:read
ChainHead(context.Context) (*chainTypes.TipSet, error) //perm:read
}
type RootAddEntry ¶
type RootAddEntry struct {
ProofSet uint64 `db:"proofset"`
Root string `db:"root"`
AddMessageHash string `db:"add_message_hash"`
AddMessageIndex uint64 `db:"add_message_index"`
Subroot string `db:"subroot"`
SubrootOffset int64 `db:"subroot_offset"`
SubrootSize int64 `db:"subroot_size"`
PDPPieceRefID int64 `db:"pdp_pieceref"`
AddMessageOK *bool `db:"add_message_ok"`
PDPProofSetID uint64 `db:"proofset"`
}
RootAddEntry represents entries from pdp_proofset_root_adds
Click to show internal directories.
Click to hide internal directories.