-
Notifications
You must be signed in to change notification settings - Fork 82
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
Do not settle after the deadline #3116
Conversation
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.
Looks ok for me.
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.
A bit unfortunate that we are running into these issues with very competitive solvers that win multiple auctions in a row.
Maybe we should consider moving the queuing logic into the driver itself. That way at least teams running their own driver could implement a nonce management solution that properly allows for submitting multiple solutions in parallel. This seems to fit the overall system better.
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.
LGTM
# Conflicts: # crates/autopilot/src/run_loop.rs
After thinking more about it, I think that would be a much better approach. So, drivers should maintain the settlement order. I am not happy with the current solution since it requires artificially increasing the block deadline, which could lead to a longer auction execution time. Will try to tackle it. |
Description
2 colocated solvers reported that
/settle
requests were sent after the deadline. The expected behaviour is that on each new block a new auction is cut. So for each new settlement the deadline should be theauction.block + settlement_deadline
. It turned out that this is not the case and after the auction cut, the deadline is calculated ascurrent_block + settlement_deadline
. E.g(deadline config is3
):This should probably explain how the settle call could be sent after the deadline.
Changes
/settle
request once the deadline is reached.wait_for_settlement_transaction
function uses a newly calculated deadline block number for some reason. The PR fixes that and uses the same value as was used in the/settle
request. That should help better understand the root cause.So in the end the expected behaviour should be observed, where each subsequent settle request has a deadline for at least 1 block ahead the previous deadline. So if a settlement gets executed in the end of the round 13 or gets discarded at block 14, the next settlement still have the deadline for block 15 which should be sufficient.
How to test
Existing tests. This might require increasing the settlement deadline by 1.