types

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const RevisionAny = ^Revision(0)

RevisionAny is used as indicator to ignore the revision during lookups. This is used in the cross-safe queries, where there will only ever be a single derived block per derived block number, but where the revision is still tracked to match the local-safe DB block replacements. We use the max-uint64 value, since this is reserved, and will not be allowed to decode/encode.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockReplacement

type BlockReplacement struct {
	Replacement eth.BlockRef `json:"replacement"`
	Invalidated common.Hash  `json:"invalidated"`
}

type DerivedBlockRefPair

type DerivedBlockRefPair struct {
	Source  eth.BlockRef `json:"source"`
	Derived eth.BlockRef `json:"derived"`
}

DerivedBlockRefPair is a pair of block refs, where Derived (L2) is derived from Source (L1).

func (*DerivedBlockRefPair) IDs

func (refs *DerivedBlockRefPair) IDs() DerivedIDPair

func (*DerivedBlockRefPair) Seals

func (DerivedBlockRefPair) String

func (refs DerivedBlockRefPair) String() string

type DerivedBlockSealPair

type DerivedBlockSealPair struct {
	Source  interopmsgs.BlockSeal `json:"source"`
	Derived interopmsgs.BlockSeal `json:"derived"`
}

DerivedBlockSealPair is a pair of block seals, where Derived (L2) is derived from Source (L1).

func (*DerivedBlockSealPair) IDs

func (seals *DerivedBlockSealPair) IDs() DerivedIDPair

func (DerivedBlockSealPair) String

func (seals DerivedBlockSealPair) String() string

type DerivedIDPair

type DerivedIDPair struct {
	Source  eth.BlockID `json:"source"`
	Derived eth.BlockID `json:"derived"`
}

DerivedIDPair is a pair of block IDs, where Derived (L2) is derived from Source (L1).

func (DerivedIDPair) String

func (ids DerivedIDPair) String() string

type IndexingEvent

type IndexingEvent struct {
	Reset                  *string              `json:"reset,omitempty"`
	UnsafeBlock            *eth.BlockRef        `json:"unsafeBlock,omitempty"`
	DerivationUpdate       *DerivedBlockRefPair `json:"derivationUpdate,omitempty"`
	ExhaustL1              *DerivedBlockRefPair `json:"exhaustL1,omitempty"`
	ReplaceBlock           *BlockReplacement    `json:"replaceBlock,omitempty"`
	DerivationOriginUpdate *eth.BlockRef        `json:"derivationOriginUpdate,omitempty"`
}

IndexingEvent is an event sent by the indexing node to the supervisor, to share an update. One of the fields will be non-null; different kinds of updates may be sent.

type Revision

type Revision uint64

func (Revision) Any

func (r Revision) Any() bool

func (Revision) Cmp

func (r Revision) Cmp(blockNum uint64) int

Cmp returns: 0 if the revision matches any block number 1 if the revision is higher than the given number 0 if the revision is equal than the given number -1 if the revision is lower than the given number

func (Revision) Number

func (r Revision) Number() uint64

Number returns the block-number, where the revision started (i.e. the invalidated/replacement block height)

func (Revision) String

func (r Revision) String() string

Jump to

Keyboard shortcuts

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