Documentation ¶
Index ¶
- func Add(db sql.Executor, atx *types.VerifiedActivationTx) error
- func AddCheckpointed(db sql.Executor, catx *CheckpointAtx) error
- func All(db sql.Executor) ([]types.ATXID, error)
- func CommitmentATX(db sql.Executor, nodeID types.NodeID) (id types.ATXID, err error)
- func Get(db sql.Executor, id types.ATXID) (*types.VerifiedActivationTx, error)
- func GetBlob(db sql.Executor, id []byte) (buf []byte, err error)
- func GetByEpochAndNodeID(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (*types.VerifiedActivationTx, error)
- func GetFirstIDByNodeID(db sql.Executor, nodeID types.NodeID) (id types.ATXID, err error)
- func GetIDByEpochAndNodeID(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (id types.ATXID, err error)
- func GetIDWithMaxHeight(db sql.Executor, pref types.NodeID) (types.ATXID, error)
- func GetIDsByEpoch(db sql.Executor, epoch types.EpochID) (ids []types.ATXID, err error)
- func GetLastIDByNodeID(db sql.Executor, nodeID types.NodeID) (id types.ATXID, err error)
- func Has(db sql.Executor, id types.ATXID) (bool, error)
- func IterateAtxs(db sql.Executor, from, to types.EpochID, ...) error
- func LatestEpoch(db sql.Executor) (types.EpochID, error)
- func VRFNonce(db sql.Executor, id types.NodeID, epoch types.EpochID) (nonce types.VRFPostIndex, err error)
- type CheckpointAtx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Add ¶
func Add(db sql.Executor, atx *types.VerifiedActivationTx) error
Add adds an ATX for a given ATX ID.
func AddCheckpointed ¶
func AddCheckpointed(db sql.Executor, catx *CheckpointAtx) error
func CommitmentATX ¶
func GetByEpochAndNodeID ¶
func GetByEpochAndNodeID( db sql.Executor, epoch types.EpochID, nodeID types.NodeID, ) (*types.VerifiedActivationTx, error)
GetByEpochAndNodeID gets any ATX by the specified NodeID published in the given epoch.
func GetFirstIDByNodeID ¶
GetFirstIDByNodeID gets the initial ATX ID for a given node ID.
func GetIDByEpochAndNodeID ¶
func GetIDByEpochAndNodeID(db sql.Executor, epoch types.EpochID, nodeID types.NodeID) (id types.ATXID, err error)
GetIDByEpochAndNodeID gets an ATX ID for a given epoch and node ID.
func GetIDWithMaxHeight ¶
GetIDWithMaxHeight returns the ID of the atx from the last 2 epoch with the highest (or tied for the highest) tick height. It is possible that some poet servers are faster than others and the network ends up having its highest ticked atx still in previous epoch and the atxs building on top of it have not been published yet. Selecting from the last two epochs to strike a balance between being fair to honest miners while not giving unfair advantage for malicious actors who retroactively publish a high tick atx many epochs back.
func GetIDsByEpoch ¶
GetIDsByEpoch gets ATX IDs for a given epoch.
func GetLastIDByNodeID ¶
GetLastIDByNodeID gets the last ATX ID for a given node ID.