-
Notifications
You must be signed in to change notification settings - Fork 177
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
[Access] Add util command to backfill tx error messages db #6525
base: master
Are you sure you want to change the base?
[Access] Add util command to backfill tx error messages db #6525
Conversation
… of github.com:The-K-R-O-K/flow-go into UlyanaAndrukhiv/6413-backfill-tx-error-messages
… of github.com:The-K-R-O-K/flow-go into UlyanaAndrukhiv/6413-backfill-tx-error-messages
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6525 +/- ##
==========================================
- Coverage 41.20% 40.86% -0.34%
==========================================
Files 2052 1988 -64
Lines 182191 176363 -5828
==========================================
- Hits 75075 72078 -2997
+ Misses 100824 98275 -2549
+ Partials 6292 6010 -282
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
… of github.com:The-K-R-O-K/flow-go into UlyanaAndrukhiv/6413-backfill-tx-error-messages
… of github.com:The-K-R-O-K/flow-go into UlyanaAndrukhiv/6413-backfill-tx-error-messages
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, have a few comments!
…ality, updated tests
…drukhiv/6413-backfill-tx-error-messages
…hub.com:The-K-R-O-K/flow-go into UlyanaAndrukhiv/6413-backfill-tx-error-messages
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.
added a few comments about language in error messages, but otherwise looks good
@Guitarheroua, @peterargue, I've tested the backfilling of transaction error messages and added an additional integration test |
// Verify that the error message retrieved matches the expected values. | ||
s.Require().Equal(txID, errMsgResult.TransactionID) | ||
s.Require().Equal(expectedTxResultErrorMessage, errMsgResult.ErrorMessage) | ||
txErrorMessages := s.fetchTxErrorMessages(txResults, s.accessContainerName) |
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.
how do you know that these weren't indexed regularly and were actually backfilled?
Closes: #6413
Context
This pull request introduces a utility command that allows ANs to backfill missing transaction error messages from start to end height and a set of ENs to their local databases. This ensures that historical ANs have the necessary data to serve requests moving forward.
The command accepts a list of EN IDs (
execution-node-ids
) , if not provided, it defaults to query any available EN. It optionally takes a start and end block height (start-height
,end-height
); if not provided, it defaults to theroot block
andlatest sealed block
.Before execution, the command checks if AN indexing is enabled. For each failed transaction within the block range, it retrieves and stores the error messages locally. It queries ENs in order and stops after the first successful response.
The command uses
GetTransactionErrorMessagesByBlockID
for optimized batch retrieval.Unit tests are included to ensure functionality.