-
Notifications
You must be signed in to change notification settings - Fork 2
feat: add alert for unfinalized burn events #569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
melisaguevara
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. Just one nit.
packages/indexer/src/data-indexing/service/CctpFinalizerService.ts
Outdated
Show resolved
Hide resolved
packages/indexer/src/data-indexing/service/CctpFinalizerService.ts
Outdated
Show resolved
Hide resolved
packages/indexer/src/data-indexing/service/CctpFinalizerService.ts
Outdated
Show resolved
Hide resolved
amateima
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason this isn't in a separate service? It feels conceptually different from the finalization publishing logic. Could be cleaner as its own monitoring service
packages/indexer/src/data-indexing/service/CctpFinalizerService.ts
Outdated
Show resolved
Hide resolved
| .where("job.createdAt < :minAgeTime", { minAgeTime }) | ||
| .andWhere("job.createdAt > :maxAgeTime", { maxAgeTime }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: for increased readability I'd format this to smth like
"now() - job.createdAt > interval '30 minutes'""now() - job.createdAt < interval '24 hours'"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 25ae6f8.
Adds error logging when CCTP burn events that were published to the finalizer haven't been finalized on the destination chain within the expected timeframe.
Changes
checkForUnfinalizedBurnEvents()method toCctpFinalizerServiceCctpFinalizerJobrecords older than 30 minutes but younger than 24 hours (so we don't infinitely log for old/expired/unnecessary unprocessed records)MessageReceivedexists on destination chain (matched bysourceDomain+nonce)notificationPath: "across-indexer-error"if no mint found (triggers Slack/PagerDuty alert)Testing
Ran indexer locally and set up DB for a completed and pending job: