Pipe request_id
of /settle
call to ethrpc transport logic
#3247
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Follow up to #3243.
The previous PR had 2 problems that prevented it from actually piping the auction id to the
X-REQUEST-ID
header of RPC calls.autopilot
only set theauction_id
asX-REQUEST-ID
header on/quote
and/solve
calls but not on/settle
calls./settle
queue in the driver there is background task that ultimately executed the RPC calls for submitting a transaction. And the task local storage of that background task was not set correctly.Changes
autopilot
now setsX-REQUEST-ID
for/settle
calls as welldriver
reads request_id from task local storage and adds it to the struct it puts into the settle queue. When the background task picks up the struct from the settle queue it sets the task local storage to the struct'srequest_id
value.How to test
Added logs to the
ethrpc
http transport module to print theX-REQUEST-ID
header it would set for the request. With this PR theauction_id
finally started to appear in the RPC requests.Tested with buffered HTTP transport (for public mempool submission):
Since I used the e2e test for submitting multiple winners 2
eth_sendRawTransaction
requests for auction482
got buffered into the same RPC call.and unbuffered (for mevblocker submission):
In the unbuffered version we instead got 2 separate
eth_sendRawTransaction
calls for the 2 solvers. This time for auction484
.