-
Notifications
You must be signed in to change notification settings - Fork 72
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
Add new _gasPrice reserved parameter #1609
Conversation
Allows gasPrice to be specified by a requester
f14f363
to
28b5436
Compare
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, just a minor note. I want to test it first before approving.
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.
Have you tested this? Because I did and I'm pretty sure it couldn't have worked 😄
It took me quite some time but I found out what the problem is and why the value is ignored. The problem is here
https://github.com/api3dao/airnode/blob/master/packages/airnode-node/src/coordinator/calls/disaggregation.ts#L41
The response there is reconstructed but only the fields data
and success
are added. That was enough before but now we need to also add the reservedParameterOverrides
field.
TS didn't complain because the field is optional anyway. But the set _gasPrice
value was ignored.
Also, even though the value correctly overrides what's returned from the gas price oracle, the logs are quite confusing. They say how is the value chosen by the oracle but they don't mention anything about it being overridden later.
I'd also suggest writing tests using these reserved parameter overrides so that we won't run into something similar again.
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
Oof 🤦 😞 well an apology is in order @amarthadan. I thought I had covered it through the tests I updated, but clearly you were right in this not working due to reconstruction. I added the E2E and confirmed it's working as expected locally. Sorry you ended up spending time debugging. |
Allows gasPrice to be specified by a requester.
Closes #1492