Docker deployment invalid Signature

Help. Running locally Docker Desktop Windows 10
/polygon/data_dir/
…/polygon-edge secrets init --data-dir test-chain-1

[SECRETS INIT]
Public key (address) = 0xf1791500f15598F78D84538eAaE9DfD7224b178A
Node ID = 16Uiu2HAmP2au7zsunCrmc3pTY1oud95Zha5RoCzkUXJEPUrt23cE


zaxaz@zaxaz:~/polygon/genesis$ …/polygon-edge genesis --consensus ibft --ibft-validators-prefix-path test-chain- --bootnode /ip4/127.0.0.1/tcp/10001/p2p/16Uiu2HAmP2au7zsunCrmc3pTY1oud95Zha5RoCzkUXJEPUrt23cE --chain-id 303 --premine 0x171C8c7E2c3BdDd46365f861601D985015AfF3d2:1000000000000000000000

[GENESIS SUCCESS]
Genesis written to ./genesis.json


docker run -p1221:8545 --volume=/home/zaxaz/polygon/data_dir/test-chain-1:/test-chain-1 --volume=/home/zaxaz/polygon/genesis/genesis.json:/home/ubuntu/genesis.json 0xpolygon/polygon-edge server --data-dir /test-chain-1 --chain /home/ubuntu/genesis.json --libp2p 0.0.0.0:1478 --seal


2022-09-06T19:57:50.390Z [INFO] polygon: Data dir: path=/test-chain-1
2022-09-06T19:57:50.441Z [INFO] polygon.blockchain: Current header: hash=0xfcb85986f2190834fba74f6eb501c72d6cc702ccf3170cb7fadb91d2ac44c935 number=0
2022-09-06T19:57:50.441Z [INFO] polygon.blockchain: genesis: hash=0xfcb85986f2190834fba74f6eb501c72d6cc702ccf3170cb7fadb91d2ac44c935
2022-09-06T19:57:50.441Z [INFO] polygon.ibft: validator key: addr=0xf1791500f15598F78D84538eAaE9DfD7224b178A
2022-09-06T19:57:50.441Z [INFO] polygon: GRPC server running: addr=127.0.0.1:9632
2022-09-06T19:57:50.441Z [INFO] polygon.network: LibP2P server running: addr=/ip4/172.17.0.2/tcp/1478/p2p/16Uiu2HAmP2au7zsunCrmc3pTY1oud95Zha5RoCzkUXJEPUrt23cE
2022-09-06T19:57:50.441Z [INFO] polygon.network: Omitting bootnode with same ID as host: id=16Uiu2HAmP2au7zsunCrmc3pTY1oud95Zha5RoCzkUXJEPUrt23cE
2022-09-06T19:57:50.441Z [INFO] polygon.jsonrpc: http server started: addr=0.0.0.0:8545
2022-09-06T19:58:33.337Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err=“contract creation without data provided”
2022-09-06T19:58:54.852Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err=“unable to apply transaction even for the highest gas limit 5242880: invalid signature”
2022-09-06T19:59:01.844Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err=“unable to apply transaction even for the highest gas limit 5242880: invalid signature”
2022-09-06T19:59:08.244Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err=“unable to apply transaction even for the highest gas limit 5242880: invalid signature”
2022-09-06T19:59:08.352Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err="unable to apply transaction even for the highest gas limit 5242880: invalid signature

What Am I doing wrong

@Sanket_Polygon Any thoughts/ideas?!

@zaxaz

Can you let us know in bit more details all the steps that you made, after starting up this docker in order to try to replicate this error from our end.

Also, we can see that you specified different libp2p port (10001) in your genesis file, compared to your docker run command.

Howdy.
I thought p2p port was for internal comms between bootloaders and peers?

But will test with alternatives.

After docker is up,
I configure meta mask to the local network exposed by -p 1221:8545
Http://localhost:1221
Chain id 303, which i set in genesis
And a random symbol NEE

