openethereum / parity-deploy

Parity deployment script.
Apache License 2.0
81 stars 52 forks source link

Question about key.priv and address.txt #48

Closed whitenoiseL closed 6 years ago

whitenoiseL commented 6 years ago

Just two quick questions about key.priv and address.txt.

Why the address I generate from private key which is stored in key.priv is different from the address that is stored in address.txt?

What if I want to use my own account as miner in aura?

whitenoiseL commented 6 years ago

I find the way to use my own account as miner finally. It turns out that even if I remove key.priv, key.pub and address.txt, the POA chain can still be built up without error. So I guess these three files have nothing to do with the chain configuration. Then what are they generated for?

ddorgan commented 6 years ago

I think there was some change here. Let me look into this and get back to you.

whitenoiseL commented 6 years ago

@ddorgan It seems there are something wrong with the generated files (i.e key.priv, key.pub), therefore the enodes in reserved_peers file are also wrong. If we start a POA chain, let's say a 2-node-POA, those two nodes are not connected with each other. We need to correct the information that is stored in reserved_peers to make them connected. For me, I get the right enode information by post parity_enode method to my authority node. I guess there is something wrong in parity-deploy.sh file. I haven't look into that yet.

ddorgan commented 6 years ago

@whitenoiseL please checkout the lastest master and let me know if this helps. It's been switched to use parity-ethereum stable.

Let me work on the key issues beyond that, as I'll need to run quite a lot of tests on different versions to make sure the update works everywhere.

whitenoiseL commented 6 years ago

@ddorgan The latest change doesn't help much. The issue is still the same. The address in address.txt does not match the address generated from private key which is stored in key.priv. The enode information changes everytime when I rebuild the chain. Does that mean the enode information can only be got after the chain is up? Or do I understand it wrong.

wechat screenshot_20180817230256

ddorgan commented 6 years ago

Can you please run sudo bash clean.sh and then run something like parity-deploy.sh --config aura --nodes 3 (for example).

whitenoiseL commented 6 years ago

@ddorgan Well, it didn't work. The enodes are still not match. wechat screenshot_20180818000114

ddorgan commented 6 years ago

Please ensure you have parity stable (v1.11.8) installed locally (in /usr/bin/parity) and try again, thanks.

whitenoiseL commented 6 years ago

@ddorgan Yeah, thanks a lot! It works now! All nodes are connected. However the enodes show from parity still don't match what is stored in reserved_peers. But they do connected now. I am still trying to figure out why. Thanks anyway!

ddorgan commented 6 years ago

@whitenoiseL Parity-Ethereum versions 2.x are now also working, see: https://github.com/paritytech/parity-deploy/pull/62