validator

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 22 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwaitingBlockInfoOrCommitmentState

type AwaitingBlockInfoOrCommitmentState struct {
	Header     *starknet.MessageHeader
	ValidRound types.Round
}

AwaitingBlockInfoOrCommitmentState handles the transition after ProposalInit, accepting either a BlockInfo (for full proposals) or a Commitment (for empty blocks).

func (*AwaitingBlockInfoOrCommitmentState) OnEvent

type AwaitingProposalFinState

type AwaitingProposalFinState struct {
	Proposal    *starknet.Proposal
	BuildResult *builder.BuildResult
}

AwaitingProposalFinState handles the final phase of the proposal flow, waiting for a ProposalFin message that commits the hash of the proposed value.

func (*AwaitingProposalFinState) OnEvent

type FinState

type FinState struct {
	Proposal    *starknet.Proposal
	BuildResult *builder.BuildResult
}

FinState contains the output of the proposal flow.

func (*FinState) OnEvent

func (s *FinState) OnEvent(
	ctx context.Context,
	transition Transition,
	part *consensus.ProposalPart,
) (ProposalStateMachine, error)

type InitialState

type InitialState struct{}

InitialState handles the first step in the proposal flow, accepting only a ProposalInit message to begin the process.

func (*InitialState) OnEvent

func (s *InitialState) OnEvent(
	ctx context.Context,
	transition Transition,
	part *consensus.ProposalPart,
) (ProposalStateMachine, error)

type ProposalStateMachine

type ProposalStateMachine interface {
	OnEvent(context.Context, Transition, *consensus.ProposalPart) (ProposalStateMachine, error)
}

type ProposalStreamDemux added in v0.14.7

type ProposalStreamDemux[V types.Hashable[H], H types.Hash, A types.Addr] interface {
	Loop(context.Context, *pubsub.Topic)
	Listen() <-chan *types.Proposal[V, H, A]
}

func NewProposalStreamDemux added in v0.14.7

func NewProposalStreamDemux(
	logger log.Logger,
	proposalStore *proposal.ProposalStore[starknet.Hash],
	transition Transition,
	bufferSizeConfig *config.BufferSizes,
	commitNotifier <-chan types.Height,
	currentHeight types.Height,
) ProposalStreamDemux[starknet.Value, starknet.Hash, starknet.Address]

type ReceivingTransactionsState

type ReceivingTransactionsState struct {
	Header     *starknet.MessageHeader
	ValidRound types.Round
	BuildState *builder.BuildState
}

ReceivingTransactionsState handles the flow where transaction batches are received, continuing until a ProposalCommitment message is received to conclude the input.

func (*ReceivingTransactionsState) OnEvent

Jump to

Keyboard shortcuts

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