Try to do a local transaction between to accounts… and that error in previos post occurs…

Also same error when i try to deploy hello world smart contract from remix.

Let me know any troubleshooting steps i can take?
Thank you for your time.

@zaxaz
Can you past us all commands that you used for setting up your entire local blockchain, including all your other nodes?

Beside this, we would like to know the amount that you tried to transfer between the account and did you try to set any gas limit on this transaction.

Howdy.
I adjusted all the addresses as you noted for p2p and exposed them…
Moved data_dir to ubuntu home …

zaxaz@zaxaz:~/polygon$ cd data_dir/
zaxaz@zaxaz:~/polygon/data_dir$ ../polygon-edge secrets init --data-dir test-chain-1

[SECRETS INIT]
Public key (address) = 0x698A9fbEC05A1e7E06EF236a7541869b276cCA16
Node ID              = 16Uiu2HAmPuaWVKc3wZziSGbbzsm5F1Wnf3vE4bcrSWQzNDCPtNPD

zaxaz@zaxaz:~/polygon/data_dir$ cd ../genesis/
zaxaz@zaxaz:~/polygon/genesis$ ../polygon-edge genesis --consensus ibft --ibft-validators-prefix-path test-chain- --bootnode /ip4/0.0.0.0/tcp/1478/p2p/16Uiu2HAmPuaWVKc3wZziSGbbzsm5F1Wnf3vE4bcrSWQzNDCPtNPD --chain-id 3333 --premine 0x171C8c7E2c3BdDd46365f861601D985015AfF3d2:1000000000000000000000

[GENESIS SUCCESS]
Genesis written to ./genesis.json

zaxaz@zaxaz:~/polygon/genesis$ cd ..
zaxaz@zaxaz:~/polygon$ docker run -p 8545:8545 -p1478:1478 -p9632:9632 --volume=/home/zaxaz/polygon/data_dir/test-chain-1:/home/ubuntu/test-chain-1 --volume=/
home/zaxaz/polygon/genesis/genesis.json:/home/ubuntu/genesis.json 0xpolygon/polygon-edge server --data-dir /home/ubuntu/test-chain-1 --chain /home/ubuntu/gene
sis.json --libp2p 0.0.0.0:1478 --grpc 0.0.0.0:9632 --seal
2022-09-07T13:51:19.839Z [INFO]  polygon: Data dir: path=/home/ubuntu/test-chain-1
2022-09-07T13:51:19.879Z [INFO]  polygon.blockchain: genesis: hash=0xfcb85986f2190834fba74f6eb501c72d6cc702ccf3170cb7fadb91d2ac44c935
2022-09-07T13:51:19.879Z [INFO]  polygon.ibft: validator key: addr=0x698A9fbEC05A1e7E06EF236a7541869b276cCA16
2022-09-07T13:51:19.879Z [INFO]  polygon: GRPC server running: addr=0.0.0.0:9632
2022-09-07T13:51:19.879Z [INFO]  polygon.network: LibP2P server running: addr=/ip4/172.17.0.2/tcp/1478/p2p/16Uiu2HAmPuaWVKc3wZziSGbbzsm5F1Wnf3vE4bcrSWQzNDCPtNPD
2022-09-07T13:51:19.880Z [INFO]  polygon.network: Omitting bootnode with same ID as host: id=16Uiu2HAmPuaWVKc3wZziSGbbzsm5F1Wnf3vE4bcrSWQzNDCPtNPD
2022-09-07T13:51:19.880Z [INFO]  polygon.jsonrpc: http server started: addr=0.0.0.0:8545
2022-09-07T13:52:25.285Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err="contract creation without data provided"
2022-09-07T13:52:31.686Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err="unable to apply transaction even for the highest gas limit 5242880: invalid signature"
2022-09-07T13:52:40.503Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err="unable to apply transaction even for the highest gas limit 5242880: invalid signature"
2022-09-07T13:52:40.717Z [ERROR] polygon.dispatcher: failed to dispatch: method=eth_estimateGas err="unable to apply transaction even for the highest gas limit 5242880: invalid signature"

