Skip to content

Conversation

@MartinquaXD
Copy link
Contributor

Description

When the autopilot sends a /settle request it also starts monitoring the blockchain to see if the winning solution landed on chain. So far the autopilot only searched for 2 pieces of information: solver, auction_id
With the change to combinatorial auctions this is no longer sufficient since 1 solver can have multiple winning solutions. Since it only searches for SOME proposed solution to be mined instead of each one specifically all the futures waiting for the settlement to be mined will resolve at the same time when the first solution gets mined.

This in turn causes the autopilot to terminate the /settle request too early. Any driver which ties solution submission to the liveness of the HTTP request will then terminate the submission too early because it thinks the autopilot is no longer "interested" in the transaction.

Changes

adjusted the waiting logic to search for a tx with the tuple (auction_id, solver, solution_uid) to actually wait for one specific solution.

How to test

existing e2e tests should still pass
However adding a new test specifically for this is very involved.

  • the reference driver is built to only propose 1 solution per auction so 1 driver will not work
  • using 2 drivers with the same solver account will result in conflicting nonces for the tx submission
  • sneakily inserting a new row into the settlements table to pretend we saw another solution from the same solver requires tight control over when the driver actually sends the eth_sendRawTransaction to the node

I think in order to test this explicitly we have to build a mock driver and even then it's pretty hard to make the test assertions stable. Since the change is so trivial I think not adding a new test for this is acceptable. Let me know if you disagree.

@MartinquaXD MartinquaXD requested a review from a team as a code owner December 10, 2025 08:57
@MartinquaXD MartinquaXD added this pull request to the merge queue Dec 10, 2025
Merged via the queue into main with commit f0f8667 Dec 10, 2025
18 checks passed
@MartinquaXD MartinquaXD deleted the await-specific-solution branch December 10, 2025 11:44
@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants