-
Notifications
You must be signed in to change notification settings - Fork 60
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
Serge/liquidator split tcs and liquidation #914
Conversation
d19ccd3
to
3894d8f
Compare
3894d8f
to
020252b
Compare
// a task must be available to process | ||
// find it in global shared state, and mark it as processing | ||
let task = worker_pull_task(&shared_state, id, tcs_capable_workers, only_liquidation) | ||
.expect("Worker woke up but has nothing to do"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think with the tcs batching pulled back in, this no longer works. You send a trigger for each tcs candidate, but the processing tasks eat up multiple at once - so for N candidates the there'll be fewer than N worker tasks.
There's also some weirdness now where the tcs jobs trigger on the tcs channel and take all the liquidation jobs and then the liquidation job wakes up (on the liq channel) and has no work to do.
It may be more robust to avoid the requirement that the number of messages on the channels and the number of work chunks match up exactly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It "works" because the TCS task will just be made of an empty vector (no candidate) if everything was consumed before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see! Would you be up for making it more explicit by adding a no-work WorkerTask?
// a task must be available to process | ||
// find it in global shared state, and mark it as processing | ||
let task = worker_pull_task(&shared_state, id, tcs_capable_workers, only_liquidation) | ||
.expect("Worker woke up but has nothing to do"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see! Would you be up for making it more explicit by adding a no-work WorkerTask?
liquidator: split TCS triggering and liquidation job Concurrent execution of candidate lookup and tx building/sending - Also added an health assertion IX to protect liqor in multi liquidation scenario - And a timeout for jupiter v6 queries (avoid blocking liquidation because of slow TCS)
liquidator: split TCS triggering and liquidation job Concurrent execution of candidate lookup and tx building/sending - Also added an health assertion IX to protect liqor in multi liquidation scenario - And a timeout for jupiter v6 queries (avoid blocking liquidation because of slow TCS)
No description provided.