Back to list

Development Update #65

Unit tests work for networking. It works locally. It works with multiple clients on the internal virtual private network for testing. It is 100% working. However, on public internet cannot connect to anything and there are strange errors. The peers/connection list is empty.

[skycoin.daemon:DEBUG] Removing because failed to connect: dial tcp i/o timeout [skycoin.daemon:DEBUG] Removing because failed to connect: dial tcp no route to host [skycoin.daemon:INFO] Removing for not sending a version [gnet:DEBUG] Failed to read from read tcp use of closed network connection [skycoin.daemon:INFO] disconnected because: Version timeout [skycoin.daemon:DEBUG] Sending introduction message to [gnet:DEBUG] Failed to read from EOF [skycoin.daemon:INFO] disconnected because: Read failed

To see list of connections do:

We are getting:
  • “no route to host”
  • “i/o timeout”
  • connection opens and version (first packet) is never sent
  • EOF when trying to read from socket
TCP/ip has bizarre error conditions. It is also forced in golang. We have
  • a listening go routine for each pool of sockets
  • a go routine for accepting new connections
  • two go routines per socket. a goroutine for reading from socket and a goroutine for sending over socket, with queues for messages
  • a goroutine for checking the messages and processing them, that came from the goroutines

We have a full refactor and rewrite of daemon and networking, but cant use it because of other major refactoring, which is a bit exhausting. There is no way to do the refactor incrementally without introducing circular imports, which prevents compilation. I think I want to deprecate TCP/ip completely because it is too frustrating.

Also, we have other issues
  • running skycoin is disconnecting some people’s VPN
  • skycoin appears to disconnecting some people’s wifi connections

Skycoin is using the Bitorrent kadmelia DHT, so it might be mistaken for a bitorrent client and could be seeing some type of purposeful disruption. I have no idea why the client appears to work on local host and on the internal VPN for testing, but does not work on the public internet.

Skycoin is using DHT with UDP on port 5798 for Bitorrent DHT and listening with TCP on port 5798 for incoming connections. It is possible that this condition causes crashes or confusing behavior on some operating systems, virtual private network implementations and may crash some poorly implemented routers.

This may be some weird NAT traversal and VPN problem.

I will try to fix the port number, to something else and hardcode it, then see if it works.

No translation bounty

Read about the Skycoin Bounty Program