# Getting ECDSA cycles error when trying to sign a eth transaction

**URL:** <https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055>\
**Category:** Rust\
**Created:** [August 10, 2023, 6:32am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055 "2023-08-10T06:32:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![agentDPS](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@agentDPS](https://forum.dfinity.org/u/agentDPS)\
**Post date:** [August 10, 2023, 6:32am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/1 "2023-08-10T06:32:06Z")

</div>

Hi so my canister , is getting this error , in rust

```auto
Call was rejected:
Request ID: d816d17c619449fd7c0eb2d3c49591749813e84e90add6d242cf7f245cff1b11
Reject code: 5
Reject text: Canister uqxxh-6iaaa-aaaak-qci3a-cai trapped explicitly: Panicked at 'Failed to call sign_with_ecdsa sign_with_ecdsa request sent with 10_000_000_000 cycles, but 21_538_461_538 cycles are required.', /root/.cargo/git/checkouts/ic-web3-0a6667c8271b9070/903223b/src/api/accounts.rs:399:29

call_on_cleanup also failed:

Canister uqxxh-6iaaa-aaaak-qci3a-cai trapped explicitly: Panicked at 'Failed to call sign_with_ecdsa cleanup', /root/.cargo/git/checkouts/ic-web3-0a6667c8271b9070/903223b/src/api/accounts.rs:399:29

```

Not sure how to fix it …  
i am using the ic-web3 library at [GitHub - dipanshuhappy/ic-web3: Ethereum RPC client for canisters on the IC](https://github.com/dipanshuhappy/ic-web3)

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [August 10, 2023, 8:30am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/2 "2023-08-10T08:30:37Z")

</div>

This is an error on the ic-web3 library side. If you have a look at the [pricing of ECDSA](https://internetcomputer.org/docs/current/developer-docs/integrations/t-ecdsa/t-ecdsa-how-it-works#api-fees) you can see that the prod deployment has higher cycles cost than the test key. The library [only uses](https://github.com/dipanshuhappy/ic-web3/blob/main/src/ic.rs#L13) the test key cost

---

<div class="post-metadata">

**Author:** ![agentDPS](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@agentDPS](https://forum.dfinity.org/u/agentDPS)\
**Post date:** [August 10, 2023, 11:28am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/3 "2023-08-10T11:28:52Z")

</div>

So i am assuming that the test key can’t be used on the main net ? or can it be ?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [August 10, 2023, 11:32am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/4 "2023-08-10T11:32:57Z")

</div>

You can use the test key, but please don’t use it for any production deployment

---

<div class="post-metadata">

**Author:** ![agentDPS](https://avatars.discourse-cdn.com/v4/letter/a/fbc32d/32.png) [@agentDPS](https://forum.dfinity.org/u/agentDPS)\
**Post date:** [August 10, 2023, 11:39am UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/5 "2023-08-10T11:39:36Z")

</div>

okay but i am deploying to a 13 node main net , shouldnt test key work?

---

<div class="post-metadata">

**Author:** ![Vivienne](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/vivienne/32/29170_2.png) [@Vivienne](https://forum.dfinity.org/u/Vivienne)\
**Post date:** [August 10, 2023, 12:03pm UTC](https://forum.dfinity.org/t/getting-ecdsa-cycles-error-when-trying-to-sign-a-eth-transaction/22055/6 "2023-08-10T12:03:26Z")

</div>

Yes, you can use the test key, but we consider the prod key to be secure. The test key is only intended as a test key
