-
Notifications
You must be signed in to change notification settings - Fork 93
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
Validate rpc response consistency #1150
Comments
What should be the proper handling if the log references the transaction that is not in the block? Should it throw an error? |
Great question - I think the ponder/packages/core/src/sync-realtime/index.ts Lines 644 to 654 in 8790396
The reason for the different behavior in |
I see, can i take over this issue btw? |
Yes, that would be great. I think you should start with the |
@khaidarkairbek Here's another spot in the same function we would want to update that does some rpc response validation and throws and error: ponder/packages/core/src/sync-realtime/index.ts Lines 391 to 395 in 6d45c52
|
Description
Before further processing, we should validate that all referenced data is present. All
blockHash
s andtransactionHash
s should have a corresponding block and transaction. This should happen in bothsync-historical
andsync-realtime
.Related
Several users have reported that
transaction
isundefined
in their ponder indexing functions. After further investigation this is a result of the database being corrupted, with alog.transactionHash
referencing a transaction that doesn't existThe text was updated successfully, but these errors were encountered: