attestation

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attestations

type Attestations interface {
	// Get returns the attestations that are included in the commitment of the given slot as list.
	// If attestationCommitmentOffset=3 and commitment is 10, then the returned attestations are blocks from 7 to 10 that commit to at least 7.
	Get(index iotago.SlotIndex) (attestations []*iotago.Attestation, err error)

	// GetMap returns the attestations that are included in the commitment of the given slot as ads.Map.
	// If attestationCommitmentOffset=3 and commitment is 10, then the returned attestations are blocks from 7 to 10 that commit to at least 7.
	GetMap(index iotago.SlotIndex) (attestations ads.Map[iotago.Identifier, iotago.AccountID, *iotago.Attestation], err error)
	AddAttestationFromValidationBlock(block *blocks.Block) error
	Commit(index iotago.SlotIndex) (newCW uint64, attestationsRoot iotago.Identifier, err error)

	Import(reader io.ReadSeeker) (err error)
	Export(writer io.WriteSeeker, targetSlot iotago.SlotIndex) (err error)
	Rollback(index iotago.SlotIndex) (err error)

	// Reset resets the component to a clean state as if it was created at the last commitment.
	Reset()

	RestoreFromDisk() (err error)

	module.Module
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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