Consensys / quorum

A permissioned implementation of Ethereum supporting data privacy
https://www.goquorum.com/
GNU Lesser General Public License v3.0
4.68k stars 1.29k forks source link

How to set a quorum cluster with istanbul with each node opened one by one #611

Closed matrixoneken closed 5 years ago

matrixoneken commented 5 years ago

I want to set a quorum cluster like 7nodes example using istanbul. I have run istanbul-init.sh to set the working dir. I open node 1 by geth --datadir qdata/dd1 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22000 --port 21000 --unlock 0 --password passwords.txt

and then open node 2 by geth --datadir qdata/dd2 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22001 --port 21001 --unlock 0 --password passwords.txt

and then open node3 by geth --datadir qdata/dd3 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22002 --port 21002 --unlock 0 --password passwords.txt

and then open node 4 by geth --datadir qdata/dd4 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22003 --port 21003 --unlock 0 --password passwords.txt

and then open node 5 by geth --datadir qdata/dd5 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22004 --port 21004 --unlock 0 --password passwords.txt

and then open node 6 by geth --datadir qdata/dd6 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22005 --port 21005 --unlock 0 --password passwords.txt

and then open node 7 by geth --datadir qdata/dd7 --nodiscover --istanbul.blockperiod 5 --networkid 10 --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul --rpcport 22006 --port 21006 --unlock 0 --password passwords.txt

After finishing open 7 nodes, I deploy a public smart contract with web3.js but can not get the contract address.

I want to know how to set the istanbul cluster with each node opened one by one?

And I found some parameter in istanbul-start.sh like following

ARGS="--nodiscover --istanbul.blockperiod 5 --networkid $NETWORK_ID --syncmode full --mine --minerthreads 1 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum,istanbul"

I want to know what is the meaning about '--istanbul.blockperiod 5' , '--networkid $NETWORK_ID',' --minerthreads 1' and how many nodes need to reach an agreement about a smart contract deployment?

Thank you

jbhurat commented 5 years ago

Hi @matrixoneken,

You can also run geth --help to list all the supported Options and a brief explanation.

The number of nodes that need to reach an agreement in case of Istanbul BFT is 2F + 1 and the number of nodes can be defined by N = 3F + 1. So in case of a 7 node setup, the value of F is 2 and 5 nodes need to reach an agreement.

jbhurat commented 5 years ago

Hi @matrixoneken, please open another issue if you have any questions/issues