nipost

package
v1.6.6-alpha.0-fix-poe... Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddChallenge

func AddChallenge(db sql.Executor, nodeID types.NodeID, ch *types.NIPostChallenge) error

func AddNIPost added in v1.4.0

func AddNIPost(db sql.Executor, nodeID types.NodeID, nipost *NIPostState) error

func AddPoetRegistration added in v1.4.0

func AddPoetRegistration(
	db sql.Executor,
	nodeID types.NodeID,
	registration PoETRegistration,
) error

func AddPost added in v1.6.0

func AddPost(db sql.Executor, nodeID types.NodeID, post Post) error

func Challenge

func Challenge(db sql.Executor, nodeID types.NodeID) (*types.NIPostChallenge, error)

func ClearPoetRegistrations added in v1.4.0

func ClearPoetRegistrations(db sql.Executor, nodeID types.NodeID) error

func PoetProofRef added in v1.4.0

func PoetProofRef(db sql.Executor, nodeID types.NodeID) (types.PoetProofRef, *types.MerkleProof, error)

func PoetRegistrationCount added in v1.4.0

func PoetRegistrationCount(db sql.Executor, nodeID types.NodeID) (int, error)

func RemoveChallenge

func RemoveChallenge(db sql.Executor, nodeID types.NodeID) error

func RemoveNIPost added in v1.4.0

func RemoveNIPost(db sql.Executor, nodeID types.NodeID) error

func RemovePost added in v1.6.0

func RemovePost(db sql.Executor, nodeID types.NodeID) error

func UpdateChallenge

func UpdateChallenge(db sql.Executor, nodeID types.NodeID, ch *types.NIPostChallenge) error

func UpdatePoetProofRef added in v1.4.0

func UpdatePoetProofRef(
	db sql.Executor,
	nodeID types.NodeID,
	ref types.PoetProofRef,
	membership *types.MerkleProof,
) error

Types

type NIPostState added in v1.4.0

type NIPostState struct {
	*types.NIPost

	NumUnits uint32
	VRFNonce types.VRFPostIndex
}

func NIPost added in v1.4.0

func NIPost(db sql.Executor, nodeID types.NodeID) (*NIPostState, error)

type PoETRegistration added in v1.4.0

type PoETRegistration struct {
	ChallengeHash types.Hash32
	Address       string
	RoundID       string
	RoundEnd      time.Time
}

func PoetRegistrations added in v1.4.0

func PoetRegistrations(db sql.Executor, nodeID types.NodeID) ([]PoETRegistration, error)

type Post

type Post struct {
	Nonce     uint32
	Indices   []byte
	Pow       uint64
	Challenge []byte

	NumUnits      uint32
	CommitmentATX types.ATXID
	VRFNonce      types.VRFPostIndex
}

func GetPost added in v1.6.0

func GetPost(db sql.Executor, nodeID types.NodeID) (*Post, error)

Jump to

Keyboard shortcuts

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