-
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
Need to verify request ID-parameters #82
Comments
Example: airnode/packages/protocol/test/UserFlow.js Lines 212 to 219 in 696ebad
Would be slightly different for a full request |
Just to be clear, should this validate withdrawals too? |
No, the node already provides all the withdrawal request parameters while fulfilling it, so we can do the check on-chain airnode/packages/protocol/contracts/ProviderStore.sol Lines 130 to 139 in c17870b
In theory, we can also do the check for API requests on-chain, but it would require the node to send all the request parameters back ( parameters for example) during fulfillment, which would create quite the gas cost overhead. So there is a somewhat arbitrary tradeoff decision that I made here.
|
Request IDs are derived from request parameters. The derivation changes with type:
Regular:
airnode/packages/protocol/contracts/Airnode.sol
Lines 51 to 55 in 696ebad
Short:
airnode/packages/protocol/contracts/Airnode.sol
Lines 100 to 104 in 696ebad
Full:
airnode/packages/protocol/contracts/Airnode.sol
Lines 156 to 161 in 696ebad
When the node receives a request, it should verify this derivation to ensure that the Ethereum provider didn't tamper with any of the request parameters.
The text was updated successfully, but these errors were encountered: