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

Hotfix/fix job decoding #570

Closed
wants to merge 5 commits into from
Closed

Hotfix/fix job decoding #570

wants to merge 5 commits into from

Conversation

sogoiii
Copy link
Contributor

@sogoiii sogoiii commented Aug 21, 2023

Describe Changes

I made this better by doing ...

  • decode jobs from older message module contracts
  • Retry function now thows internal error after all failed attempts.

Checklist before requesting a review

  • I have performed a self-review of my code
  • Code styles have been enforced
  • I have checked eslint

@@ -2077,15 +2078,22 @@ export class NetworkMonitor {
return result
}
} catch (error: any) {
this.structuredLogError(network, error.message)
internalError = error
// this.structuredLog(network, `function ${func.name} failed ${i} of ${attempts}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

should this just be removed or are you just disabling it for now?

// NOTE: This function can be optimized as its currently inefficient

// This is a fallback for the legacy LayerZeroModule contract address that was updated for all networks
const toFind3 = '0x6f484Eacd997D9880205aF22f6a4881ea0e1CCd7'.toLowerCase().slice(2, 42)
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe instead of just numbering these toFind functions it would be nicer to name thing something more descriptive like toFindFallbackLZ or something like that

@alexanderattar
Copy link
Contributor

Looks like prettier issues and a conflict, but otherwise makes sense

…d issue with retry not sleeping if request was successful but returned null.
if (result !== null) {
return result
}
} catch (error: any) {
this.structuredLogError(network, `Attempt ${i + 1} failed: ${error.message}`)
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't want a log to keep track of how many attempts have been made anymore? I found this to be helpful before

polygon: BigNumber.from('2500000000000000'),
etherum: BigNumber.from('5400000000000000'),
Copy link
Contributor

Choose a reason for hiding this comment

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

good catch

@sogoiii sogoiii closed this Oct 23, 2023
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.

2 participants