-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Having issues with Cloudflare endpoints #949
Comments
This is likely an issue with Cloudflare. I've removed it from You can try comparing the result of Let me know. :) |
I checked the console an cloudflare return a different response for the same RPC request compared to infura.
Obviously, cloudflare response format is not supported by ethers and this is probably unrelated to being out of date or something else. Do you that cloudflare response should be supported by ethers or it is out of standard and cloudflare broke the spec with it? |
The Cloudflare backends do not expose Absurd, I agree. :) |
Really? Isn't it just this:
|
Oh you are right! They seem to have fixed that! :) I can probably remove that extra logic from the |
So, circling back to this. Were you able to confirm you got a different error on Cloudflare vs others while the block numbers were similar? |
@ricmoo yes, I confirm. Please check for yourself: PROJECTID="<infura-project-id>"
for URI in https://main-rpc.linkpool.io https://mainnet.infura.io/v3/$PROJECTID https://cloudflare-eth.com ; do
echo $URI
RES=`curl -s $URI -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'`
echo $RES
RES=`curl -s $URI -H "Content-Type: application/json" --data "{\"method\":\"eth_call\",\"params\":[{\"from\":\"0x379ff6375f4a44f458683629ef05141d73fae55a\",\"to\":\"0xd1e5b0ff1287aa9f9a268759062e4ab08b9dacbe\",\"data\":\"0x6352211e6d8b296e38dfd295f2f4feb9ef2721c48210b7d77c0a08867123d9bd5150cf48\"},\"latest\"],\"id\":46,\"jsonrpc\":\"2.0\"}"`
echo $RES
echo
done My output:
|
Oh, I see the issue now! When there is a revert, which most nodes treat like a normal result (which it is; |
It looks like modern nodes are all doing something similar, so I've put logic in to undo this "convenience". In v6 I may re-address how provider |
I've rerun the script today after that major node upgrade and now infura and cloudflare are in sync. Linkpool is different though:
So practically we can close this issue and open a new one for linkpool, but I am not sure about all the details, maybe linkpool will just need to update its geth node version. The good news is that geth node itself seems to be moving the right direction. |
It looks like LinkPool (I've not heard of that one before) doesn't return any of the needed data to recreate the actual correct revert data returned, so I don't think there is anything that can be done for that... :s Glad it works for Geth though. I'll close this issue. Thanks! :) |
Given an example:
Produces:
It is interesting that the same call to mainnet.infura.io doesn't produce such error.
The text was updated successfully, but these errors were encountered: