8000 Reporter exceptions by martinkersner · Pull Request #237 · Bisonai/orakl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Reporter exceptions #237

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

Merged
merged 6 commits into from
Feb 7, 2023
Merged

Conversation

martinkersner
Copy link
Member
@martinkersner martinkersner commented Feb 7, 2023

Description

This PR defines several exceptions that can happen during sending response (aka reporting) back to on-chain.

  • TxInvalidAddress
  • TxProcessingResponseError
  • TxCannotEstimateGasError
  • ProviderNetworkError

I decided to not retry to send transaction to on-chain as was planned before because all of these error messages are not related to timeout which would be the only meaningful reason to retry it. However, I will keep this issue in mind and delve into it more if we notice that that timeout is happening. Currently, there is no way how to set a timeout when using ethers JsonRpcProvider, we can only set numberConfirmations in wait method which has different purpose.

Additionally, this PR unifies reporter definitions, creates and enforces an IReporter type for predefined reporters.

Defined test in reporter.test.ts require network to be running on http:127.0.0.1:8545 which is hardhat network. This test would fail if run in Github Actions or without launched hardhat network. However, it is modified in a way that if it cannot connect to network, then the test are ignore. I will have to later figure out how we can launch hardhat network inside of Github Actions and run them always there as well.

Type of change

  • New feature (non-breaking change which adds functionality)

Checklist before requesting a review

  • I have performed a self-review of my code.
  • If it is a core feature, I have added thorough tests.

Deployment

  • Should publish Docker image

@martinkersner martinkersner self-assigned this Feb 7, 2023
@martinkersner martinkersner linked an issue Feb 7, 2023 that may be closed by this pull request
@martinkersner martinkersner marked this pull request as ready for review February 7, 2023 13:10
@martinkersner martinkersner merged commit 7429567 into master Feb 7, 2023
@martinkersner martinkersner deleted the i-188/feat/retry-when-failed-to-report branch February 7, 2023 13:11
@martinkersner martinkersner mentioned this pull request Feb 8, 2023
3 tasks
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.

Retry when failed to report
1 participant
0