pdp

package
v1.26.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: Apache-2.0, MIT Imports: 42 Imported by: 0

Documentation

Index

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

func Verify

func Verify(proof contract.PDPVerifierProof, root [32]byte, position uint64) bool

Types

type InitProvingPeriodTask

type InitProvingPeriodTask struct {
	// contains filtered or unexported fields
}

func (*InitProvingPeriodTask) Adder

func (ipp *InitProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*InitProvingPeriodTask) CanAccept

func (*InitProvingPeriodTask) Do

func (ipp *InitProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*InitProvingPeriodTask) TypeDetails

type InitProvingPeriodTaskChainApi

type InitProvingPeriodTaskChainApi interface {
	ChainHead(context.Context) (*chainTypes.TipSet, error)
}

type NextProvingPeriodTask

type NextProvingPeriodTask struct {
	// contains filtered or unexported fields
}

func (*NextProvingPeriodTask) Adder

func (n *NextProvingPeriodTask) Adder(taskFunc harmonytask.AddTaskFunc)

func (*NextProvingPeriodTask) CanAccept

func (*NextProvingPeriodTask) Do

func (n *NextProvingPeriodTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err error)

func (*NextProvingPeriodTask) TypeDetails

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 ProofSetCreate struct {
	CreateMessageHash string `db:"create_message_hash"`
	Service           string `db:"service"`
}

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 (*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) Do

func (p *ProveTask) Do(taskID harmonytask.TaskID, stillOwned func() bool) (done bool, err 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL