Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo/dpos can not run 2 miners at the same time #2

Open
ganioc opened this issue Dec 3, 2018 · 3 comments
Open

demo/dpos can not run 2 miners at the same time #2

ganioc opened this issue Dec 3, 2018 · 3 comments

Comments

@ganioc
Copy link

ganioc commented Dec 3, 2018

Problem:
我在测试中发现demo/dpos例子,无法运行2个miner节点。理论上应该在Node1运行后,Node2能够接收到Node1广播的出块信息,但是没有。

Node1

2018-12-03T07:38:24.626Z - info: =============_updateTip get 2 1,number=4,hash=d2b28a0b3514977e8da1025f33d7c926799c01c92704d00cb442260c68aeb503 chain.js:529
2018-12-03T07:38:24.626Z - info: begin recycle snanshot log_snapshot_manager.js:28
2018-12-03T07:38:24.627Z - info: delete snapshot f0c04e22ad24d2bbf3c13981a4436e16553ac3e776ec6d639c731a7bf039f089 log_snapshot_manager.js:32
2018-12-03T07:38:24.627Z - info: delete snapshot 582c9aa6cc46327f3e1d927998081f32dbd196f3a754cebf5ed509c1e17ab3fe log_snapshot_manager.js:32
2018-12-03T07:38:24.628Z - debug: emit tipBlock with af374dc692cf56e556acfeb2e799578e8a79e643609752ea03bd640ea34d4c74 16 chain.js:976
2018-12-03T07:38:24.628Z - info: begin recycle snanshot log_snapshot_manager.js:28
2018-12-03T07:38:24.629Z - info: broadcast tip headers from number: 16 hash: af374dc692cf56e556acfeb2e799578e8a79e643609752ea03bd640ea34d4c74 to number: 16 hash: af374dc692cf56e556acfeb2e799578e8a79e643609752ea03bd640ea34d4c74 chain.js:992
2018-12-03T07:38:34.001Z - debug: update header storage cache hash: b7e434b687fd8132f6198be3f0218f3e45a72d90b3ddad099002f8e0da624461 number: 0 verified: 1 header_storage.js:179

Node2

2018-12-03T07:38:36.618Z - debug: [network: default peerid: miner2] will connect to peers from node storage:  Set {} random_outbound_network.js:72
2018-12-03T07:38:37.039Z - debug: [network: default peerid: miner2] cannot find any peers, ignore connect. random_outbound_network.js:99
2018-12-03T07:38:37.631Z - debug: [network: default peerid: miner2] node need more 7 connection, call  _newOutbounds random_outbound_network.js:58
2018-12-03T07:38:37.632Z - debug: [network: default peerid: miner2] will connect to peers from node storage:  Set {} random_outbound_network.js:72
2018-12-03T07:38:38.042Z - debug: [network: default peerid: miner2] cannot find any peers, ignore connect. random_outbound_network.js:99
2018-12-03T07:38:38.635Z - debug: [network: default peerid: miner2] node need more 7 connection, call  _newOutbounds random_outbound_network.js:58
2018-12-03T07:38:38.636Z - debug: [network: default peerid: miner2] will connect to peers from node storage:  Set {} random_outbound_network.js:72
2018-12-03T07:38:39.047Z - debug: [network: default peerid: miner2] cannot find any peers, ignore connect. random_outbound_network.js:99
2018-12-03T07:38:39.638Z - debug: [network: default peerid: miner2] node need more 7 connection, call  _newOutbounds random_outbound_network.js:58
2018-12-03T07:38:39.639Z - debug: [network: default peerid: miner2] will connect to peers from node storage:  Set {} random_outbound_network.js:72
2018-12-03T07:38:40.056Z - debug: [network: default peerid: miner2] cannot find any peers, ignore connect. random_outbound_network.js:99

Environment:
Ubuntu 16.04 server Node1, Node 2
使用了自己的SN server

Test Steps:
Node1
(1) ./demo/dpos/create.sh
(2)./demo/dpos/miner.sh
Node2
(3)./demo/dpos/create.sh
(4)./demo/dpos/miner2.sh

Scripts:
脚本中,除了更改miner.cfg里的"sn"外,没有变化。

@swjtusw
Copy link

swjtusw commented Dec 4, 2018

node2不能再create创始块了,需要用node1的创世块,否则是两个独立的链

@ganioc
Copy link
Author

ganioc commented Dec 11, 2018

好的。会测试并返回测试结果。
谢谢!

@ganioc
Copy link
Author

ganioc commented Dec 17, 2018

$ tree data
data
`-- dpos
    `-- genesis
        |-- Block
        |   `-- 3c5da253f566316696993b4b13f73e0acf9508ccdd1b1a8bddb5d11632c5e587
        |-- config.json
        |-- database
        |-- log
        |   `-- info.log
        |-- storage
        |   |-- dump
        |   |   `-- 3c5da253f566316696993b4b13f73e0acf9508ccdd1b1a8bddb5d11632c5e587
        |   `-- log
        `-- tmp

This is the data/ directory on Node 1 after running ./create.sh , what should be copied to Node 2?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants