Docker deployment invalid Signature

Yesir.
I did try…
The script hung…
The validator connected with websockets but no other deatils, however i had not added the debug arguments at this point of the endeavor…

@zaxaz

By further looking at your logs, we can see that your blockchain is not started.

One of the reasons could be that your validator(node)–data-dir is not pointing to the right folder.

Please try to include ./test-chain-1 instead /test-chain-1 in your --data-dir flag and let us know the outcome.

Here is a command that you should try to run:

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

@zaxaz Do you still require further assistance with this support request or if we can assist you in any other way?

Apologies, i have other clients which took priority then a hurricane, but now i do require assistance.

I re built a 4 node instance with lots premined tokens, however the transaction just runs and runs and never completes… the debug log constantly scrolls json rpc call eth_get… ill have to double check… but it seems to get the transaction but nothing happens after and it is pending forever…

How do you know the Blochain is not started, what would i see in the logs iff it all started correctly?

Your expertise is appreciated.

hi @zaxaz
If you can see that new blocks are not being produced that it means that the chain is halted.

If that’s the case then feel free to forward to us your log files.

1 Like

Yesir.
Getting Closer.
I have provided my commands.
And snippets of the logs after the TX begins, However it ends with Invalid Signature.

Make Directories for Validator and Genesis for local development. In Production genesis should be accessible from Private resource  S3, google drive, sftp etc..
mkdir genesis-block
mkdir validator-data

Configure 4 Nodes as 4 Validators
cd validator-data

export validatorNode=3 && echo "validator-data-$validatorNode" >> validators.log && ../polygon-edge-cli/polygon-ed
ge secrets init --data-dir test-chain-$validatorNode >> validators.log

The File validators.log keep each nodes ID and public Keys.  Private Keys can be found in thier directories consensus private key files
Node ID from validators log for connection string for boot nodes.

/ip4/< DNS or IP >/tcp/< PORT >/p2p/<Node ID>

First Boot node in localhost (Docker) with port. 
/ip4/127.0.0.1/tcp/10001/p2p/16Uiu2HAm34FgMFGGJQJdBGMNK1GNfanYBrQvTds3Hcf3BRLvVbZU
/ip4/127.0.0.1/tcp/20001/p2p/16Uiu2HAm5tG8ah1tnK77Y364oU3bN12icUYQ5RLuGgxqrXrfJsbE

Create Genesis with pre mining
1 Trillion Eth(NEE) = 1000000000000000000000000000000 wei

polygon-edge-cli/polygon-edge genesis --consensus ibft --ibft-validators-prefix-path validator-data/test-chain- \
--bootnode /ip4/127.0.0.1/tcp/10001/p2p/16Uiu2HAm34FgMFGGJQJdBGMNK1GNfanYBrQvTds3Hcf3BRLvVbZU \
--bootnode /ip4/127.0.0.1/tcp/20001/p2p/16Uiu2HAm5tG8ah1tnK77Y364oU3bN12icUYQ5RLuGgxqrXrfJsbE \
--premine=0xD02157848ae8D3bab69cb0b5367b2D0217366CC6:1000000000000000000000000000000 --chain-id 308 --name neebytes

mv genesis.json genesis-block/

START each client with docker
docker run -d -p 10000:10000 -p10001:10001 -p10002:10002 --volume=/home/ec2-user/validator-data/test-chain-1:/test-chain-1 --volume=/home/ec2-user/genesis-block/genesis.json:/genesis.json 0xpolygon/polygon-edge server --data-dir ./test-chain-1 --chain ./genesis.json --libp2p :10001 --grpc :10000 --jsonrpc :10002 --seal --dev --log-level debug
docker run -d -p 20000:20000 -p20001:20001 -p20002:20002 --volume=/home/ec2-user/validator-data/test-chain-2:/test-chain-2 --volume=/home/ec2-user/genesis-block/genesis.json:/genesis.json 0xpolygon/polygon-edge server --data-dir ./test-chain-2 --chain ./genesis.json --libp2p :20001 --grpc :20000 --jsonrpc :20002 --seal --dev
docker run -d -p 30000:30000 -p30001:30001 -p30002:30002 --volume=/home/ec2-user/validator-data/test-chain-3:/test-chain-3 --volume=/home/ec2-user/genesis-block/genesis.json:/genesis.json 0xpolygon/polygon-edge server --data-dir ./test-chain-3 --chain ./genesis.json --libp2p :30001 --grpc :30000 --jsonrpc :30002 --seal --dev --log-level debug
docker run -d -p 40000:40000 -p40001:40001 -p40002:40002 --volume=/home/ec2-user/validator-data/test-chain-4:/test-chain-4 --volume=/home/ec2-user/genesis-block/genesis.json:/genesis.json 0xpolygon/polygon-edge server --data-dir ./test-chain-4 --chain ./genesis.json --libp2p :40001 --grpc :40000 --jsonrpc :40002 --seal --dev

docker ps -f ancestor="0xpolygon/polygon-edge" --format '{{.ID}}: {{.Image}}\t{{.Ports}}'

ALL clients running

Begin Web-3 websocket connection

Processing Contiuned

Failure

Web-Socket code
To metamask
from Private Key of Node 1

const web3 = new Web3("ws://127.0.0.1:10002/ws"); //example: ws://localhost:10002/ws
web3.eth.accounts
  .signTransaction(
    {
      to: "0x171C8c7E2c3BdDd46365f861601D985015AfF3d2",
      value: web3.utils.toWei("4"),
      gas: 21000,
    },
    "04801853ead261dbf5594eea8d23c4b16ce68574c5342fd224f26ec151ffe47a"
  )
  .then((signedTxData) => {
    web3.eth
      .sendSignedTransaction(signedTxData.rawTransaction)
      .on("receipt", console.log);
  });

Your time and help are appreciated.
Thank you.

O dang…
Operator Error…
The Containers do not have access to the --ibft-validators-prefix-path

genesis does not point to anything… I am confused… does each validator need access to this directory, they have access to their own…
No I think I am good?

Hi @zaxaz we will review your errors and get back to you today.

Hi @zaxaz ,

Can you please provide full logs? I don’t see any sign of block production in what you provided here, so this could be the problem.

Full logs?
These are the only logs I have/know of? Which is Standard out logs from docker runs?
All 4 nodes? Or just the main node that is managing tx?
Is there another log or just send the docker log files?

main node 1 logs

Thank you for your help.
Z

@zaxaz Do you have the validators’ data in a directory called validator-data. I see you used this to generate the genesis file --ibft-validators-prefix-path validator-data/test-chain-

Yesir

@zaxaz Could you please share what commands do you use to generate the validator keys?

The secrets init command.
…/polygon-edge-cli/polygon-edge secrets init --data-dir test-chain-1

@zaxaz Can you try to generate the genesis file using --ibft-validators-prefix-path test-chain-? If you use that command to generate the keys, I think this is propably the right path.

Correct.

polygon-edge genesis --consensus ibft --ibft-validators-prefix-path validator-data/test-chain-
–bootnode /ip4/127.0.0.1/tcp/10001/p2p/16Uiu2HAm34FgMFGGJQJdBGMNK1GNfanYBrQvTds3Hcf3BRLvVbZU
–bootnode /ip4/127.0.0.1/tcp/20001/p2p/16Uiu2HAm5tG8ah1tnK77Y364oU3bN12icUYQ5RLuGgxqrXrfJsbE
–premine=0xD02157848ae8D3bab69cb0b5367b2D0217366CC6:1000000000000000000000000000000 --chain-id 308 --name neebytes

Can you try using --ibft-validators-prefix-path test-chain- instead of --ibft-validators-prefix-path validator-data/test-chain-?

By the way, did you ever delete and generate again the genesis file? if at any point you want to recreate the genesis file, you need to remove the data directories too and generate new keys.

Yesir.
There are lots of errors if you delete the Genesis file with same validator directories…
I will test this soon, your time is appreciated.
Z