I’m currently utilizing the request method of the EVM RPC canister to interact with the alchemy_getAssetTransfers endpoint, specifically using Alchemy as the RPC provider (currently on Base).
I’ve encountered an issue where the HTTPS outcall consensus repeatedly fails, as noted in my logs. I suspect this might be due to rate limiting imposed by Alchemy, which seems to alter the response after a certain number of requests. Additionally, I experience a similar problem with different RPC providers when submitting raw transactions: the first call succeeds, but subsequent ones (from other nodes in the subnet) fail because the nonce has already been used.
Here is the error message I see in my logs (when calling the alchemy_getAssetTransfers endpoint):
[ERROR] HttpOutcallError(
IcError {
code: SysTransient,
message: "No consensus could be reached. Replicas had different responses. Details: request_id: 3107553, timeout: 1720963553524698886, hashes: [869cd8a591934529e4b126a147dc8e5a94f9c3b4fa6016d3b56697dc11184eaa: 15], [f9bbec2f303ada5608279d556f87ded535d99676ecb620dc401fe5eb4ddda2ac: 12]",
},
)
Could anyone suggest how to effectively manage this situation?
Here is a solution that another community member is using to work around this (known) issue with the Alchemy provider:
Additionally, I experience a similar problem with different RPC providers when submitting raw transactions: the first call succeeds, but subsequent ones (from other nodes in the subnet) fail because the nonce has already been used.
Which RPC providers cause this to happen for eth_sendRawTransaction? This is also a known issue, and we are looking for ways to mitigate this.
Hi @NimaRa! Yes, like @rvanasa mentioned, I ran into similar issues.
I ended up doing my RPC requests as regular HTTPS outcalls through a proxy worker on Cloudflare that did caching and deduplication to ensure not to flood the RPC API with requests. Not super beautiful but it worked well.
Repository for that worker is here:
Currently I am trying to migrate off of that since the EVM_RPC canister now supports the L2s I need: Optimism, Arbitrum and Base.
PS: If not the case, it would be worth it if the foundation documented these solutions somewhere. It feels like I keep copying and pasting the same links in multiple threads.
Thanks for sharing these resources, however for this specific case it was about finding a way to use the rpc canister directly instead of re-implementing the HTTP outcalls. Seems like for now there is no choice though, much appreciated