Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions harnesses/axelar-gmp-latency/cmd/script/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,27 @@ import "strings"
// - Cosmos chains (osmosis, injective, sei, celestia, kava) are
// Axelar-exclusive coverage vs Wormhole/LayerZero/CCIP/Hyperlane
//
// axelarTrackedChains is the set of OCB canonical slugs we record metrics for.
// Only messages where BOTH source AND destination are in this set are
// observed, capping cardinality at len²×buckets.
// Derived from the bench YAML provider slugs.
var axelarTrackedChains = map[string]bool{
"ethereum": true,
"polygon": true,
"base": true,
"moonbeam": true,
"osmosis": true,
"arbitrum": true,
"avalanche": true,
"bnb": true,
"celo": true,
"injective": true,
"linea": true,
"mantle": true,
"optimism": true,
"scroll": true,
}

// Unknown names fall through to `chain-<lowered>` so we never drop data.
var axelarChainSlug = map[string]string{
// EVM L1s
Expand Down
6 changes: 4 additions & 2 deletions harnesses/axelar-gmp-latency/cmd/script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ func poll(ctx context.Context, client *http.Client, seen *lruSet) error {
totalMs := float64(m.TimeSpent.Total) * 1000
if totalMs > 0 && totalMs <= maxLatencyMs {
dst := canonicalizeAxelarChain(m.Call.ReturnValues.DestinationChain)
axelarE2ELatencyMs.WithLabelValues(src, dst).Observe(totalMs)
axelarSeenTotal.WithLabelValues(src, dst).Inc()
if axelarTrackedChains[src] && axelarTrackedChains[dst] {
axelarE2ELatencyMs.WithLabelValues(src, dst).Observe(totalMs)
axelarSeenTotal.WithLabelValues(src, dst).Inc()
}
}

seen.add(m.ID)
Expand Down
26 changes: 26 additions & 0 deletions harnesses/chainlink-ccip-latency/cmd/script/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,32 @@ package main
// makes the mapping legible and the audit trail obvious when CCIP
// adds a new chain we didn't anticipate.
//
// ccipTrackedChains is the set of OCB canonical slugs we record metrics for.
// Only messages where BOTH source AND destination are in this set are
// observed, capping cardinality at len²×buckets.
// Derived from the bench YAML provider slugs.
var ccipTrackedChains = map[string]bool{
"ethereum": true,
"bnb": true,
"polygon": true,
"avalanche": true,
"arbitrum": true,
"base": true,
"robinhood": true,
"berachain": true,
"celo": true,
"ink": true,
"linea": true,
"mantle": true,
"monad": true,
"moonbeam": true,
"optimism": true,
"scroll": true,
"solana": true,
"unichain": true,
"world-chain": true,
}

// Only mainnet entries are mapped; testnet rows are dropped in main.go
// via the `environment != "mainnet"` guard so we never emit test-chain
// latency.
Expand Down
4 changes: 4 additions & 0 deletions harnesses/chainlink-ccip-latency/cmd/script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ func poll(ctx context.Context, client *http.Client, seen *lruSet) error {
seen.add(m.MessageID)
continue
}
if !ccipTrackedChains[srcSlug] || !ccipTrackedChains[dstSlug] {
seen.add(m.MessageID)
continue
}
ccipLatencyMs.WithLabelValues(srcSlug, dstSlug).Observe(deltaMs)
ccipSeenTotal.WithLabelValues(srcSlug, dstSlug).Inc()
seen.add(m.MessageID)
Expand Down
29 changes: 29 additions & 0 deletions harnesses/layerzero-message-latency/cmd/script/chains.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,35 @@ package main
// - LayerZero exposes a bunch of exotic chains (orderly, flare, ape,
// robinhood, hyperliquid) that map to our slugs where they exist.
//
// lzTrackedChains is the set of OCB canonical slugs we record metrics for.
// Only messages where BOTH source AND destination are in this set are
// observed. This caps cardinality at len²×buckets instead of the full
// N×N cross-product of all chains LayerZero supports.
// Derived from the bench YAML provider slugs — add here when adding a
// new chain to the bench.
var lzTrackedChains = map[string]bool{
"ethereum": true,
"solana": true,
"bnb": true,
"arbitrum": true,
"base": true,
"optimism": true,
"polygon": true,
"avalanche": true,
"robinhood": true,
"monad": true,
"berachain": true,
"celo": true,
"injective": true,
"ink": true,
"linea": true,
"mantle": true,
"moonbeam": true,
"scroll": true,
"sui": true,
"unichain": true,
}

// Unknown names fall through to a synthetic `chain-<lowered>` slug in
// main.go so we never drop data silently.
var lzChainSlug = map[string]string{
Expand Down
4 changes: 4 additions & 0 deletions harnesses/layerzero-message-latency/cmd/script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ func poll(ctx context.Context, client *http.Client, seen *lruSet) error {
continue
}
dstSlug := chainSlug(m.Pathway.Receiver.Chain)
if !lzTrackedChains[srcSlug] || !lzTrackedChains[dstSlug] {
seen.add(m.GUID)
continue
}
lzLatencyMs.WithLabelValues(srcSlug, dstSlug).Observe(deltaMs)
lzSeenTotal.WithLabelValues(srcSlug, dstSlug).Inc()
seen.add(m.GUID)
Expand Down
Loading