types

package
v0.15.9 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 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 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 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 {
	Header() *MessageHeader[A]
}

type MessageHeader

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

type Precommit

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

func (*Precommit[H, A]) Header added in v0.15.3

func (p *Precommit[H, A]) Header() *MessageHeader[A]

type Prevote

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

func (*Prevote[H, A]) Header added in v0.15.3

func (p *Prevote[H, A]) Header() *MessageHeader[A]

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]) Header added in v0.15.3

func (p *Proposal[V, H, A]) Header() *MessageHeader[A]

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 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
}

type Transaction added in v0.14.6

type Transaction struct {
	Transaction core.Transaction
	Class       core.ClassDefinition
	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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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