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

Feature/operator stability improvement #568

Merged
merged 35 commits into from
Aug 30, 2023

Conversation

alexanderattar
Copy link
Contributor

@alexanderattar alexanderattar commented Aug 16, 2023

Describe Changes

  • Ticket https://linear.app/holograph/issue/HOLO-1095/operator-stability
  • Broke up huge switch case in processSingleTransaction into smaller handler functions
  • Added extra logging for context in operator/index.ts
  • Refactored functions in operator-job.ts
    • Increased error handling
    • Better logging
  • Breaks up the run function in the operator command into several smaller functions
  • Improves error handling throughout operator command
  • Improves logging throughout operator command
  • Breaks processOperatorJobs up into smaller functions
  • Adds locking mechanism on the concurrency for processOperatorJobs to prevent race conditions and ensure that current processing is complete before the function is called again 👁️
  • Catches intrinsic gas too low error and handles it by either removing the job from the queue or forcing it through with a new greedy mode flag

Checklist before requesting a review

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

Copy link
Contributor

@sogoiii sogoiii left a comment

Choose a reason for hiding this comment

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

We may also want to log some variables in the processOperatorJob and processOperatorJobs function as this is the set of functions that actually submit the tx.

src/commands/operator/index.ts Show resolved Hide resolved
src/utils/operator-job.ts Outdated Show resolved Hide resolved
src/utils/operator-job.ts Outdated Show resolved Hide resolved
@alexanderattar alexanderattar marked this pull request as ready for review August 17, 2023 01:32
// eslint-disable-next-line no-constant-condition
while (true) {
try {
await this.processOperatorJobs(network)
Copy link
Contributor

Choose a reason for hiding this comment

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

So I like this change to make processing more linear. One trade off is that this may also cause delays if this function takes time to execute. Just calling out the trade off.

Copy link
Contributor

@sogoiii sogoiii left a comment

Choose a reason for hiding this comment

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

👍

@sogoiii sogoiii merged commit 292707a into develop Aug 30, 2023
3 checks passed
@sogoiii sogoiii deleted the feature/operator-stability-improvement branch August 30, 2023 20:10
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