-
Notifications
You must be signed in to change notification settings - Fork 180
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] Store Transaction Result error messages in db #6468
[Access] Store Transaction Result error messages in db #6468
Conversation
…red executionNodesForBlockID
…s storage, added godoc
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6468 +/- ##
==========================================
- Coverage 41.16% 41.14% -0.02%
==========================================
Files 2031 2036 +5
Lines 179463 179997 +534
==========================================
+ Hits 73869 74055 +186
- Misses 99381 99727 +346
- Partials 6213 6215 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
…ult-error-messages
…ult-error-messages
…nsaction result error messages
The first round for now! |
… jobqueque, updated tests
…ult-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.
I haven't finished reviewing all of your recent changes, but here's some early feedback
…ential backoff, updated tests
…ult-error-messages
hey @zhangchiqing can you take a look at this PR? particularly the new DB logic |
Co-authored-by: Peter Argue <[email protected]>
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.
Overall looks good. Just have one issue. Please see comment.
…parated engine for tx error messages, updated tests
…ult-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.
LGTM
…ges storing is disabled, added comments
…ult-error-messages
Closes: #6302
Context
This PR implements the following changes:
New cli flag:
A new cli flag
--store-tx-result-error-messages
has been added, which defaults to off. When enabled, transaction error messages are stored in the protocol database.New Storage Object:
Introduced a new storage object for transaction error messages in the protocol database (Badger).
Added methods
Store
,ByBlockID
,ByBlockIDTransactionID
,ByBlockIDTransactionIndex
, andExists
to handle storage and retrieval.Data Structure:
For each failed transaction, the following fields are stored:
TransactionID
,ErrorMessage
,Index
andExecutorID
(the node ID of the execution node from which the message was received).Fetching:
Error messages are fetched from ENs in parallel during the ingestion process, using the
fixed
andpreferred
EN lists. In case no EN returns a valid response, the fetching process does not block or fail.API changes:
The API now uses its
local db
first if available before requesting from execution nodes stored error messages.Testing:
Unit and integration tests are added to cover the new functionality, ensuring error messages are stored correctly and API behavior is as expected when the flag is enabled.