planetarium / NineChronicles.Headless

A headless node of NineChronicles game network, powered by Libplanet.
https://planetarium.github.io/NineChronicles.Headless/
GNU Affero General Public License v3.0
35 stars 37 forks source link

Win 10 Pro 21H1 19043.782, no Mined block in explorer #271

Closed Magby123 closed 3 years ago

Magby123 commented 3 years ago

Hi, i have use that miner Under windows 10 (Docker) 1122 3333 Antivirus and firewall turned off (ESET)... But this blocks even arent go to explorer under public key... And looks it forked to itself. Any solutions ? (source: https://github.com/CryptoKasm/9c-swarm-miner/issues/1 )

area363 commented 3 years ago

Hi @Magby123, can you show me the list of headless options you used when running the docker image(except for the private key)?

Magby123 commented 3 years ago

headless options you used when running the docker image

6666 (but only with 1 miner) . This settings ?

Magby123 commented 3 years ago

Hi @Magby123, can you show me the list of headless options you used when running the docker image(except for the private key)? Docker settings: https://clip2net.com/s/4aMEVgn https://clip2net.com/s/4aMEVM0 https://clip2net.com/s/4aMEW67 https://clip2net.com/s/4aMEWpp https://clip2net.com/s/4aMEXgu https://clip2net.com/s/4aMEXFH https://clip2net.com/s/4aMEXWA

area363 commented 3 years ago

@Magby123, thanks for the info.

At first glance, it appears that your miner isn't connected to other peers on the network. I took a look at the options for NineChronicles.Headless in 9c-swarm-miner(https://github.com/CryptoKasm/9c-swarm-miner/blob/97e9874bf67014200ca1b08308c5b40ed6d10b2b/bin/build-compose.sh#L55) and it appears that they're all correct.

While running the 9c-swarm-miner on your local, can you go to "http://localhost:23061/ui/playground" on your browser and send a query on the left section as below:

query {
  peerChainState{ 
    state
  }
}

Please send me a screenshot of the result.

Magby123 commented 3 years ago

@Magby123, thanks for the info.

At first glance, it appears that your miner isn't connected to other peers on the network. I took a look at the options for NineChronicles.Headless in 9c-swarm-miner(https://github.com/CryptoKasm/9c-swarm-miner/blob/97e9874bf67014200ca1b08308c5b40ed6d10b2b/bin/build-compose.sh#L55) and it appears that they're all correct.

While running the 9c-swarm-miner on your local, can you go to "http://localhost:23061/ui/playground" on your browser and send a query on the left section as below:

query {
  peerChainState{ 
    state
  }
}

Please send me a screenshot of the result.

121212

Magby123 commented 3 years ago

@Magby123, thanks for the info. At first glance, it appears that your miner isn't connected to other peers on the network. I took a look at the options for NineChronicles.Headless in 9c-swarm-miner(https://github.com/CryptoKasm/9c-swarm-miner/blob/97e9874bf67014200ca1b08308c5b40ed6d10b2b/bin/build-compose.sh#L55) and it appears that they're all correct. While running the 9c-swarm-miner on your local, can you go to "http://localhost:23061/ui/playground" on your browser and send a query on the left section as below:

query {
  peerChainState{ 
    state
  }
}

Please send me a screenshot of the result. 11313131

Magby123 commented 3 years ago

@Magby123, thanks for the info.

At first glance, it appears that your miner isn't connected to other peers on the network. I took a look at the options for NineChronicles.Headless in 9c-swarm-miner(https://github.com/CryptoKasm/9c-swarm-miner/blob/97e9874bf67014200ca1b08308c5b40ed6d10b2b/bin/build-compose.sh#L55) and it appears that they're all correct.

While running the 9c-swarm-miner on your local, can you go to "http://localhost:23061/ui/playground" on your browser and send a query on the left section as below:

query {
  peerChainState{ 
    state
  }
}

Please send me a screenshot of the result. ... And its stuck in 4 minutes ( no new logs for about 10+ minutes) 141414141

area363 commented 3 years ago

@Magby123
From your screenshot, I don't think there's much issue with the network. Instead of the log modified by 9c-swarm-miner, can you send me the full log when running the miner so that I can look at the entire process(Run the miner and when you think there's something wrong, retrieve the log while the container is still running)? You can save your log with the following command:

docker logs [CONTAINER] > [PATH TO SAVE]
ex) docker logs 9c-swarm-miner_swarm-miner1_1 > ~/Desktop/miner.log

In general, "Mined a block" only means a block is mined on your local and it doesn't guarantee that the block will be taken into the main chain in the network. Regardless, I'll need to take a look at the full log to assess the situation. Thanks!

Magby123 commented 3 years ago

@Magby123 From your screenshot, I don't think there's much issue with the network. Instead of the log modified by 9c-swarm-miner, can you send me the full log when running the miner so that I can look at the entire process(Run the miner and when you think there's something wrong, retrieve the log while the container is still running)? You can save your log with the following command:

docker logs [CONTAINER] > [PATH TO SAVE]
ex) docker logs 9c-swarm-miner_swarm-miner1_1 > ~/Desktop/miner.log

In general, "Mined a block" only means a block is mined on your local and it doesn't guarantee that the block will be taken into the main chain in the network. Regardless, I'll need to take a look at the full log to assess the situation. Thanks!

Command doesent work . if i use "docker logs 9c-swarm-miner_swarm-miner1_1" it will spamm with logs.... https://clip2net.com/s/4aO4DiY

area363 commented 3 years ago

@Magby123 The path in the example(~/Desktop/miner.log) might not work for Ubuntu. Maybe you can try ./miner.log at the same pwd in the photo you sent and the log will probably be saved in the ~/9c-swarm-miner/directory.

Btw, "docker logs 9c-swarm-miner_swarm-miner1_1" basically shows you our full log when running the miner! 😄

Magby123 commented 3 years ago

@Magby123 The path in the example(~/Desktop/miner.log) might not work for Ubuntu. Maybe you can try ./miner.log at the same pwd in the photo you sent and the log will probably be saved in the ~/9c-swarm-miner/directory.

Btw, "docker logs 9c-swarm-miner_swarm-miner1_1" basically shows you our full log when running the miner! 😄

Sorry, im not unbuntu user, and docker have no simple ways to copy it logs to file Under windows 10... But it writes a lot during use ( this miner). So idk how to get them to transfer.

area363 commented 3 years ago

@Magby123 Can you follow these steps below?

  1. Run./9c-swarm-miner.sh (left-side of Screenshot1)
  2. Wait until your issue emerges
  3. On Windows PowerShell, run docker logs 9c-swarm-miner_swarm-miner1_1 > ~/Desktop/miner.log (right-side of Screenshot1)
  4. Locate the miner.log file on your Desktop (Screenshot2)

Then you can upload that file on this thread. Thanks!

Screenshot1 Inkedscreenshot1_LI

Screenshot2 Inkedscreenshot2_LI

KazOps commented 3 years ago

I've been having the same issue. I only run 1 Miner on an PC running Ubuntu Natively. Attached is the Log for my work day. Zipped it's 20megs. It's 100megs unzipped. Should give you guys a good idea of what might be going on. miner_log.zip

area363 commented 3 years ago

Hi @KazOps, thanks for sending me the log.

From reviewing your log, it appears that the headless miner is working as expected. But I do think there are couple points that might cause some confusion:

1) Currently, 9c-swarm-miner looks for a "Mined a block" message in the headless log as the key indicator that you have successfully mined a block and that the block has been accepted in the "main" chain. Although this could be true, keep in mine that "Mined a block" only guarantees that a block has been mined in your local miner and doesn't necessarily ensure that the block is accepted in the "main" chain (e.g. reorg / someone else's block has been taken in the network).

2) Within the log, you can sometime see an append error that goes like: [16:45:33 ERR] Append failed. The block is invalid. This is will happen for blocks in multiples of 50 (e.g. #50, #100, #150 and so on) because the network protocol only allows authorized miners to mine those blocks to minimize chain reorg. So this isn't really an error in your miner-- just a rule in the network.

Currently, the only way you can "fully" confirm that your block is in the "main" chain is by referring to libplanet-explorer. If you want to check your specific account, you can do so by going to http://explorer.libplanet.io/9c-main/account/?[YOUR_PUBLIC_KEY].

Let me know if you have other questions and thanks again for your input!

MiningBurn commented 3 years ago

The problem should be solved. There was a typo in a number in the building of the docker compose file for the 9c-swarm-miner, limiting the workers. This would cause requests to backup, leading to cascading issues.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.