validator

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2025 License: Apache-2.0 Imports: 9 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 {
	Header     *starknet.MessageHeader
	ValidRound types.Round
	Value      *starknet.Value
}

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 starknet.Proposal

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 ReceivingTransactionsState

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

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