How can I set my local waves network successfully?

140 views Asked by At

I have 2 questions.

  1. I did execute local waves network. I want to set 2 miner nodes. First booted node did woking well and mining blocks. Second booted node did woking well but just syncing blocks. Second node didn't mining blocks. Second node also did set "miner.enable=yes" and have 1000WAVES.

    Is there anything else that needs to be set for this node to be minor? Or does this node need time to participate in the mining schedule?

  2. I want to get miner info by using REST API. My local node's config did set like followings. api-key-hash = "H6nsiifwYKYEx6YzYD7woP1XCn72RVvx6tC1zjjLXqsu" And I did call API like this.

    curl -X GET http://127.0.0.1:6869/debug/minerInfo -H "Content-Type:application/json" -H "api_key: H6nsiifwYKYEx6YzYD7woP1XCn72RVvx6tC1zjjLXqsu"

    But I got error message like this. {"error":2,"message":"Provided API key is not correct"}

    I did call same API in "https://nodes-testnet.wavesnodes.com/api-docs/index.html#/debug/minerInfo_1" But I got same error message.

    How can I call this API successpully?

1

There are 1 answers

2
KardanovIR On
  1. That should be enough, but if your first node has 99.9999 million Waves and the second one - 1000, the first one will generate 99.9999% of blocks, so maybe it is not the proper time to generate a block for the second node.

  2. You should add header X-Api-Key with an actual API key, not with the hash of it. For example, you had "myawesomekey" and got a hash from it (H6nsiifwYKYEx6YzYD7woP1XCn72RVvx6tC1zjjLXqsu), then you send a header X-Api-Key=myawesomekey