validator

package
v0.15.6 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2025 License: Apache-2.0 Imports: 19 Imported by: 0

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(
	log utils.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