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

Skip events scanners if tx receipt not found #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pablomendezroyo
Copy link
Contributor

@pablomendezroyo pablomendezroyo commented Dec 20, 2024

Skip events scanners if tx receipt not found. This will prevent from getting false positives when queriying the ETH rpc eth_getLogs. Also notify the user in ejector scanner due to its criticallity

@@ -70,6 +74,17 @@ func (ds *DistributionLogUpdatedEventScanner) runScan(ctx context.Context) {
return
}

// Skip if tx receipt not found (nil). This means that the node does not store log receipts and there are no logs at all
receipt, err := ds.executionPort.GetTransactionReceipt(ds.csModuleTxReceipt)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would abstract this querying into another function that just returns true or false, so it can be used both here and in validator exit requests. That way it would be tidier and we could make it to be more robust in determining status. At first look it may look unusual why that exact tx receipt is being queried.

Also, we shouldn't assume how different execution clients respond and we need to test that. We know that Reth responses with result: null but we need to see how Erigon responds and handle it appropriately.

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.

Check if EC store logs receipts before starting the events scanners
2 participants