Documentation ¶
Index ¶
- Variables
- type Attestation
- func (a Attestation) Bytes() (bytes []byte, err error)
- func (a *Attestation) Compare(other *Attestation) int
- func (a *Attestation) FromBytes(bytes []byte) (consumedBytes int, err error)
- func (a *Attestation) ID() models.BlockID
- func (a *Attestation) IssuerID() identity.ID
- func (a *Attestation) VerifySignature() (valid bool, err error)
- type Attestations
- type Events
- type Notarization
- type OutputsProvider
- type SlotCommittedDetails
Constants ¶
This section is empty.
Variables ¶
View Source
var NewEvents = event.CreateGroupConstructor(func() (self *Events) { return &Events{ SlotCommitted: event.New1[*SlotCommittedDetails](), AcceptedBlockRemoved: event.New1[models.BlockID](), Error: event.New1[error](), } })
NewEvents contains the constructor of the Events object (it is generated by a generic factory).
Functions ¶
This section is empty.
Types ¶
type Attestation ¶
type Attestation struct { IssuerPublicKey ed25519.PublicKey `serix:"0"` IssuingTime time.Time `serix:"1"` CommitmentID commitment.ID `serix:"2"` BlockContentHash types.Identifier `serix:"3"` Signature ed25519.Signature `serix:"4"` // contains filtered or unexported fields }
func NewAttestation ¶
func NewAttestation(block *models.Block, slotTimeProvider *slot.TimeProvider) *Attestation
func (Attestation) Bytes ¶
func (a Attestation) Bytes() (bytes []byte, err error)
func (*Attestation) Compare ¶
func (a *Attestation) Compare(other *Attestation) int
func (*Attestation) FromBytes ¶
func (a *Attestation) FromBytes(bytes []byte) (consumedBytes int, err error)
func (*Attestation) ID ¶
func (a *Attestation) ID() models.BlockID
func (*Attestation) IssuerID ¶
func (a *Attestation) IssuerID() identity.ID
func (*Attestation) VerifySignature ¶
func (a *Attestation) VerifySignature() (valid bool, err error)
type Attestations ¶
type Attestations interface { Get(index slot.Index) (attestations *ads.Map[identity.ID, Attestation, *identity.ID, *Attestation], err error) traits.Committable module.Interface }
type Events ¶
type Events struct { SlotCommitted *event.Event1[*SlotCommittedDetails] AcceptedBlockRemoved *event.Event1[models.BlockID] Error *event.Event1[error] event.Group[Events, *Events] }
Events is a container that acts as a dictionary for the events of the notarization manager.
type Notarization ¶
type Notarization interface { Events() *Events Attestations() Attestations // IsFullyCommitted returns if notarization finished committing all pending slots up to the current acceptance time. IsFullyCommitted() bool NotarizeAcceptedBlock(block *models.Block) (err error) NotarizeOrphanedBlock(block *models.Block) (err error) Import(reader io.ReadSeeker) (err error) Export(writer io.WriteSeeker, targetSlot slot.Index) (err error) PerformLocked(perform func(m Notarization)) module.Interface }
type OutputsProvider ¶
type OutputsProvider func(callback func(*mempool.OutputWithMetadata) error) error
type SlotCommittedDetails ¶
type SlotCommittedDetails struct { Commitment *commitment.Commitment AcceptedBlocks *ads.Set[models.BlockID, *models.BlockID] AcceptedTransactions *ads.Set[utxo.TransactionID, *utxo.TransactionID] SpentOutputs OutputsProvider CreatedOutputs OutputsProvider ActiveValidatorsCount int }
SlotCommittedDetails contains the details of a committed slot.
Click to show internal directories.
Click to hide internal directories.