-
Notifications
You must be signed in to change notification settings - Fork 83
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
Hopefully fix noisy submission error alert on eden #481
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.
One concern I have here is that it is possible for gas prices to "escalate" quite quickly since we are making a positive "increase gas cost" feedback loop.
We should keep a close eye on this change (maybe add a log when we set the tx_consecutively_underpriced
so we can easily track what its value is).
As for testing - I'm not sure what the right way to test this is. Maybe we can create a mock submitter and get it to return "tx underprised" errors?
Maybe we can reach out to the Eden team and let them know that transactions are getting added to the tx pool even if their RPC endpoint is returning an error? |
I am worried if we start going this path (trying to handle these kind of errors) our code will eventually become maintenance nightmare. |
While I agree that we ideally shouldn't have to worry about that, I think it makes sense to address this bug because it seems to cause our noisiest alert. |
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.
Lg.
What would be interesting is to add some kind of metric to know how often this happens, so we can be alerted when Eden fixes this error internally (if ever). Or we can set a manual reminder somewhere to check for the logs :) -> all so we can revert this change once the error is cleared.
Agree on all fronts. Since I don't know yet, whether this PR will actually fix the error (just an idea) I will deploy the change and monitor the impact. If it actually fixes the problem I will add the metrics otherwise I will revert the PR again. |
Currently eden's submission error alert is one of our noisiest. Also it's not really actionable so let's try to fix it.
My current working hypothesis is that eden sometimes submits a transaction into the mempool but reports an error anyway. This would lead our submission logic to think the gas price which would require a replacement tx would be the price of
tx_1 * 1.25 (MIN_GAS_BUMP)
. But since the mempool already knows abouttx_2
which must have at least a gas price oftx_1 * 1.25
the actual replacement tx would have to have a gas price of at leasttx_2 * (1.25^2)
.This hypothesis came from logs like this where at some point eden returned some generic
internal server error
and afterwards reports manyreplacement transaction underpriced
errors in a row.As a side note this change could also lead to faster submission times when a solver run loop encounters that issue.
I don't really know how to test this idea without deploying it so please let me know if it seems reasonable to you.
We could also enable the gas price factor bumping with a CLI switch to test the fix temporarily without redeploying the solver.
Test Plan
CI