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

Blockmaker isn't allowed to create blocks #83

Closed
ashishvk2286 opened this issue Mar 31, 2017 · 2 comments
Closed

Blockmaker isn't allowed to create blocks #83

ashishvk2286 opened this issue Mar 31, 2017 · 2 comments

Comments

@ashishvk2286
Copy link

I am trying to start custom Quorum blockchain nodes. I am referring 7-nodes example for the required commands. 7-nodes example is working fine.

While starting Block Maker + Voter Node using below commands I am getting “Invalid header: block-maker-address isn't allowed to create blocks” error.
Commands:

  1. Ubuntu Terminal 1:
    a. geth --datadir chain-data/blockmaker1 init genesis.json
    b. bootnode --nodekeyhex "2f64c911455fd7a835531ad223f1212908b2760de8bfc9228f1329920a0bf887" --addr="127.0.0.1:33445"
  2. Ubuntu Terminal 2:
    a. GLOBAL_ARGS="--keystore /home/ashish/.ethereum/keystore --bootnodes enode://e6993a52aba890b93fcc0f7a1acae2457a6157212928fbf266ca55810d25b262115bfe36728e8d5866a64b7467083cd90f303bb16831ca6496b3e59d60cd13d5@127.0.0.1:33445 --rpc --rpcaddr 0.0.0.0 --rpcapi admin,db,eth,debug,miner,net,shh,txpool,personal,web3,quorum"
    b. geth --datadir chain-data/blockmaker1 $GLOBAL_ARGS --rpcport 22001 --port 21001 --blockmakeraccount "0xa0baf8633c30657662d2835652d954c63373bbd3" --blockmakerpassword "123" --singleblockmaker --voteaccount "0x122424aef8ce2935b1f462b43fe3916490ce6446" --votepassword "123"
    In Terminal 2 I am seeing below error.
    Error:
    E0331 11:35:10.250046 core/blockchain.go:1230] Bad block Rewrote main README #1 (0x6118be867ebb0b675fb55f32d2ad0e2d137765c43a27e502df41d505abe7ff21)
    E0331 11:35:10.250377 core/blockchain.go:1231] Invalid header: 0xa0baf8633c30657662d2835652d954c63373bbd3 isn't allowed to create blocks

I calculated Block Maker Hex value using below command and added it in genesis.json file under Storage index: “0x0000000000000000000000000000000000000000000000000000000000000004”.
Please find attached genesis file for reference.
key = "000000000000000000000000a0baf8633c30657662d2835652d954c63373bbd3" + "0000000000000000000000000000000000000000000000000000000000000003"
"000000000000000000000000a0baf8633c30657662d2835652d954c63373bbd30000000000000000000000000000000000000000000000000000000000000003"
web3.sha3(key, {"encoding": "hex"})
Output: "0x6b47c8152d2cea470622edd1a530f45709bb497e9ea9b28184a7b70920936878"

Please let me know if I am missing any step here.

genesis.txt

@tylobban
Copy link
Contributor

Hi @ashishvk2286, it looks like you've used index3 (which is the index of the canVote mapping) as the <256 bit variable index> when creating the storage key for the canCreateBlocks map. But since you're setting up a block maker here, you should be using index5, which is the index of the canCreateBlocks map in the smart contract. Replacing 0...03 with 0...05 for the <256 bit variable index> should work. Let us know. We can make the docs clearer here.

@ashishvk2286
Copy link
Author

Hi @tylobban, Thanks for the reply.
Yes you are right. Specifying 0...05 for the <256 bit variable index> worked. It would be really helpful if this is specified in docs. :)

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