Documentation ¶
Index ¶
- Variables
- func L1ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, ...) error
- func L1ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, ...) error
- func L2ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, ...) error
- func L2ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, ...) error
- func LegacyL1ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, ...) error
- func LegacyL1ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, ...) error
- func LegacyL2ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, ...) error
- func LegacyL2ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, preset int, ...) error
- type L1Metricer
- type L2Metricer
- type Metricer
Constants ¶
This section is empty.
Variables ¶
var (
MetricsNamespace string = "op_indexer_bridge"
)
Functions ¶
func L1ProcessFinalizedBridgeEvents ¶
func L1ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, l1Contracts config.L1Contracts, fromHeight, toHeight *big.Int) error
L1ProcessFinalizedBridgeEvent will query the database for all the finalization markers for all initiated bridge events. This covers every part of the multi-layered stack:
- OptimismPortal (Bedrock prove & finalize steps)
- L1CrossDomainMessenger (relayMessage marker)
- L1StandardBridge (no-op, since this is simply a wrapper over the L1CrossDomainMessenger)
func L1ProcessInitiatedBridgeEvents ¶
func L1ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, l1Contracts config.L1Contracts, fromHeight, toHeight *big.Int) error
L1ProcessInitiatedBridgeEvents will query the database for bridge events that have been initiated between the specified block range. This covers every part of the multi-layered stack:
- OptimismPortal
- L1CrossDomainMessenger
- L1StandardBridge
func L2ProcessFinalizedBridgeEvents ¶
func L2ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, l2Contracts config.L2Contracts, fromHeight, toHeight *big.Int) error
L2ProcessFinalizedBridgeEvent will query the database for all the finalization markers for all initiated bridge events. This covers every part of the multi-layered stack:
- L2CrossDomainMessenger (relayMessage marker)
- L2StandardBridge (no-op, since this is simply a wrapper over the L2CrossDomainMEssenger)
NOTE: Unlike L1, there's no L2ToL1MessagePasser stage since transaction deposits are apart of the block derivation process.
func L2ProcessInitiatedBridgeEvents ¶
func L2ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, l2Contracts config.L2Contracts, fromHeight, toHeight *big.Int) error
L2ProcessInitiatedBridgeEvents will query the database for bridge events that have been initiated between the specified block range. This covers every part of the multi-layered stack:
- OptimismPortal
- L2CrossDomainMessenger
- L2StandardBridge
func LegacyL1ProcessFinalizedBridgeEvents ¶
func LegacyL1ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, l1Contracts config.L1Contracts, fromHeight, toHeight *big.Int) error
LegacyL1ProcessFinalizedBridgeEvents will query for bridge events within the specified block range according to the pre-bedrock protocol. This follows:
- L1CrossDomainMessenger
- L1StandardBridge
func LegacyL1ProcessInitiatedBridgeEvents ¶
func LegacyL1ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L1Metricer, l1Contracts config.L1Contracts, fromHeight, toHeight *big.Int) error
LegacyL1ProcessInitiatedEvents will query the data for bridge events within the specified block range according the pre-bedrock protocol. This follows:
- CanonicalTransactionChain
- L1CrossDomainMessenger
- L1StandardBridge
func LegacyL2ProcessFinalizedBridgeEvents ¶
func LegacyL2ProcessFinalizedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, l2Contracts config.L2Contracts, fromHeight, toHeight *big.Int) error
LegacyL2ProcessFinalizedBridgeEvents will query for bridge events within the specified block range according to the pre-bedrock protocol. This follows:
- L2CrossDomainMessenger
- L2StandardBridge
func LegacyL2ProcessInitiatedBridgeEvents ¶
func LegacyL2ProcessInitiatedBridgeEvents(log log.Logger, db *database.DB, metrics L2Metricer, preset int, l2Contracts config.L2Contracts, fromHeight, toHeight *big.Int) error
LegacyL2ProcessInitiatedEvents will query the data for bridge events within the specified block range according the pre-bedrock protocol. This follows:
- L2CrossDomainMessenger - The LegacyMessagePasser contract cannot be used as entrypoint to bridge transactions from L2. The protocol only allows the L2CrossDomainMessenger as the sole sender when relaying a bridged message.
- L2StandardBridge
Types ¶
type L1Metricer ¶ added in v1.2.0
type L1Metricer interface { RecordL1Interval() (done func(err error)) RecordL1LatestHeight(height *big.Int) RecordL1LatestFinalizedHeight(height *big.Int) RecordL1TransactionDeposits(size int, mintedETH float64) RecordL1ProvenWithdrawals(size int) RecordL1FinalizedWithdrawals(size int) RecordL1CrossDomainSentMessages(size int) RecordL1CrossDomainRelayedMessages(size int) RecordL1SkippedOVM1ProvenWithdrawals(size int) RecordL1SkippedOVM1FinalizedWithdrawals(size int) RecordL1SkippedOVM1CrossDomainRelayedMessages(size int) RecordL1InitiatedBridgeTransfers(token common.Address, size int) RecordL1FinalizedBridgeTransfers(token common.Address, size int) }
type L2Metricer ¶ added in v1.2.0
type L2Metricer interface { RecordL2Interval() (done func(err error)) RecordL2LatestHeight(height *big.Int) RecordL2LatestFinalizedHeight(height *big.Int) RecordL2TransactionWithdrawals(size int, withdrawnETH float64) RecordL2CrossDomainSentMessages(size int) RecordL2CrossDomainRelayedMessages(size int) RecordL2InitiatedBridgeTransfers(token common.Address, size int) RecordL2FinalizedBridgeTransfers(token common.Address, size int) }
type Metricer ¶ added in v1.2.0
type Metricer interface { L1Metricer L2Metricer }
func NewMetrics ¶ added in v1.2.0
func NewMetrics(registry *prometheus.Registry) Metricer