You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases DApps may poll the relay eth_call endpoint quite often even when there are no contract changes.
In the current iteration prior to HIP 584 completion is may be beneficial to consider a cache to speed up responses
Solution
Add an appropriate cache
Check the Mirror Node api/v1/contracts/{contractIdOrAddress} for the timestamp of the last change
Cache the timestamp
On future calls query the endpoint. If the timestamp returned is greater than the cached value then it's worth making a full state call
Also add a new metric for gas used by an endpoint. Start with a proxy of 0.8 * gasLimit provided
Alternatives
No response
The text was updated successfully, but these errors were encountered:
Problem
In some cases DApps may poll the relay
eth_call
endpoint quite often even when there are no contract changes.In the current iteration prior to HIP 584 completion is may be beneficial to consider a cache to speed up responses
Solution
Add an appropriate cache
Check the Mirror Node
api/v1/contracts/{contractIdOrAddress}
for the timestamp of the last changeCache the timestamp
On future calls query the endpoint. If the timestamp returned is greater than the cached value then it's worth making a full state call
Also add a new metric for gas used by an endpoint. Start with a proxy of 0.8 * gasLimit provided
Alternatives
No response
The text was updated successfully, but these errors were encountered: