Documentation
¶
Index ¶
Constants ¶
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 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 (refs *DerivedBlockRefPair) Seals() DerivedBlockSealPair
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) Cmp ¶
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