Chia-Network / chia-blockchain

Chia blockchain python implementation (full node, farmer, harvester, timelord, and wallet)
Apache License 2.0
10.82k stars 2.03k forks source link

[Bug] 1.3 Seems to use target_outbound_peer_count for total target_peer_count. #10632

Closed scrutinously closed 2 years ago

scrutinously commented 2 years ago

What happened?

Running a node on 1.3, my peer count is consistently low. My main farmer on 1.2.11 is always connected to max peers allowed by target_peer_count, but the 1.3 node will never go higher than the limit set by target_outbound_peer_count.

  target_outbound_peer_count: 6
  target_peer_count: 20

I confirmed this by changing the target_outbound_peer_count to multiple targets, and it always matched that target and would not exceed it.

Version

1.3 installed from source branch: latest

What platform are you using?

Linux

What ui mode are you using?

CLI

Relevant log output

No response

mariano54 commented 2 years ago

I think that might be related to upnp not working properly. Can you check that your port 8444 is accessible from outside? https://portchecker.co/ https://github.com/Chia-Network/chia-blockchain/wiki/Resolving-Sync-Issues---Port-8444

scrutinously commented 2 years ago

Yeah, the port is open upnp is disabled, 8444 forwarded to my main farmer, somehow I still have outbound syncing from my 1.3 node despite 8444 forwarded to a different computer. Still, why is the node not attempting to get more connections when it should be looking for 14 inbound peers (20 peer count - 6 outbound count?).

The node is staying in sync, I'm just concerned that the limit appears to be incorrect, and I don't want to set outbound very high because upload bandwidth is so low.

mariano54 commented 2 years ago

it will limit outbound to 6. It cannot obtain inbound, most likely because your computer is not accessible for some reason.

scrutinously commented 2 years ago

Shouldn't it be harder for outbound peer connections without UPNP and no port forwarding? As to the "not accessible" the fact that this is in a WSL2 instance may be a contributing factor.

mariano54 commented 2 years ago

Yeah that might be related..

emlowe commented 2 years ago

Whether you get incoming peers or not can't be controlled by the software - I don't think there is a bug here. Do you have any log output that suggests your node is rejecting incoming peers? Moving to a support discussion