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

Unhandled exception in oracle transaction submission #389

Open
tinchoabbate opened this issue Jun 9, 2023 · 1 comment
Open

Unhandled exception in oracle transaction submission #389

tinchoabbate opened this issue Jun 9, 2023 · 1 comment

Comments

@tinchoabbate
Copy link

Hey folks, I think there's a case of an unhandled exception that might lead to unexpectedly halting the oracle service. It doesn't look worrisome, so I'm reporting it publicly here for you to take a closer look.

Every time an oracle sends a tx (for example to submit report data), execution goes through check_and_send_transaction. This function then calls _sign_and_send_transaction. Which, after sending the raw transaction, waits for the transaction receipt calling wait_for_transaction_receipt.

The issue is that, as far as I understand from its documentation and code, wait_for_transaction_receipt throws a TimeExhausted exception after 120 seconds of polling for the receipt. This exception is not handled anywhere in the code of the oracle. My impression is that the oracle's code attempts to handle the case of not finding a receipt with this if statement, but I don't think that's the correct way of doing it, because it won't catch the exception.

If I'm following this correctly, then this would happen in the unlikely scenario of oracles trying to submit their txs when the network's is congested. In any case, feels like this exception could be handled in a safer way to make the code more robust.

I might be missing something here, so of course any thoughts welcome!

@F4ever
Copy link
Member

F4ever commented Jun 12, 2023

Hey! Thanks for report!

Yeah, this is omission. Will be fixed in next release.

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

No branches or pull requests

3 participants
@tinchoabbate @F4ever and others