Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Transaction from unlocked account fails with error: "The nonce generation function failed, or the private key was invalid": #2586

Closed
adjisb opened this issue Mar 11, 2022 · 9 comments · Fixed by #2944

Comments

@adjisb
Copy link
Contributor

adjisb commented Mar 11, 2022

Hi, I'm unlocking this address: 0xffffFFFfFFffffffffffffffFfFFFfffFFFfFFfE on a mumbai fork to try to emulate polygon system account.
When I send the following transaction I get in the ganache v7.0.0 container log I get the error "The nonce generation function failed, or the private key was invalid":

mumbai_1 | > eth_sendTransaction: [ 
mumbai_1 | > { 
mumbai_1 | > "gas": "0xcd3f", 
mumbai_1 | > "from": "0xfffffffffffffffffffffffffffffffffffffffe", 
mumbai_1 | > "to": "0x0000000000000000000000000000000000001001", 
mumbai_1 | > "data": "...."

Even a transfer tx fails with the same error:

mumbai_1   |    >  eth_sendTransaction: [
mumbai_1   |    >   {
mumbai_1   |    >     "from": "0xfffffffffffffffffffffffffffffffffffffffe",
mumbai_1   |    >     "to": "0x5f890c9522dce5670d741d4277bfcc2d9ca8af02",
mumbai_1   |    >     "value": "0x12",
mumbai_1   |    >     "gasPrice": "0x77359400"
mumbai_1   |    >   }

Is seems this error happens when trying to ecsign with the fake private key.

Any idea ?

@davidmurdoch
Copy link
Member

Can you show how to you initializing ganache? Also, what version of ganache, node.js and what operating system are you using?

@adjisb
Copy link
Contributor Author

adjisb commented Mar 11, 2022

I'm running ganache in docker, this a section of my docker-compose, aaa, bbb, ccc are other unrelated addresses that I'm unlocking:

  mumbai:
    profiles:
      - testnet
    image: trufflesuite/ganache:v7.0.0
    ports:
      - "28545:28545"
    command:
      "-p 28545
        -v
        -f ${ETH_NODE_URI_MUMBAI_DOCKER}
        --chain.chainId 80001
        --chain.networkId 80001
        -u aaa
        -u bbb
        -u ccc
        -u 0xfffffffffffffffffffffffffffffffffffffffe"

I also tired with latest, same error.

@davidmurdoch
Copy link
Member

Have you tried updating to trufflesuite/ganache:v7.0.3?

@davidmurdoch
Copy link
Member

I'm able to reproduce with that address and am looking into a solution now.

@davidmurdoch
Copy link
Member

I've found the issue. Unfortunately there is no workaround. We'll get a release out with a fix ASAP.

@adjisb
Copy link
Contributor Author

adjisb commented Mar 11, 2022

Ok, thanks

@RiccardoBiosas
Copy link

I can confirm the same error on Ganache CLI v6.12.2 (ganache-core: 2.13.2)

@davidmurdoch
Copy link
Member

@RiccardoBiosas ganache-cli and ganache-core are deprecated, use the ganache package (v7). That said, this issue also occurs in that version, but will be fixed by #2944 soon.

@RiccardoBiosas
Copy link

@davidmurdoch Yes, I downgraded it to check if it was a temporarily viable workaround for the issue. Anyway looking forward to the fix, thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants