Skip to content
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

Add metrics to track txs reverting #23

Merged
merged 4 commits into from
Mar 30, 2024
Merged

Conversation

samlaf
Copy link
Contributor

@samlaf samlaf commented Mar 28, 2024

This morning an avs-sync tx reverted on holesky, but our logs were showing

{"time":"2024-03-28T12:00:14.045938723Z","level":"INFO","source":{"function":"github.com/Layr-Labs/eigensdk-go/chainio/clients/avsregistry.(*AvsRegistryChainWriter).UpdateStakesOfEntireOperatorSetForQuorums","file":"/go/pkg/mod/github.com/!layr-!labs/eigensdk-go@v0.1.3-0.20240318050546-8d038f135826/chainio/clients/avsregistry/writer.go","line":280},"msg":"succesfully updated stakes for entire operator set","tx hash":"0x3537f0bad4f7c7fd8799a24d58ea09a56a8504bd57ff6bb6d8051041402b5b45","quorumNumbers":"[0]"}

This is because I thought txs reverting would result in golang errors, but those only happen when a problem happens with sending the txs. tx reverted was successfully sent to the network, it just reverted while executing its smart contract logic. So to track that, we need to look into the receipt and check the status of the receipt. Added logic to do this.

Also added 3 metrics, that currently look like
image

@samlaf samlaf marked this pull request as draft March 28, 2024 20:31
@samlaf samlaf requested a review from ian-shim March 28, 2024 21:38
@samlaf samlaf marked this pull request as ready for review March 29, 2024 19:58
@samlaf samlaf merged commit 3cc4743 into master Mar 30, 2024
1 check passed
@samlaf samlaf deleted the fix-tx-revert-logs-metrics-alerts branch March 30, 2024 21:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants