# HTTPS outcall consensus errors when calling alchemy api

**URL:** <https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197>\
**Category:** Developers\
**Created:** [July 14, 2024, 1:33pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197 "2024-07-14T13:33:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![NimaRa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nimara/32/22761_2.png) [@NimaRa](https://forum.dfinity.org/u/NimaRa)\
**Post date:** [July 14, 2024, 1:33pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/1 "2024-07-14T13:33:32Z")

</div>

Hello!

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):

```auto
[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?

---

<div class="post-metadata">

**Author:** ![rvanasa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/rvanasa/32/23650_2.png) [@rvanasa](https://forum.dfinity.org/u/rvanasa)\
**Post date:** [July 15, 2024, 4:00pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/2 "2024-07-15T16:00:12Z")

</div>

Here is a solution that another community member is using to work around this (known) issue with the Alchemy provider:

> [@Issues using a custom EVM RPC provider](https://forum.dfinity.org/t/issues-using-a-custom-evm-rpc-provider/30746):
>
> Hi, I’m adding support for EVM chains other than Mainnet and Sepolia to my app. Using Alchemy as a custom provider works great while developing locally. When running on mainnet I run into issues and wonder if someone has ideas for workarounds. 1. Alchemy reqs per second quota exceeded The Alchemy endpoint only allows 10 calls per second on the free tier. Upgrading to the next tier allows 15 I believe, still not enough as IC sends 20+ requests per EVM call. Upgrading to the enterprise tier is w…

> 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.

---

<div class="post-metadata">

**Author:** ![kristofer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/kristofer/32/11135_2.png) [@kristofer](https://forum.dfinity.org/u/kristofer)\
**Post date:** [July 15, 2024, 8:37pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/3 "2024-07-15T20:37:57Z")

</div>

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:

> **[GitHub - c-atts/evm-proxy-2: Proxy and deduplicate requests to the EVM RPC...](https://github.com/c-atts/evm-proxy-2)**
>
> Proxy and deduplicate requests to the EVM RPC API on Alchemy - c-atts/evm-proxy-2

Currently I am trying to migrate off of that since the EVM\_RPC canister now supports the L2s I need: Optimism, Arbitrum and Base.

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [July 16, 2024, 7:54am UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/4 "2024-07-16T07:54:28Z")

</div>

For a generic proxy solution for HTTP outcalls to support both IPv6 and idempotent answers, there are a couple of other references:

- Recently, @zensh shared a solution on this topic: [Idempotent Proxy Show: proxy HTTPS Outcalls to any Web2 service](https://forum.dfinity.org/t/idempotent-proxy-show-proxy-https-outcalls-to-any-web2-service/32754)

- Additionally, @massimoalbarello and @ilbert have proposed another solution parts of their IC Side Services activities: [Non replicated HTTPS outcalls](https://forum.dfinity.org/t/non-replicated-https-outcalls/26627)

* * *

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.

---

<div class="post-metadata">

**Author:** ![NimaRa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nimara/32/22761_2.png) [@NimaRa](https://forum.dfinity.org/u/NimaRa)\
**Post date:** [July 20, 2024, 5:33pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/5 "2024-07-20T17:33:02Z")

</div>

Great to know it’s being addressed. I have that issue with Alchemy (custom RPC key)

---

<div class="post-metadata">

**Author:** ![NimaRa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nimara/32/22761_2.png) [@NimaRa](https://forum.dfinity.org/u/NimaRa)\
**Post date:** [July 20, 2024, 5:33pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/6 "2024-07-20T17:33:40Z")

</div>

That’s amazing! Thank you 🙂

---

<div class="post-metadata">

**Author:** ![NimaRa](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/nimara/32/22761_2.png) [@NimaRa](https://forum.dfinity.org/u/NimaRa)\
**Post date:** [July 20, 2024, 5:35pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/7 "2024-07-20T17:35:08Z")

</div>

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 😉

---

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [September 11, 2025, 12:55pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/8 "2025-09-11T12:55:58Z")

</div>

I click on link to take to another thread, that take me to another thread, that take me to one more thread, I am just human not an inceptionist . So what is the answer actually ?

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 11, 2025, 1:53pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/9 "2025-09-11T13:53:00Z")

</div>

A. Do nothing if your API supports replicated responses, then investigate and fix the bug.  
B. If your API does not support replicated responses, most likely use an existing proxy or build one.  
C. Wait for [future](https://forum.dfinity.org/t/announcing-two-major-upgrades-for-https-outcalls-ipv4-support-non-replicated-calls-are-now-live/54580) changes.

Given you’re using the Anthropic API, I’m inclined toward B or C. That said, I don’t know your project well, nor this API, you’re best positioned to choose the right path. Likewise, if anyone else wants to suggest alternative solutions, please do.

---

<div class="post-metadata">

**Author:** ![AliSci](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alisci/32/33799_2.png) [@AliSci](https://forum.dfinity.org/u/AliSci)\
**Post date:** [September 11, 2025, 2:29pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/10 "2025-09-11T14:29:57Z")

</div>

it is not related to the transform` function?￼`

``rs

#[query]  
fn transform(raw: TransformArgs) → HttpResponse {  
let sanitized\_body = if raw.response.status == 200u16 {  
match String::from\_utf8(raw.response.body.clone()) {  
Ok(body\_str) =\> {  
match serde\_json::from\_str::\<serde\_json::Value\>(&body\_str) {  
Ok(json) =\> {  
let simplified = json!({  
“content”: json.get(“content”).unwrap\_or(&serde\_json::Value::Null)  
});  
serde\_json::to\_vec(&simplified).unwrap\_or\_default()  
}  
Err(_) =\> {  
serde\_json::to\_vec(&json!({“content”: [{“text”: “Parse error”}]})).unwrap\_or\_default()  
}  
}  
}  
Err(_) =\> serde\_json::to\_vec(&json!({“error”: “UTF8 error”})).unwrap\_or\_default(),  
}  
} else {  
serde\_json::to\_vec(&json!({“error”: raw.response.status})).unwrap\_or\_default()  
};

```auto
HttpResponse {
    status: 200,
    body: sanitized_body,
    headers: vec![],
}

```

}

```auto

```

---

<div class="post-metadata">

**Author:** ![peterparker](https://avatars.discourse-cdn.com/v4/letter/p/b9bd4f/32.png) [@peterparker](https://forum.dfinity.org/u/peterparker)\
**Post date:** [September 11, 2025, 2:48pm UTC](https://forum.dfinity.org/t/https-outcall-consensus-errors-when-calling-alchemy-api/33197/11 "2025-09-11T14:48:22Z")

</div>

Not sure what you are doing there, so cannot really help. For what it’s worth though, I generally just return status and body as it ([example](https://github.com/junobuild/juno/blob/b7bab99fadcab5ddfb65cf63cd07143e2319fa8d/src/observatory/src/http/response.rs#L3)).