It is a single node…Do i need more for ibft?
I have set all values in meta mask
But i get the error before I even send the tx.

@zaxaz
We can see that you have premine to the following address which doesn’t belong to your node 0x171C8c7E2c3BdDd46365f861601D985015AfF3d2

Can you elaborate this setup in bit more details what were you trying to achieve with the single node setup?

For ibft its recommended to setup at least 4 nodes, and you can find complete local setup instructions on the following page:

https://docs.polygon.technology/docs/edge/get-started/set-up-ibft-locally\

Let us know if you will need any further help.

That documentation says there is no minimum, this is only for testing local experimentation.
I do not need HA or Fail over locally no need for 4 nodes, only want to make it work with a single unit and move up as i understand what is happening…

What do you mean my address does not belong to the node for premine flag?
How do I get tokens? I just used a meta mask ETH account?
IS there documentation on getting tokens for a new network?
Where is the nodes Private Key for sending tokens?

Your time is appreciated

Thank you.

Going through 4 node local setup…

Also at the bottom of local 4 node Step 5
“Now that you’ve set up at least 1 running client, you can go ahead and interact with the blockchain using the account you premined above”
But there is no indication that i need to use an “account that belongs to a node”??

Thank you.
I was able to get a tx through with the 4 nodes on docker localhost.
Using Node 1 public key and sending tx to my metamask using its private in w3 node script provided in docmentation. Query JSON RPC endpoints | Polygon Technology | Documentation

Tx failed for insuffient funds, operator error there…
Your time and patience are appreciated.
Continue to be diligent.
Z

@zaxaz

Thanks for explain what were you trying to achieve.

If you would like to see how you can move your native tokens from your local test blockchain, you will have to provision at least 2 nodes.
One on which the tokens will be premined and other to which you would like to move some amount of your native tokens.

We would recommend to follow once again our 4 nodes setup, in order to familiarize yourself with our most basic setup, and just to simply connect your metamask with one of your local node address where tokens are premined and just move them to a “local” public address of any of your other nodes that are the part of this chain.

Hi @zaxaz,

I would like to ask you something. Did you make those transactions using a script or using Metamask?

Howdy.
The script provided at the end of the documentation at

I will be testing with Metamask this after noon after I reconfigure the environment.

@zaxaz In the script, did you use the private key for the account with a premined balance?

Correct…
I found the private key to the node in consensus directory after reading the documentation more carefully.

This may require another thread, but while I have your attention…

Do you think I should use an ERC20 Smart contract instead of the native token so I do minting of new tokens?
Or is there a way to Mint more tokens like a faucet for the native token?

Your time and diligence are appreciated.
Z

@zaxaz From your first message, I see that you premined this address “0x171C8c7E2c3BdDd46365f861601D985015AfF3d2”. As I understand, you are running a network with only one validator, and this would be its public address: 0xf1791500f15598F78D84538eAaE9DfD7224b178A. If you use the private key found consensus, then it is the private key for this “0xf1791500f15598F78D84538eAaE9DfD7224b178A” public address, which has no balance. I recommend you to sign the transaction with the private key of an account that has a balance for sure, and see if that works.

@zaxaz The premined amount of tokens will be your total token supply for the network.

FIrst address was a Metamask generated address, I tried with one node… premining worked and the 1000 tokens showed up in Metamask after i connected to the network. but nothing worked, with the error of invalid signature.

The second attempt was with a nodes public key and after configuring the 4 nodes I sent the transaction to metamask account, and the tx actually made it to the nodes and processing happened… However the script was in ETH and I sent more than was available… Pretty sure… but double checking today i hope…

Noted: Total supply for the network… better spend some time on some tokenomics.

@zaxaz For that first try with one validator, did you use the private key for that Metamask generated account in the script?