monolithic

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsensusManager

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

func NewMonolithicConsensusManager

func NewMonolithicConsensusManager(selfStr string, rg *genesis.RootGenesis, partitionStore partitions.PartitionConfiguration,
	signer crypto.Signer, log *slog.Logger, opts ...consensus.Option) (*ConsensusManager, error)

NewMonolithicConsensusManager creates new monolithic (single node) consensus manager

func (*ConsensusManager) CertificationResult

func (x *ConsensusManager) CertificationResult() <-chan *types.UnicityCertificate

func (*ConsensusManager) GetLatestUnicityCertificate

func (x *ConsensusManager) GetLatestUnicityCertificate(id types.SystemID) (*types.UnicityCertificate, error)

func (*ConsensusManager) RequestCertification

func (x *ConsensusManager) RequestCertification(ctx context.Context, cr consensus.IRChangeRequest) error

func (*ConsensusManager) Run

func (x *ConsensusManager) Run(ctx context.Context) error

type StateStore

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

func NewStateStore

func NewStateStore(storage keyvaluedb.KeyValueDB) *StateStore

func (*StateStore) GetCertificate

func (s *StateStore) GetCertificate(id types.SystemID) (*types.UnicityCertificate, error)

func (*StateStore) GetLastCertifiedInputRecords

func (s *StateStore) GetLastCertifiedInputRecords() (ir map[types.SystemID]*types.InputRecord, err error)

func (*StateStore) GetRound

func (s *StateStore) GetRound() (uint64, error)

func (*StateStore) Init

func (s *StateStore) Init(rg *genesis.RootGenesis) error

func (*StateStore) IsEmpty

func (s *StateStore) IsEmpty() (bool, error)

func (*StateStore) Update

func (s *StateStore) Update(newRound uint64, certificates map[types.SystemID]*types.UnicityCertificate) error

type UnicitySealFunc

type UnicitySealFunc func(rootHash []byte) (*types.UnicitySeal, error)

Jump to

Keyboard shortcuts

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