types

package
v0.15.2 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action[V Hashable[H], H Hash, A Addr] interface {
	// contains filtered or unexported methods
}

type Addr

type Addr interface {
	~[4]uint64
}

type BlockInfo added in v0.14.6

type BlockInfo struct {
	BlockNumber       uint64
	Builder           felt.Felt
	Timestamp         uint64
	L2GasPriceFRI     felt.Felt
	L1GasPriceWEI     felt.Felt
	L1DataGasPriceWEI felt.Felt
	EthToStrkRate     felt.Felt
	L1DAMode          core.L1DAMode
}

type BroadcastPrecommit

type BroadcastPrecommit[H Hash, A Addr] Precommit[H, A]

type BroadcastPrevote

type BroadcastPrevote[H Hash, A Addr] Prevote[H, A]

type BroadcastProposal

type BroadcastProposal[V Hashable[H], H Hash, A Addr] Proposal[V, H, A]

type Commit added in v0.14.6

type Commit[V Hashable[H], H Hash, A Addr] Proposal[V, H, A]

type Hash

type Hash interface {
	~[4]uint64
}

type Hashable

type Hashable[H Hash] interface {
	Hash() H
}

Hashable's Hash() is used as ID()

type Height

type Height uint

type Message

type Message[V Hashable[H], H Hash, A Addr] interface {
	MsgType() MessageType
	GetHeight() Height
}

type MessageHeader

type MessageHeader[A Addr] struct {
	Height Height `cbor:"height"`
	Round  Round  `cbor:"round"`
	Sender A      `cbor:"sender"`
}

type MessageType

type MessageType uint8

MessageType represents the type of message stored in the WAL.

const (
	MessageTypeProposal MessageType = iota
	MessageTypePrevote
	MessageTypePrecommit
	MessageTypeTimeout
	MessageTypeUnknown
)

func (MessageType) String

func (m MessageType) String() string

String returns the string representation of the MessageType.

type Precommit

type Precommit[H Hash, A Addr] Vote[H, A]

func (Precommit[H, A]) GetHeight

func (p Precommit[H, A]) GetHeight() Height

func (Precommit[H, A]) MsgType

func (p Precommit[H, A]) MsgType() MessageType

type Prevote

type Prevote[H Hash, A Addr] Vote[H, A]

func (Prevote[H, A]) GetHeight

func (p Prevote[H, A]) GetHeight() Height

func (Prevote[H, A]) MsgType

func (p Prevote[H, A]) MsgType() MessageType

type Proposal

type Proposal[V Hashable[H], H Hash, A Addr] struct {
	MessageHeader[A]
	ValidRound Round `cbor:"valid_round"`
	Value      *V    `cbor:"value"`
}

func (Proposal[V, H, A]) GetHeight

func (p Proposal[V, H, A]) GetHeight() Height

func (Proposal[V, H, A]) MsgType

func (p Proposal[V, H, A]) MsgType() MessageType

type ProposalCommitment added in v0.14.6

type ProposalCommitment struct {
	BlockNumber uint64
	Builder     felt.Felt

	// We must set these by hand. They will be compared against ProposalCommitment
	ParentCommitment felt.Felt
	Timestamp        uint64
	ProtocolVersion  semver.Version

	// These also need set by hand. However, we would need to update the DB
	// and blockchain Reader interface, so they are ignored for now.
	OldStateRoot              felt.Felt
	VersionConstantCommitment felt.Felt
	NextL2GasPriceFRI         felt.Felt // If empty proposal, use last value

	// These values may be zero for empty proposals
	StateDiffCommitment   felt.Felt
	TransactionCommitment felt.Felt
	EventCommitment       felt.Felt
	ReceiptCommitment     felt.Felt
	ConcatenatedCounts    felt.Felt
	L1GasPriceFRI         felt.Felt
	L1DataGasPriceFRI     felt.Felt
	L2GasPriceFRI         felt.Felt
	L2GasUsed             felt.Felt
	L1DAMode              core.L1DAMode
}

type ProposalFin added in v0.14.6

type ProposalFin felt.Felt

type ProposalInit added in v0.14.6

type ProposalInit struct {
	BlockNum   Height
	Round      Round
	ValidRound Round
	Proposer   felt.Felt
}

type Round

type Round int

type ScheduleTimeout

type ScheduleTimeout Timeout

type Step

type Step uint8
const (
	StepPropose Step = iota
	StepPrevote
	StepPrecommit
)

func (Step) String

func (s Step) String() string

type Timeout

type Timeout struct {
	Step   Step
	Height Height
	Round  Round
	// contains filtered or unexported fields
}

func (Timeout) GetHeight

func (t Timeout) GetHeight() Height

func (Timeout) MsgType

func (t Timeout) MsgType() MessageType

type Transaction added in v0.14.6

type Transaction struct {
	Transaction core.Transaction
	Class       core.Class
	PaidFeeOnL1 *felt.Felt
}

type ValueID added in v0.14.6

type ValueID felt.Felt

type Vote

type Vote[H Hash, A Addr] struct {
	MessageHeader[A]
	ID *H `cbor:"id"`
}

type VotingPower

type VotingPower uint

Jump to

Keyboard shortcuts

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