Author

Topic: Bitcoin-Qt in server mode: latency and port forwarding (Read 3332 times)

legendary
Activity: 3582
Merit: 1094
Think for yourself
I've been running P2Pool for a month now when suddenly my getwork latency went up from 0.1 to 1 second over the past day. After restarting p2pool, the miner, and router didn't work, I restarted bitcoin-qt and it went back to normal.

My miners are connecting to bitcoin-qt which runs in server mode. Although I had forwarded a port for p2pool, I forwarded nothing for bitcoin-qt since forum threads left me confident that it's pointless. At the same time however, I failed to understand what exactly the port forwarding does. Does bitcoin-qt find 9 peers and stick to them? Does it try to switch to faster peers when their latency goes up? Would port forwarding help with latency? Since I plan to keep my computer running and mining unattended, it would help if I could avoid a repeat of this and QT's latency would stay where it should. What do I do?

You *have* to be port forwarding port 8333 to your computer that is housing your Bitcoin-QT if you have more than 8 connections.  If you didn't set that up then you are allowing UPnP to forward your ports for you.  Router and Firewall UPnP is and EXTREMELY bad idea as it is a HUGE security risk.  Any UPnP aware program can open ANY port to the internet without your knowledge and never reports what port it is.  So if malware got into your system it could easily render your firewall and router completely useless and open your computer to the internet.

So I would disable UPnP on everything and port forward Port 8333 to your Bitcoin-QT machine which will then allow  more than 8 connections to the Bitcoin network which should in turn decrease your latency.  My Bitcoin-QT was over 60 connections.
Sam

Edit: Also there are some consumer routers that allow UPnP from the WAN (internet facing) port which can open your network to the internet.  I would recommend testing your network/system for this vulnerability by use the Shields Up scanner at grc.com as there is a test specifically for "Universal Plug n'Play (UPnP) Internet Exposure Test"

Here's a link for the Sheids UP test
https://www.grc.com/x/ne.dll?bh0bkyd2
full member
Activity: 147
Merit: 100
Do you like fire? I'm full of it.
I've been running P2Pool for a month now when suddenly my getwork latency went up from 0.1 to 1 second over the past day. After restarting p2pool, the miner, and router didn't work, I restarted bitcoin-qt and it went back to normal.

My miners are connecting to bitcoin-qt which runs in server mode. Although I had forwarded a port for p2pool, I forwarded nothing for bitcoin-qt since forum threads left me confident that it's pointless. At the same time however, I failed to understand what exactly the port forwarding does. Does bitcoin-qt find 9 peers and stick to them? Does it try to switch to faster peers when their latency goes up? Would port forwarding help with latency? Since I plan to keep my computer running and mining unattended, it would help if I could avoid a repeat of this and QT's latency would stay where it should. What do I do?
Jump to: