Git Product home page Git Product logo

diodechain / diode_client Goto Github PK

View Code? Open in Web Editor NEW
65.0 7.0 23.0 10 MB

Diode client written in GO that runs the Blockquick™ algorithm and a socks server to transmit data through diode ztna network.

Home Page: https://diode.io/download

License: Other

Go 53.42% Assembly 1.26% C 41.72% Makefile 0.38% Shell 0.39% M4 1.10% JavaScript 0.01% HTML 0.13% Sage 1.58%
hacktoberfest go blockchain ethereum diodechain

diode_client's People

Contributors

dependabot[bot] avatar dominicletz avatar feenposhleen avatar lutfuahmet avatar sc0vu avatar tuhalf avatar yahsinhuangtw avatar zachongit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

diode_client's Issues

Add remote configuration files

Today diode clients can only be configured one-by-one with local access. So either using ssh based tooling through diode tunnels or direct local access.

To improve managing fleets we would like to add remote configuration files to diode. The remote file would be specified with a name that can then is looked up in the package smart contract.

diode -configpath=package://myfleet/config.yaml

Panic: http panic slice bounds out of range [12:4]

Got this error when I try to connect to betahaus-berlin.diode.link. Also got this error when I test in local client. After debug with dlv, I found this error happened sometimes. And it got panic when call parseAccountRoots(rawAccountRoots.RawData[0]).

2020/02/27 03:31:44 http: panic serving ......: runtime error: slice bounds out of range [12:4]
goroutine 867 [running]:
net/http.(*conn).serve.func1(0xc0000917c0)
	/usr/local/go/src/net/http/server.go:1767 +0x139
panic(0x91da20, 0xc000382a60)
	/usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/diodechain/diode_go_client/rpc.(*RPCClient).ResolveDNS(0xc000092730, 0xc000382200, 0xf, 0x0, 0x0, 0x0, 0x13, 0xc000050830)
	/diode_go_client/rpc/client.go:617 +0x2d5
github.com/diodechain/diode_go_client/rpc.(*Server).checkAccess(0xc0003e75e0, 0xc000382200, 0xf, 0x0, 0x0)
	/diode_go_client/rpc/socks.go:486 +0xa64
github.com/diodechain/diode_go_client/rpc.(*Server).doConnectDevice(0xc0003e75e0, 0xc000382200, 0xf, 0x50, 0x9567f3, 0x2, 0x1, 0x50, 0x0)
	/diode_go_client/rpc/socks.go:324 +0x5a
github.com/diodechain/diode_go_client/rpc.(*Server).connectDevice(...)
	/diode_go_client/rpc/socks.go:318
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy(0xc000406850, 0xa03900, 0xc0000ded20, 0xc000021300)
	/diode_go_client/rpc/proxy.go:97 +0x245
net/http.HandlerFunc.ServeHTTP(0xc00041a3e0, 0xa03900, 0xc0000ded20, 0xc000021300)
	/usr/local/go/src/net/http/server.go:2007 +0x44
net/http.serverHandler.ServeHTTP(0xc0000de380, 0xa03900, 0xc0000ded20, 0xc000021300)
	/usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc0000917c0, 0xa04900, 0xc0003455c0)
	/usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve

[v0.8.8] Timeout after multiple concurrent connection

Happens when opening multiple browser windows (mobile + desktop) while browsing a public ddrive share. Seems to be reproducible after hitting refresh a couple of times.

https://drive-y3gwy6e0cxsghh3juato.diode.link/db9hw70xr2qqozyj

01/11/2021 10:42:45 ESC[34mINFOESC[0m Got proxy request from: 172.105.17.101:40177
01/11/2021 10:42:45 ESC[34mINFOESC[0m Got proxy request from: 172.105.17.101:55689
01/11/2021 10:42:45 ESC[33mWARNESC[0m Call portopen timeout after 50.000065621s, drop the call server=eu1.prenet.diode.io:41046 
01/11/2021 10:42:46 ESC[33mWARNESC[0m Call portopen timeout after 51.000101027s, drop the call server=eu1.prenet.diode.io:41046 
01/11/2021 10:42:46 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1256750 1263583 server=us2.prenet.diode.io:41046 
01/11/2021 10:42:46 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1256750 1263583 server=us2.prenet.diode.io:41046 
01/11/2021 10:42:47 ESC[33mWARNESC[0m Call portopen timeout after 51.000104242s, drop the call server=eu1.prenet.diode.io:41046 
01/11/2021 10:42:47 ESC[31mERRORESC[0m doConnectDevice() failed: remote timeout: 51s
01/11/2021 10:42:47 ESC[34mINFOESC[0m Got proxy request from: 95.90.244.2:51470
01/11/2021 10:42:48 ESC[33mWARNESC[0m Call portopen timeout after 51.000100109s, drop the call server=eu1.prenet.diode.io:41046 
01/11/2021 10:42:48 ESC[31mERRORESC[0m doConnectDevice() failed: remote timeout: 51s
01/11/2021 10:42:52 ESC[34mINFOESC[0m Got proxy request from: 116.202.227.138:45969
01/11/2021 10:42:52 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1175919 1263583 server=us2.prenet.diode.io:41046 
01/11/2021 10:42:52 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1175919 1263583 server=us2.prenet.diode.io:41046 
01/11/2021 10:42:52 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1175919 1263583 server=us2.prenet.diode.io:41046 
01/11/2021 10:42:52 ESC[34mINFOESC[0m Validating ticket based on non-checked block 1175919 1263583 server=us2.prenet.diode.io:41046

Protected admin UI and provisioning sequence

Remote configuration, such as managing bound ports on a Raspberry PI currently can only be done through ssh logging to the destination PI. It would be great to have a minimal configuration website available through diode itself to make those changes.

Because this is remote configuration though it needs to be well protected. Optimally it uses MetaMask to check the users identity. See here (https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial) for a tutorial

EXAMPLE:

diode publish -adminconsole

Panic: http panic serving invalid memory address or nil pointer dereference

Fatal error: http panic serving invalid memory address or nil pointer dereference

2020/02/27 01:59:21 http: superfluous response.WriteHeader call from github.com/diodechain/diode_go_client/rpc.httpError (proxy.go:66)
2020/02/27 01:59:21 http: panic serving ...... : runtime error: invalid memory address or nil pointer dereference
goroutine 1612195 [running]:
net/http.(*conn).serve.func1(0xc000091360)
        /usr/local/go/src/net/http/server.go:1767 +0x139
panic(0x8ce5c0, 0xefdb00)
        /usr/local/go/src/runtime/panic.go:679 +0x1b2
github.com/gorilla/websocket.(*Conn).Close(...)
        /go/pkg/mod/github.com/gorilla/[email protected]/conn.go:344
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy(0xc0003cec40, 0xa03900, 0xc0000d6620, 0xc0000dea00)
        /diode_go_client/rpc/proxy.go:119 +0x3eb
net/http.HandlerFunc.ServeHTTP(0xc0002eb1a0, 0xa03900, 0xc0000d6620, 0xc0000dea00)
        /usr/local/go/src/net/http/server.go:2007 +0x44
net/http.serverHandler.ServeHTTP(0xc0000d6380, 0xa03900, 0xc0000d6620, 0xc0000dea00)
        /usr/local/go/src/net/http/server.go:2802 +0xa4
net/http.(*conn).serve(0xc000091360, 0xa04900, 0xc0000e56c0)
        /usr/local/go/src/net/http/server.go:1890 +0x875
created by net/http.(*Server).Serve
        /usr/local/go/src/net/http/server.go:2927 +0x38e

Add token command

Example:

> diode token
[INFO] Diode Client version : v0.4.x
[INFO] Client address       : 0xxxxxxxxxxxxxxxxxxxxx 
[INFO] Fleet address        : 0xxxxxxxxxxxxxxxxxxxxx 

[INFO] Token                : DIO 
[INFO] Balance              : 10 DIO 


> diode token -send 10dio -to my_mom.diode
[INFO] Diode Client version : v0.4.x
[INFO] Client address       : 0xxxxxxxxxxxxxxxxxxxxx 
[INFO] Fleet address        : 0xxxxxxxxxxxxxxxxxxxxx 

[INFO] Sending              : 10 DIO to 0x34234289402
[INFO] Transaction Hash     : 0x45353485032 

The task is to create a new command to check token balance and to send tokens through the diode network. You must specify:

  • The amount
  • The destination
  • The unit
Unit Wei Value Wei
wei 1 wei 1
kwei 1e3 wei 1,000
mwei 1e6 wei 1,000,000
gwei 1e9 wei 1,000,000,000
microether (microdiode) 1e12 wei 1,000,000,000,000
milliether (millidiode) 1e15 wei 1,000,000,000,000,000
ether (diode) 1e18 wei 1,000,000,000,000,000,000

Optional features might be:

  • Providing a gas fee
  • Specify a ERC20 contract token instead
  • etc...

Introduce password protected http publishing command

The idea is to make using diode simpler in mixed web2/web3 environments and be able to publish a site with password protection.

Example:

diode http -password "secret" 8080

Would do the same as:

diode publish -public 8080:80

but add password protection to the site

Since password protection can only work for websites the command "http" is introduced that ensure it's about tunneling a website.

Another method would be to use metamask authentication such as in:

diode http -metamask 0x1234567890 8080

Which would require metamask login (https://www.toptal.com/ethereum/one-click-login-flows-a-metamask-tutorial) from the id 0x1234567890 to get access.

getblockpeak/getblockheader timeout

It seems clients will block when call getblockpeak/getblockheader.

I think the reason might be syncing process of block header for blockquick algorithm (there is syncing worker in all of clients).

[WARN] Call getblockpeak timeout after 10.000180335s, drop the call server=172.104.119.67:41046
[EROR] Cannot getblockheader: remote timeout: 10s server=172.104.119.67:41046

Allow publish to start apps

Example publishing telnet only allowing access from 0x1234567890

diode publish -private telnetd:80:0x1234567890

The reduce the amount of configuration needs to enter web3 with diode it would be useful to allow running apps directly without the need for application server running.

Network of is not valid (err: sent reference block does not match

Version: v0.4.12

Sep 30 10:31:06 betahaus-berlin diode[23121]: [EROR] Network of as1.prenet.diode.io:41046 is not valid (err: sent reference block does not match 834170: [0 0 106 39 196 11 49 240 71 241 228 61 86 24 220 129 4 39 32 181 158 159 6 208 137 221 219 107 5 108 164 156] != [0 0 99 188 184 237 174 220 21 58 212 105 34 241 218 17 86 241 141 186 126 250 91 34 65 176 240 203 234 19 251 198]), trying next...

Connection Retry Freezes Client

Based on todays update the gateway client froze again with this in the logs:

02/21/2020 15:42:29 [INFO] Added block(s) 109607-109610, last valid 109609 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:43:29 [INFO] Added block(s) 109610-109616, last valid 109616 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:44:29 [INFO] Added block(s) 109616-109618, last valid 109618 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:45:29 [INFO] Added block(s) 109618-109619, last valid 109619 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:46:29 [INFO] Added block(s) 109619-109625, last valid 109625 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:47:29 [INFO] Added block(s) 109625-109627, last valid 109627 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:48:29 [INFO] Added block(s) 109627-109630, last valid 109630 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:49:29 [INFO] Added block(s) 109630-109631, last valid 109631 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:50:29 [INFO] Added block(s) 109631-109633, last valid 109632 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:51:29 [INFO] Added block(s) 109633-109635, last valid 109635 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:52:29 [INFO] Added block(s) 109635-109639, last valid 109639 module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [INFO] Retry to connect to us1.testnet.diode.io:41045, wait 1s (1/3) module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [EROR] failed to reconnect: dial tcp 45.79.115.246:41045: connect: connection refused module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [INFO] Retry to connect to us1.testnet.diode.io:41045, wait 1s (2/3) module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [EROR] failed to reconnect: dial tcp 45.79.115.246:41045: connect: connection refused module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [INFO] Retry to connect to us1.testnet.diode.io:41045, wait 1s (3/3) module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:14 [EROR] failed to reconnect: dial tcp 45.79.115.246:41045: connect: connection refused module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [INFO] resolving DN: pi-taipei                  module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [EROR] Failed to write to node: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [EROR] Failed to call: getaccountvalue [0s]: error from server: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [INFO] resolving DN: betahaus-berlin            module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [EROR] Failed to write to node: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:19 [EROR] Failed to call: getaccountvalue [0s]: error from server: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [INFO] resolving DN: pi-taipei                  module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [EROR] Failed to write to node: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [EROR] Failed to call: getaccountvalue [0s]: error from server: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [INFO] resolving DN: betahaus-berlin            module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [EROR] Failed to write to node: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:24 [EROR] Failed to call: getaccountvalue [0s]: error from server: connection closed module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:29 [INFO] resolving DN: pi-taipei                  module=ssl server=us1.testnet.diode.io:41045
02/21/2020 15:53:29 [EROR] Failed to write to node: connection closed module=ssl server=us1.testnet.diode.io:41045
~~~repeat~~~

diode client stops sending/receiving data

Client Version:
v0.4.5

Affected domain:
https://mediaserver.diode.link/index.html

Reported in telegram chat:
Screenshot_2020-07-28-13-03-04-326_org telegram messenger

Log:
[EROR] Failed to submit ticket: send call to channel timeout server=europe.testnet.diode.io:41046
9 [EROR] Failed to submit ticket: send call to channel timeout server=europe.testnet.diode.io:41046
5 [EROR] Failed to submit ticket: send call to channel timeout server=europe.testnet.diode.io:41046
4 [WARN] Cannot find the portclose connected device 01913849 server=europe.testnet.diode.io:41046
0 [WARN] Cannot find the portclose connected device 7b74ac75 server=europe.testnet.diode.io:41046
5 [EROR] Failed to submit ticket: send call to channel timeout server=europe.testnet.diode.io:41046
1 [WARN] Cannot find the portsend connected device 7e945538 server=europe.testnet.diode.io:41046
1 [WARN] Cannot find the portsend connected device 71f76ade server=europe.testnet.diode.io:41046
1 [WARN] Cannot find the portclose connected device 71f76ade server=europe.testnet.diode.io:41046
1 [WARN] Cannot find the portclose connected device 7e945538 server=europe.testnet.diode.io:41046

Broken file

Demo website doesn't work sometimes because of broken javascript file.

The log shows that the device had been closed and the data was dropped:

02/27/2020 07:03:28 [EROR] cannot find the portsend connected device 1812465649 module=ssl server=172.105.85.69:41045
02/27/2020 07:03:28 [EROR] cannot find the portsend connected device 1812465649 module=ssl server=172.105.85.69:41045
02/27/2020 07:03:43 [EROR] cannot find the portsend connected device 1333989682 module=ssl server=172.105.85.69:41045

Gateway went down with these errors

[INFO] Retry to connect to europe.testnet.diode.io:41046 (1/3) server=europe.testnet.diode.io:41046
[EROR] Failed to reconnect: dial tcp 172.105.85.69:41046: connect: connection refused, reconnecting in 5s server=europe.testnet.diode.io:41046
[EROR] Failed to write to node: connection closed server=europe.testnet.diode.io:41046
[INFO] Retry to connect to europe.testnet.diode.io:41046 (2/3) server=europe.testnet.diode.io:41046
[EROR] Failed to reconnect: dial tcp 172.105.85.69:41046: connect: connection refused, reconnecting in 5.782596273s server=europe.testnet.diode.io:41046
[EROR] Failed to write to node: connection closed server=europe.testnet.diode.io:41046
[INFO] Retry to connect to europe.testnet.diode.io:41046 (3/3) server=europe.testnet.diode.io:41046
[EROR] Failed to reconnect: dial tcp 172.105.85.69:41046: connect: connection refused, reconnecting in 6.454542783s server=europe.testnet.diode.io:41046
[EROR] Failed to write to node: connection closed server=europe.testnet.diode.io:41046
[EROR] Failed to write to node: connection closed server=europe.testnet.diode.io:41046
[INFO] Resolving DN: chronicle                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: chronicle                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: cc-lemon                   server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: cc-lemon                   server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: blockmusic                 server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: pi-taipei                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: pi-taipei                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: cc-lemon                   server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: cc-lemon                   server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: betahaus-berlin            server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: betahaus-berlin            server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: mediaserver                server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: chronicle                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: cc-lemon                   server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: blockmusic                 server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: pi-taipei                  server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Retry to connect to 45.79.115.246:41046 (1/3) server=45.79.115.246:41046
[EROR] Failed to reconnect: read tcp 45.79.224.174:47486->45.79.115.246:41046: read: connection reset by peer, reconnecting in 5s server=45.79.115.246:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Retry to connect to 45.79.115.246:41046 (2/3) server=45.79.115.246:41046
[EROR] Failed to reconnect: dial tcp 45.79.115.246:41046: connect: connection refused, reconnecting in 7.576063142s server=45.79.115.246:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Resolving DN: berlin-zehlendorf          server=europe.testnet.diode.io:41046
[INFO] Retry to connect to 45.79.115.246:41046 (3/3) server=45.79.115.246:41046
[EROR] Failed to reconnect: dial tcp 45.79.115.246:41046: connect: connection refused, reconnecting in 10s server=45.79.115.246:41046

TODO list

  • Refactor merkle tree
  • Integrete the diode smart contract
  • Git hooks and test for deployment
  • Goodbye rpc
  • Renew Go Mod file
  • Cache validated device obj, server obj, account roots, account value or rpc request
  • fix device validate sig
  • Remove port close channel
  • Update README.md
  • docker
  • Fetch block headers periodically
  • Add setup environment in README
  • ticket too_old
  • Add timeout to portopen, portsend
  • Add travis or codecov ci
  • More unit test
  • Refactor rpc server and ssl client (context for each context?)
  • Transform into c code for IoT device
  • Encrypt/Decrypt the client data
  • Replace all the secp256k1 recovery function to validate (It takes long time to recover public key on IoT device)
  • Cannot exit if there is idle socks connection
  • Use buffered channel (portopen, portsend, portclose, goodbye)
  • Fix wrong ref (issue in goroutine and channel)

fatal error: runtime: out of memory

12/14/2020 03:46:58 INFO Got proxy request from: ......
12/14/2020 03:46:58 INFO Resolving BNS: berlin-zehlendorf server=us1.prenet.diode.io:41046 
fatal error: runtime: out of memory

runtime stack:
runtime.throw(0xe9eb15, 0x16)
	/path/to/go/1.15.6/src/runtime/panic.go:1116 +0x72
runtime.sysMap(0xc004000000, 0x8a4000000, 0x16d3798)
	/path/to/go/1.15.6/src/runtime/mem_linux.go:169 +0xc6
runtime.(*mheap).sysAlloc(0x16b3c00, 0x8a1400000, 0x46ce37, 0x16b3c08)
	/path/to/go/1.15.6/src/runtime/malloc.go:727 +0x1e5
runtime.(*mheap).grow(0x16b3c00, 0x450964, 0x0)
	/path/to/go/1.15.6/src/runtime/mheap.go:1344 +0x85
runtime.(*mheap).allocSpan(0x16b3c00, 0x450964, 0x7ffd8fe50100, 0x16d37a8, 0x279381007b7a51)
	/path/to/go/1.15.6/src/runtime/mheap.go:1160 +0x6b6
runtime.(*mheap).alloc.func1()
	/path/to/go/1.15.6/src/runtime/mheap.go:907 +0x65
runtime.(*mheap).alloc(0x16b3c00, 0x450964, 0x101, 0x169c6a0)
	/path/to/go/1.15.6/src/runtime/mheap.go:901 +0x85
runtime.largeAlloc(0x8a12c7870, 0x4b0101, 0x0)
	/path/to/go/1.15.6/src/runtime/malloc.go:1177 +0x92
runtime.mallocgc.func1()
	/path/to/go/1.15.6/src/runtime/malloc.go:1071 +0x46
runtime.systemstack(0x4ad2f4)
	/path/to/go/1.15.6/src/runtime/asm_amd64.s:370 +0x66
runtime.mstart()
	/path/to/go/1.15.6/src/runtime/proc.go:1116

goroutine 2907 [running]:
runtime.systemstack_switch()
	/path/to/go/1.15.6/src/runtime/asm_amd64.s:330 fp=0xc0001c1420 sp=0xc0001c1418 pc=0x4ad420
runtime.mallocgc(0x8a12c7870, 0xd9a4a0, 0x1, 0x1)
	/path/to/go/1.15.6/src/runtime/malloc.go:1070 +0x938 fp=0xc0001c14c0 sp=0xc0001c1420 pc=0x44ee58
runtime.makeslice(0xd9a4a0, 0x6e756c6c, 0x6e756c6c, 0x27686111aff14247)
	/path/to/go/1.15.6/src/runtime/slice.go:98 +0x6c fp=0xc0001c14f0 sp=0xc0001c14c0 pc=0x49004c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).ResolveBNS(0xc0001009a0, 0xc00065e9f3, 0x11, 0x0, 0x0, 0x0, 0x0, 0x4f)
	/path/to/diode/rpc/client.go:867 +0x1c5 fp=0xc0001c15f0 sp=0xc0001c14f0 pc=0xa031e5
github.com/diodechain/diode_go_client/rpc.(*Server).checkAccess(0xc000297110, 0xc00065e9f3, 0x11, 0x38, 0x8, 0x40, 0x4, 0x8)
	/path/to/diode/rpc/socks.go:335 +0xa70 fp=0xc0001c17c8 sp=0xc0001c15f0 pc=0xa0c570
github.com/diodechain/diode_go_client/rpc.(*Server).doConnectDevice(0xc000297110, 0xc00065e9f3, 0x11, 0xbd6, 0x20, 0xc00065e9f0, 0x2, 0x1, 0xd6c560, 0x4, ...)
	/path/to/diode/rpc/socks.go:411 +0x5d fp=0xc0001c18f0 sp=0xc0001c17c8 pc=0xa0c77d
github.com/diodechain/diode_go_client/rpc.(*Server).connectDeviceAndLoop(0xc000297110, 0xc00065e9f3, 0x11, 0xbd6, 0x20, 0xc00065e9f0, 0x2, 0x0, 0xc0001c1b50, 0x0, ...)
	/path/to/diode/rpc/socks.go:478 +0xbe fp=0xc0001c1ab8 sp=0xc0001c18f0 pc=0xa0d23e
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy(0xc0001340c0, 0xf855e0, 0xc0000bc540, 0xc0000a8c00)
	/path/to/diode/rpc/proxy.go:194 +0x2dc fp=0xc0001c1b98 sp=0xc0001c1ab8 pc=0xa0877c
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy-fm(0xf855e0, 0xc0000bc540, 0xc0000a8c00)
	/path/to/diode/rpc/proxy.go:168 +0x48 fp=0xc0001c1bc8 sp=0xc0001c1b98 pc=0xa1c8a8
net/http.HandlerFunc.ServeHTTP(0xc00034e830, 0xf855e0, 0xc0000bc540, 0xc0000a8c00)
	/path/to/go/1.15.6/src/net/http/server.go:2042 +0x44 fp=0xc0001c1bf0 sp=0xc0001c1bc8 pc=0x805a44
net/http.serverHandler.ServeHTTP(0xc0000bc1c0, 0xf855e0, 0xc0000bc540, 0xc0000a8c00)
	/path/to/go/1.15.6/src/net/http/server.go:2843 +0xa3 fp=0xc0001c1c20 sp=0xc0001c1bf0 pc=0x809043
net/http.(*conn).serve(0xc0002f4820, 0xf87260, 0xc00024f580)
	/path/to/go/1.15.6/src/net/http/server.go:1925 +0x8ad fp=0xc0001c1fc8 sp=0xc0001c1c20 pc=0x80484d
runtime.goexit()
	/path/to/go/1.15.6/src/runtime/asm_amd64.s:1374 +0x1 fp=0xc0001c1fd0 sp=0xc0001c1fc8 pc=0x4af201
created by net/http.(*Server).Serve
	/path/to/go/1.15.6/src/net/http/server.go:2969 +0x36c

goroutine 1 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*DataPool).WaitClients(...)
	/path/to/diode/rpc/datapool.go:146
main.(*Diode).Wait(0x169b900)
	/path/to/diode/cmd/diode/app.go:490 +0x5c
main.gatewayHandler(0x0, 0x0)
	/path/to/diode/cmd/diode/gateway.go:99 +0xbbd
github.com/diodechain/diode_go_client/command.(*Command).Execute(0x162e1c0, 0x0, 0x0)
	/path/to/diode/command/command.go:139 +0x2cf
main.RunDiode(...)
	/path/to/diode/cmd/diode/diode.go:27
main.main()
	/path/to/diode/cmd/diode/diode.go:33 +0x3e

goroutine 10 [chan receive]:
github.com/kierdavis/ansi.init.0.func1()
	/home/runner/go/pkg/mod/github.com/kierdavis/[email protected]/ansi.go:16 +0x73
created by github.com/kierdavis/ansi.init.0
	/home/runner/go/pkg/mod/github.com/kierdavis/[email protected]/ansi.go:10 +0x35

goroutine 11 [select]:
github.com/diodechain/go-cache.(*janitor).Run(0xc00034e070, 0xc00034ae00)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]+incompatible/cache.go:1079 +0xda
created by github.com/diodechain/go-cache.runJanitor
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]+incompatible/cache.go:1099 +0xa9

goroutine 2877 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).waitResponse(0xc0001009a0, 0x2ab, 0xe957ca, 0x9, 0x2, 0x0, 0xc0006ab020, 0xc0006ab080, 0xc00065e990, 0x26, ...)
	/path/to/diode/rpc/client.go:175 +0x119
github.com/diodechain/diode_go_client/rpc.(*RPCClient).CallContext(0xc0001009a0, 0xe957ca, 0x9, 0x0, 0xc00034e100, 0x1, 0x1, 0x14, 0x0, 0x0, ...)
	/path/to/diode/rpc/client.go:270 +0x2e8
github.com/diodechain/diode_go_client/rpc.(*RPCClient).GetObject(0xc0001009a0, 0x8bceba5c25e106c2, 0xb7a5d759a2da04a9, 0x502d0ef9, 0x14, 0x1, 0x1)
	/path/to/diode/rpc/client.go:494 +0xfa
github.com/diodechain/diode_go_client/rpc.(*Server).checkAccess(0xc000297110, 0xc0003219a3, 0xf, 0x1, 0x23960aa94, 0x169bb00, 0xc000100dd8, 0x100dc0)
	/path/to/diode/rpc/socks.go:382 +0x510
github.com/diodechain/diode_go_client/rpc.(*Server).doConnectDevice(0xc000297110, 0xc0003219a3, 0xf, 0xbd6, 0x20, 0xc0003219a0, 0x2, 0x0, 0x0, 0xf77ee0, ...)
	/path/to/diode/rpc/socks.go:411 +0x5d
github.com/diodechain/diode_go_client/rpc.(*Server).doConnectDevice(0xc000297110, 0xc0003219a3, 0xf, 0xbd6, 0x20, 0xc0003219a0, 0x2, 0x1, 0xd6c560, 0x4, ...)
	/path/to/diode/rpc/socks.go:462 +0x9ed
github.com/diodechain/diode_go_client/rpc.(*Server).connectDeviceAndLoop(0xc000297110, 0xc0003219a3, 0xf, 0xbd6, 0x20, 0xc0003219a0, 0x2, 0x0, 0xc0000e7b50, 0x0, ...)
	/path/to/diode/rpc/socks.go:478 +0xbe
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy(0xc0001340c0, 0xf855e0, 0xc0000bc000, 0xc0000a8200)
	/path/to/diode/rpc/proxy.go:194 +0x2dc
net/http.HandlerFunc.ServeHTTP(0xc00034e830, 0xf855e0, 0xc0000bc000, 0xc0000a8200)
	/path/to/go/1.15.6/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000bc1c0, 0xf855e0, 0xc0000bc000, 0xc0000a8200)
	/path/to/go/1.15.6/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0002f45a0, 0xf87260, 0xc00024e340)
	/path/to/go/1.15.6/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/path/to/go/1.15.6/src/net/http/server.go:2969 +0x36c

goroutine 35 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3430, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326c18, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326c00, 0xc000374000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326c00, 0xc000374000, 0x4000, 0x4000, 0xdf4ec0, 0xc0000b7cd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010968, 0xc000374000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f590, 0xf77420, 0xc000010968, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc000065a90, 0x0, 0xc000415e00)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc000065a90, 0xc0003efe18, 0x2, 0x2, 0xf, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f5b80, 0x227, 0xc000169680, 0x225, 0x225, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc0001009a0)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001009a0, 0xc00034e950)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 36 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc0001009a0)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001009a0, 0xc00034e960)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 37 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc0001009a0)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001009a0, 0xc00034e970)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 643 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3178, 0x72, 0x0)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000174718, 0x72, 0x0, 0x0, 0xe94710)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000174700, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:394 +0x1fc
net.(*netFD).accept(0xc000174700, 0xc000236fc0, 0x44f1f8, 0x169c6a0)
	/path/to/go/1.15.6/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc0004bb560, 0xc0001f6e10, 0x44f1f8, 0x30)
	/path/to/go/1.15.6/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0004bb560, 0xe2b460, 0xc000236fc0, 0xd93420, 0x1624970)
	/path/to/go/1.15.6/src/net/tcpsock.go:261 +0x65
net/http.(*Server).Serve(0xc0000bc0e0, 0xf85320, 0xc0004bb560, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/http/server.go:2937 +0x266
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).serveListener(0xc0001340c0, 0xc0000bc0e0, 0xf85320, 0xc0004bb560)
	/path/to/diode/rpc/proxy.go:299 +0x45
created by github.com/diodechain/diode_go_client/rpc.(*ProxyServer).Start
	/path/to/diode/rpc/proxy.go:334 +0xfb6

goroutine 646 [chan receive]:
main.(*Diode).Wait.func1(0x169b900)
	/path/to/diode/cmd/diode/app.go:484 +0xa9
created by main.(*Diode).Wait
	/path/to/diode/cmd/diode/app.go:480 +0x3f

goroutine 645 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3090, 0x72, 0x0)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000174a18, 0x72, 0x0, 0x0, 0xe94710)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000174a00, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:394 +0x1fc
net.(*netFD).accept(0xc000174a00, 0x37e11d600, 0xc0001f8e10, 0x44e890)
	/path/to/go/1.15.6/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc0002c4120, 0x0, 0x0, 0xc0001f8de8)
	/path/to/go/1.15.6/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0002c4120, 0xc0001f8e10, 0x512226, 0x5fd6e032, 0x4832ee)
	/path/to/go/1.15.6/src/net/tcpsock.go:261 +0x65
crypto/tls.(*listener).Accept(0xc0002c4140, 0xc0001f8e60, 0x18, 0xc00037dc80, 0x80950c)
	/path/to/go/1.15.6/src/crypto/tls/tls.go:67 +0x37
net/http.(*Server).Serve(0xc0000bc1c0, 0xf850e0, 0xc0002c4140, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/http/server.go:2937 +0x266
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).serveListener(0xc0001340c0, 0xc0000bc1c0, 0xf850e0, 0xc0002c4140)
	/path/to/diode/rpc/proxy.go:299 +0x45
created by github.com/diodechain/diode_go_client/rpc.(*ProxyServer).Start
	/path/to/diode/rpc/proxy.go:395 +0x665

goroutine 492 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d36e8, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326918, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326900, 0xc0003fa000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326900, 0xc0003fa000, 0x4000, 0x4000, 0xdf4ec0, 0xc0000b1cd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010998, 0xc0003fa000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f860, 0xf77420, 0xc000010998, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc00045fae0, 0x0, 0xc000356ae0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc00045fae0, 0xc000633a7a, 0x2, 0x2, 0x6, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f4320, 0x1b, 0xc000647900, 0x19, 0x19, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc000100160)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100160, 0xc00034eb60)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 523 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc0001002c0)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001002c0, 0xc00034ed80)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 493 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc000100160)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100160, 0xc00034eb70)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 468 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc000100000)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100000, 0xc00034e690)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 467 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d38b8, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326718, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326700, 0xc0003f6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326700, 0xc0003f6000, 0x4000, 0x4000, 0xdf4ec0, 0xc0000b3cd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010990, 0xc0003f6000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f7a0, 0xf77420, 0xc000010990, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc00045fa90, 0x0, 0xc0004d6ca0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc00045fa90, 0xc0004c524a, 0x2, 0x2, 0x6, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f40a0, 0x1b, 0xc0004e4620, 0x19, 0x19, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc000100000)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100000, 0xc00034e680)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 494 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc000100160)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100160, 0xc00034eb80)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 522 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc0001002c0)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001002c0, 0xc00034ed70)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 469 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc000100000)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100000, 0xc00034e6a0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 521 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3600, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326a18, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326a00, 0xc000400000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326a00, 0xc000400000, 0x4000, 0x4000, 0xdf4ec0, 0xc00036bcd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000109a0, 0xc000400000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f920, 0xf77420, 0xc0000109a0, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc00045fb30, 0x0, 0xc000414040)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc00045fb30, 0xc0003ef6e6, 0x2, 0x2, 0x8, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f4460, 0x3f, 0xc000196140, 0x3d, 0x3d, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc0001002c0)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc0001002c0, 0xc00034ed60)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 642 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3260, 0x72, 0x0)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000174698, 0x72, 0x800, 0x800, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).ReadFrom(0xc000174680, 0xc0000f6800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:215 +0x1c5
net.(*netFD).readFrom(0xc000174680, 0xc0000f6800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/fd_posix.go:61 +0x5b
net.(*UDPConn).readFrom(0xc000010110, 0xc0000f6800, 0x800, 0x800, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/udpsock_posix.go:47 +0x5c
net.(*UDPConn).ReadFrom(0xc000010110, 0xc0000f6800, 0x800, 0x800, 0x0, 0xc0004d1770, 0x8de565, 0xc00032f5c8, 0x10000000044b33f)
	/path/to/go/1.15.6/src/net/udpsock.go:118 +0x5d
github.com/diodechain/diode_go_client/rpc.(*Server).handleUDP(0xc000297110, 0xc0000f6800, 0x800, 0x800)
	/path/to/diode/rpc/socks.go:754 +0x73
github.com/diodechain/diode_go_client/rpc.(*Server).Start.func2(0xc000297110)
	/path/to/diode/rpc/socks.go:746 +0x6e
created by github.com/diodechain/diode_go_client/rpc.(*Server).Start
	/path/to/diode/rpc/socks.go:743 +0x1d4

goroutine 641 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3348, 0x72, 0x0)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000174618, 0x72, 0x0, 0x0, 0xe94710)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Accept(0xc000174600, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:394 +0x1fc
net.(*netFD).accept(0xc000174600, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/fd_unix.go:172 +0x45
net.(*TCPListener).accept(0xc0004bb540, 0x44b33f, 0xc000012000, 0xdb5c20)
	/path/to/go/1.15.6/src/net/tcpsock_posix.go:139 +0x32
net.(*TCPListener).Accept(0xc0004bb540, 0x0, 0xc0004d1f70, 0xc0004d1f88, 0xa12a85)
	/path/to/go/1.15.6/src/net/tcpsock.go:261 +0x65
github.com/diodechain/diode_go_client/rpc.(*Server).Start.func1(0xf85320, 0xc0004bb540, 0xc000297110)
	/path/to/diode/rpc/socks.go:713 +0x49
created by github.com/diodechain/diode_go_client/rpc.(*Server).Start
	/path/to/diode/rpc/socks.go:711 +0x153

goroutine 644 [select]:
github.com/caddyserver/certmagic.(*Cache).maintainAssets(0xc0001fe070, 0x0)
	/home/runner/go/pkg/mod/github.com/caddyserver/[email protected]/maintain.go:70 +0x1e5
created by github.com/caddyserver/certmagic.NewCache
	/home/runner/go/pkg/mod/github.com/caddyserver/[email protected]/cache.go:121 +0x172

goroutine 147 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d37d0, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326818, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326800, 0xc0003f0000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326800, 0xc0003f0000, 0x4000, 0x4000, 0xdf4ec0, 0xc00036fcd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010988, 0xc0003f0000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f6e0, 0xf77420, 0xc000010988, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc00045fa40, 0x0, 0xc00063c080)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc00045fa40, 0xc00063205a, 0x2, 0x2, 0x6, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f5c20, 0x1a, 0xc000646000, 0x18, 0x18, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc000100b00)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100b00, 0xc00034f8a0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 148 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc000100b00)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100b00, 0xc00034f8b0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 149 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc000100b00)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100b00, 0xc00034f8c0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 2878 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d2fa8, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0004be518, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0004be500, 0xc000014000, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc0004be500, 0xc000014000, 0x205, 0x205, 0x203000, 0x0, 0x44e890)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc000010400, 0xc000014000, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
crypto/tls.(*atLeastReader).Read(0xc00000ece0, 0xc000014000, 0x205, 0x205, 0x0, 0x7f5470053a00, 0xc000498a58)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:779 +0x62
bytes.(*Buffer).ReadFrom(0xc00007e600, 0xf769e0, 0xc00000ece0, 0x44c5a5, 0xdb5920, 0xe67580)
	/path/to/go/1.15.6/src/bytes/buffer.go:204 +0xb1
crypto/tls.(*Conn).readFromUntil(0xc00007e380, 0xf77420, 0xc000010400, 0x5, 0xc000010400, 0x203000)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:801 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc00007e380, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:608 +0x115
crypto/tls.(*Conn).readRecord(...)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:576
crypto/tls.(*Conn).Read(0xc00007e380, 0xc00075eee1, 0x1, 0x1, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:1252 +0x15f
net/http.(*connReader).backgroundRead(0xc00075eed0)
	/path/to/go/1.15.6/src/net/http/server.go:690 +0x58
created by net/http.(*connReader).startBackgroundRead
	/path/to/go/1.15.6/src/net/http/server.go:686 +0xd5

goroutine 648 [syscall]:
os/signal.signal_recv(0xc00027dad0)
	/path/to/go/1.15.6/src/runtime/sigqueue.go:147 +0x9d
os/signal.loop()
	/path/to/go/1.15.6/src/os/signal/signal_unix.go:23 +0x25
created by os/signal.Notify.func1.1
	/path/to/go/1.15.6/src/os/signal/signal.go:150 +0x45

goroutine 650 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d3518, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc000326b18, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc000326b00, 0xc000404000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc000326b00, 0xc000404000, 0x4000, 0x4000, 0xdf4ec0, 0xc000371cd0, 0x4448be)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000109a8, 0xc000404000, 0x4000, 0x4000, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
github.com/diodechain/openssl.(*readBio).ReadFromOnce(0xc00032f9e0, 0xf77420, 0xc0000109a8, 0x0, 0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/bio.go:246 +0x136
github.com/diodechain/openssl.(*Conn).fillInputBuffer(0xc00045fb80, 0x0, 0xc00000e300)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:203 +0x73
github.com/diodechain/openssl.(*Conn).getErrorHandler.func4(0x0, 0x0)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:246 +0x71
github.com/diodechain/openssl.(*Conn).handleError(...)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:283
github.com/diodechain/openssl.(*Conn).Read(0xc00045fb80, 0xc00034799a, 0x2, 0x2, 0x6, 0x2, 0x1)
	/home/runner/go/pkg/mod/github.com/diodechain/[email protected]/conn.go:469 +0x183
github.com/diodechain/diode_go_client/rpc.(*SSL).readMessage(0xc0002f4960, 0x1b, 0xc0003edd20, 0x19, 0x19, 0x1, 0x0)
	/path/to/diode/rpc/ssl.go:261 +0x8c
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc000100c60)
	/path/to/diode/rpc/bridge.go:283 +0x36
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100c60, 0xc00034fea0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 651 [chan receive]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).sendMessage(0xc000100c60)
	/path/to/diode/rpc/bridge.go:324 +0x95
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100c60, 0xc00034feb0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 652 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).watchLatestBlock(0xc000100c60)
	/path/to/diode/rpc/bridge.go:362 +0x14a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000100c60, 0xc00034fec0)
	/path/to/diode/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
	/path/to/diode/rpc/bridge.go:33 +0x69

goroutine 2914 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d2ec0, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0004bf798, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0004bf780, 0xc000126480, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc0004bf780, 0xc000126480, 0x205, 0x205, 0x203000, 0x0, 0xa)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000106b0, 0xc000126480, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
crypto/tls.(*atLeastReader).Read(0xc0004143c0, 0xc000126480, 0x205, 0x205, 0xc000690660, 0xc0001f5b08, 0xc0001f5a58)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:779 +0x62
bytes.(*Buffer).ReadFrom(0xc00007e980, 0xf769e0, 0xc0004143c0, 0x44c5a5, 0xdb5920, 0xe67580)
	/path/to/go/1.15.6/src/bytes/buffer.go:204 +0xb1
crypto/tls.(*Conn).readFromUntil(0xc00007e700, 0xf77420, 0xc0000106b0, 0x5, 0xc0000106b0, 0x44c205)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:801 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc00007e700, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:608 +0x115
crypto/tls.(*Conn).readRecord(...)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:576
crypto/tls.(*Conn).Read(0xc00007e700, 0xc00062a551, 0x1, 0x1, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:1252 +0x15f
net/http.(*connReader).backgroundRead(0xc00062a540)
	/path/to/go/1.15.6/src/net/http/server.go:690 +0x58
created by net/http.(*connReader).startBackgroundRead
	/path/to/go/1.15.6/src/net/http/server.go:686 +0xd5

goroutine 2913 [IO wait]:
internal/poll.runtime_pollWait(0x7f54704d2dd8, 0x72, 0xf78d60)
	/path/to/go/1.15.6/src/runtime/netpoll.go:222 +0x55
internal/poll.(*pollDesc).wait(0xc0004bf818, 0x72, 0xf78d00, 0x1645048, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
	/path/to/go/1.15.6/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0004bf800, 0xc000126240, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/internal/poll/fd_unix.go:159 +0x1a5
net.(*netFD).Read(0xc0004bf800, 0xc000126240, 0x205, 0x205, 0x203000, 0x0, 0x44e890)
	/path/to/go/1.15.6/src/net/fd_posix.go:55 +0x4f
net.(*conn).Read(0xc0000106b8, 0xc000126240, 0x205, 0x205, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/net/net.go:182 +0x8e
crypto/tls.(*atLeastReader).Read(0xc000414280, 0xc000126240, 0x205, 0x205, 0x0, 0x0, 0xc0001f3a58)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:779 +0x62
bytes.(*Buffer).ReadFrom(0xc00007ed00, 0xf769e0, 0xc000414280, 0x44c5a5, 0xdb5920, 0xe67580)
	/path/to/go/1.15.6/src/bytes/buffer.go:204 +0xb1
crypto/tls.(*Conn).readFromUntil(0xc00007ea80, 0xf77420, 0xc0000106b8, 0x5, 0xc0000106b8, 0x203000)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:801 +0xf3
crypto/tls.(*Conn).readRecordOrCCS(0xc00007ea80, 0x0, 0x0, 0x6d20000000)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:608 +0x115
crypto/tls.(*Conn).readRecord(...)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:576
crypto/tls.(*Conn).Read(0xc00007ea80, 0xc00062a491, 0x1, 0x1, 0x0, 0x0, 0x0)
	/path/to/go/1.15.6/src/crypto/tls/conn.go:1252 +0x15f
net/http.(*connReader).backgroundRead(0xc00062a480)
	/path/to/go/1.15.6/src/net/http/server.go:690 +0x58
created by net/http.(*connReader).startBackgroundRead
	/path/to/go/1.15.6/src/net/http/server.go:686 +0xd5

goroutine 2908 [select]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).waitResponse(0xc0001009a0, 0x2b0, 0xe98f94, 0xf, 0x2, 0x0, 0xc0006ab8c0, 0xc0006ab980, 0xc0006ab920, 0x53, ...)
	/path/to/diode/rpc/client.go:175 +0x119
github.com/diodechain/diode_go_client/rpc.(*RPCClient).CallContext(0xc0001009a0, 0xe98f94, 0xf, 0x0, 0xc00062adb0, 0x3, 0x3, 0x20, 0x5452d6528d220000, 0x262a81230aef1189, ...)
	/path/to/diode/rpc/client.go:270 +0x2e8
github.com/diodechain/diode_go_client/rpc.(*RPCClient).GetAccountValue(0xc0001009a0, 0x115dd0, 0x720b84cda5fa60af, 0x27686111aff14247, 0xc8239c24a6d61261, 0xc000396040, 0x20, 0x20, 0x20, 0x20, ...)
	/path/to/diode/rpc/client.go:763 +0x1fe
github.com/diodechain/diode_go_client/rpc.(*RPCClient).GetAccountValueRaw(0xc0001009a0, 0x115dd0, 0x720b84cda5fa60af, 0x27686111aff14247, 0xa6d61261, 0xc000396040, 0x20, 0x20, 0x898d00, 0x0, ...)
	/path/to/diode/rpc/client.go:789 +0xa8
github.com/diodechain/diode_go_client/rpc.(*RPCClient).ResolveBNS(0xc0001009a0, 0xc00049eca3, 0x9, 0x0, 0x0, 0x0, 0x0, 0x4f)
	/path/to/diode/rpc/client.go:850 +0x3e5
github.com/diodechain/diode_go_client/rpc.(*Server).checkAccess(0xc000297110, 0xc00049eca3, 0x9, 0x38, 0x8, 0x40, 0x4, 0x8)
	/path/to/diode/rpc/socks.go:335 +0xa70
github.com/diodechain/diode_go_client/rpc.(*Server).doConnectDevice(0xc000297110, 0xc00049eca3, 0x9, 0xbd6, 0x20, 0xc00049eca0, 0x2, 0x1, 0xd6c560, 0x4, ...)
	/path/to/diode/rpc/socks.go:411 +0x5d
github.com/diodechain/diode_go_client/rpc.(*Server).connectDeviceAndLoop(0xc000297110, 0xc00049eca3, 0x9, 0xbd6, 0x20, 0xc00049eca0, 0x2, 0x0, 0xc0000e3b50, 0x0, ...)
	/path/to/diode/rpc/socks.go:478 +0xbe
github.com/diodechain/diode_go_client/rpc.(*ProxyServer).pipeProxy(0xc0001340c0, 0xf855e0, 0xc0000bc460, 0xc0000a8b00)
	/path/to/diode/rpc/proxy.go:194 +0x2dc
net/http.HandlerFunc.ServeHTTP(0xc00034e830, 0xf855e0, 0xc0000bc460, 0xc0000a8b00)
	/path/to/go/1.15.6/src/net/http/server.go:2042 +0x44
net/http.serverHandler.ServeHTTP(0xc0000bc1c0, 0xf855e0, 0xc0000bc460, 0xc0000a8b00)
	/path/to/go/1.15.6/src/net/http/server.go:2843 +0xa3
net/http.(*conn).serve(0xc0002f4aa0, 0xf87260, 0xc00024f4c0)
	/path/to/go/1.15.6/src/net/http/server.go:1925 +0x8ad
created by net/http.(*Server).Serve
	/path/to/go/1.15.6/src/net/http/server.go:2969 +0x36c

Need to patch:

  • recover() to recover from panic
  • find out the reason/code use lots of memory

[v0.8.0] Client gets stuck on publish when current blockchain node restarts

Happens when restarting the node that the client is connected to

ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR SSL errors: SSL routines:SSL_shutdown:shutdown while in init server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR SSL errors: SSL routines:SSL_shutdown:shutdown while in init server=eu2.prenet.diode.io:41046
ERROR SSL errors: SSL routines:SSL_shutdown:shutdown while in init server=eu2.prenet.diode.io:41046
ERROR SSL errors: SSL routines:SSL_shutdown:shutdown while in init server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR SSL errors: SSL routines:SSL_shutdown:shutdown while in init server=eu2.prenet.diode.io:41046
ERROR unexpected EOF server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046
ERROR io: read/write on closed pipe server=eu2.prenet.diode.io:41046

It doesn't recover

Too many open files

On macos a long running diode client eventually shows too many open files errors. In my case ulimit descriptor count is set to 256, but active connections are very low (below 5)

ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
ERROR Failed to connect local: dial tcp [::1]:8080: socket: too many open files server=eu2.prenet.diode.io:41046
% ulimit -a
-t: cpu time (seconds)              unlimited
-f: file size (blocks)              unlimited
-d: data seg size (kbytes)          unlimited
-s: stack size (kbytes)             8192
-c: core file size (blocks)         0
-v: address space (kbytes)          unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes                       1392
-n: file descriptors                256

% uname -a
Darwin 1447.local 19.6.0 Darwin Kernel Version 19.6.0: Mon Aug 31 22:12:52 PDT 2020; root:xnu-6153.141.2~1/RELEASE_X86_64 x86_64

WaitGroup is reused before previous Wait has returned

[INFO] Diode Client version : v0.4.12-11-g8594f89 06 Oct 2020            
[INFO] Client address       : 0x13ac4c74416ed3f59bd9d7dfca79326819631093 
[INFO] Fleet address        : 0x6000000000000000000000000000000000000000 
[INFO] Connected to host: as2.prenet.diode.io:41046, validating... 
[INFO] Adding host: as1.prenet.diode.io:41046 [2/6] 
[INFO] Network is validated, last valid block: 867496 0x00002313a6ef675a6a205443a7a26beb0d5a281235ddfedf75c690cb0f0723d0 
[INFO] Start socks server 127.0.0.1:1080 
[INFO] Adding host: us2.prenet.diode.io:41046 [3/6] 
[INFO] Resolving BNS: pi-taipei                 server=as2.prenet.diode.io:41046
[EROR] Failed to connectDevice(0x780980bfc0aa56ceb1417e87912e54b759463090): This device is offline - not found 
^C[INFO] 1/5 Stopping socksserver 
[INFO] 2/5 Stopping proxyserver 
[INFO] 3/5 Stopping configserver 
[INFO] 4/5 Cleaning pool 
[INFO] Adding host: eu2.prenet.diode.io:41046 [4/6] 
panic: sync: WaitGroup is reused before previous Wait has returned

goroutine 1 [running]:
sync.(*WaitGroup).Wait(0xc000478160)
	/usr/local/Cellar/go/1.15.2/libexec/src/sync/waitgroup.go:132 +0xae
github.com/diodechain/diode_go_client/rpc.(*DataPool).WaitClients(...)
	/Users/peterlai/diode_go_client/rpc/datapool.go:145
main.(*Diode).Wait(0x4ba6680)
	/Users/peterlai/diode_go_client/cmd/diode/app.go:512 +0x55
main.socksdHandler(0x0, 0x0)
	/Users/peterlai/diode_go_client/cmd/diode/socksd.go:70 +0x7ab
github.com/diodechain/diode_go_client/command.(*Command).Execute(0x4b9f380, 0x0, 0x8)
	/Users/peterlai/diode_go_client/command/command.go:120 +0x2c7
main.RunDiode(...)
	/Users/peterlai/diode_go_client/cmd/diode/diode.go:29
main.main()
	/Users/peterlai/diode_go_client/cmd/diode/diode.go:34 +0x2d

panic: runtime error: invalid memory address or nil pointer dereference

Error log

[EROR] Failed to decode portopen request: DecodeString(): Cannot decode the wrong hex source 'pR[X' module=ssl server=asia.testnet.diode.io:41045

03/23/2020 09:06:25 [EROR] Failed to decode portopen request: DecodeString(): Cannot decode the wrong hex source '9;)N' module=ssl server=asia.testnet.diode.io:41045
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x3a4ed8]

goroutine 822 [running]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).ResponsePortOpen(0x26d8000, 0x0, 0x73b260, 0x248cfb0, 0x4, 0x2912618)
	/build/rpc/client.go:581 +0x30
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).handleInboundRequest
	/build/rpc/bridge.go:43 +0x764

Support bns names in bind, protected, private

Today bns names can be used in many places but not for example in publishing protected and private ports.

Affected commands:

diode -bind 8080:<some_address>:8080
diode publish -protected 8080,<some_address1>,<some_address2>
diode publish -private 8080,<some_address1>,<some_address2>
diode bns -transfer mydomain,<some_address1>

In all of these bns lookups should be performed. The code for the resolution is already present and can be reused in client.ResolveBNS(lookupName)

Add -version switch

I think a diode —version switch might be handy to check diode version, simple change but would be handy to quickly check the version thats running. /James

v0.4.9: Crash on connection failure

dominicletz@leno:~$ diode socksd
[INFO] Diode Client version : v0.4.9 15 Sep 2020
[INFO] Client address : 0x55c8ee625db628b493b1d084afe25e962a570cdf
[INFO] Fleet address : 0x979d4824fefd8910c6db45ac45e956678fb04ed0
[CRIT] Failed to connect to: dial tcp: lookup asia.testnet.diode.io: no such host%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (1/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (2/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (3/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8afa22]

goroutine 1 [running]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).Close(0x0)
/home/runner/work/diode_go_client/diode_go_client/rpc/client.go:900 +0x22
main.connect(0xc0000a3b60, 0xd24864, 0x1b, 0xc000362900, 0xc0000a39e0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:68 +0x92
main.(*Diode).Start(0x1545020, 0x0, 0xc00049fec0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/app.go:318 +0x1d3
main.socksdHandler(0x0, 0x0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/socksd.go:31 +0x42
github.com/diodechain/diode_go_client/command.(*Command).Execute(0x14fcfa0, 0x0, 0x8)
/home/runner/work/diode_go_client/diode_go_client/command/command.go:94 +0x2e3
main.RunDiode(...)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:29
main.main()
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:34 +0x2d

gateway domain https://mediaserver.diode.link can not be fetched with curl

Using curl causes this error message:

$ curl https://mediaserver.diode.link
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

Replace all the secp256k1 recovery function to validate signature with public key

The recovery function in secp256k1 curve cost too much resources.

In IoT constrained device, it might take longer time to run recovery function. Because there is no enough memory to keep pre-computed points on IoT device. After test secp256k1 recovery bitcoin implementation on linkit7697, it took 50 seconds to recovery one public key.

IMHO, it would be great to replace all the secp256k1 recovery function to validate signature with public key.

Waitgroup crash

[WARN] Call getblockpeak timeout after 10.000180335s, drop the call server=172.104.119.67:41046
[EROR] Cannot getblockheader: remote timeout: 10s server=172.104.119.67:41046
QTextCursor::setPosition: Position '8388607' out of range
QTextCursor::setPosition: Position '8388607' out of range
panic: sync: negative WaitGroup counter

goroutine 96 [running]:
sync.(*WaitGroup).Add(0xc000287a20, 0xffffffffffffffff)
/usr/lib/go-1.15/src/sync/waitgroup.go:74 +0x147
sync.(*WaitGroup).Done(...)
/usr/lib/go-1.15/src/sync/waitgroup.go:99
github.com/diodechain/diode_go_client/rpc.(*DataPool).SetClient(0xc0002879e0, 0x23f39edafdbae068, 0x1827610d08fc92f6, 0xc020d141c9, 0x0)
/home/dominicletz/projects/diode/poc-client/rpc/datapool.go:158 +0x199
main.(*Diode).waitForFirstClient.func1.1()
/home/dominicletz/projects/diode/poc-client/cmd/diode/app.go:362 +0x5d
github.com/diodechain/diode_go_client/rpc.(*RPCClient).Close.func1()
/home/dominicletz/projects/diode/poc-client/rpc/client.go:908 +0xf4
sync.(*Once).doSlow(0xc0001561bc, 0xc00023aee0)
/usr/lib/go-1.15/src/sync/once.go:66 +0xec
sync.(*Once).Do(...)
/usr/lib/go-1.15/src/sync/once.go:57
github.com/diodechain/diode_go_client/rpc.(*RPCClient).Close(0xc000156120)
/home/dominicletz/projects/diode/poc-client/rpc/client.go:900 +0x6a
github.com/diodechain/diode_go_client/rpc.(*RPCClient).recvMessage(0xc000156120)
/home/dominicletz/projects/diode/poc-client/rpc/bridge.go:306 +0x245
github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker.func1(0xc000156120, 0xc000592430)
/home/dominicletz/projects/diode/poc-client/rpc/bridge.go:35 +0x57
created by github.com/diodechain/diode_go_client/rpc.(*RPCClient).addWorker
/home/dominicletz/projects/diode/poc-client/rpc/bridge.go:33 +0x69

diode init - invalid private key

`
$ diode init
06/22/2020 00:03:03 [INFO] Checking for updates... module=main
06/22/2020 00:03:04 [INFO] No updates module=main
06/22/2020 00:03:04 [INFO] Diode Client version : v0.3.5 module=main
06/22/2020 00:03:04 [INFO] Last valid block : 410818 0x00002a6fcca84bf3c060c0bd153f707bc641156beac3ae46520e1c371fef8bb5 module=main
06/22/2020 00:03:04 [INFO] Client address : 0xa2d3b82a391ffad50fbf64578050a7b6f378cdb3 module=main
06/22/2020 00:03:04 [INFO] Fleet address : 0x6000000000000000000000000000000000000000 module=main
06/22/2020 00:03:04 [INFO] Connected to host: usa.testnet.diode.io:41046, validating... module=main
06/22/2020 00:03:05 [INFO] Network is validated, last valid block number: 410820 module=main
06/22/2020 00:03:05 [EROR] Cannot deploy fleet contract: module=main error="invalid private key"

`
ubuntu 18.04. Any suggestions?

Ghost web hosting server errors - old connections are closed

Upon logging into a ghost installation on a raspberry pi at .diode.link, or at . (per https://support.diode.io/article/6pctb40wj8), the following error is displayed upon successful login:
image

If I navigate away from /ghost/#/signin to just /ghost, the system allows me into the admin area, so I know the login was successful, just the browser got an error making it look like it failed.

These errors do not exist when using http://localhost to login. These errors exist on all three different ghost versions I tested when published via Diode. There are additional browser errors, perhaps from the same root cause, that are raised if I try to add a featured image to a post. If I retry enough times, it works.

The root cause may be ghost trying to re-use cached connections that the Diode web2:web3 gateway proxy has closed.

v0.4.9: Crash on connection failure

dominicletz@leno:~$ diode socksd
[INFO] Diode Client version : v0.4.9 15 Sep 2020
[INFO] Client address : 0x55c8ee625db628b493b1d084afe25e962a570cdf
[INFO] Fleet address : 0x979d4824fefd8910c6db45ac45e956678fb04ed0
[CRIT] Failed to connect to: dial tcp: lookup asia.testnet.diode.io: no such host%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (1/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (2/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
[INFO] Retry to connect to asia.testnet.diode.io:41046 (3/3), wait 1ns%!(EXTRA string=server, string=asia.testnet.diode.io:41046)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x8afa22]

goroutine 1 [running]:
github.com/diodechain/diode_go_client/rpc.(*RPCClient).Close(0x0)
/home/runner/work/diode_go_client/diode_go_client/rpc/client.go:900 +0x22
main.connect(0xc0000a3b60, 0xd24864, 0x1b, 0xc000362900, 0xc0000a39e0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:68 +0x92
main.(*Diode).Start(0x1545020, 0x0, 0xc00049fec0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/app.go:318 +0x1d3
main.socksdHandler(0x0, 0x0)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/socksd.go:31 +0x42
github.com/diodechain/diode_go_client/command.(*Command).Execute(0x14fcfa0, 0x0, 0x8)
/home/runner/work/diode_go_client/diode_go_client/command/command.go:94 +0x2e3
main.RunDiode(...)
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:29
main.main()
/home/runner/work/diode_go_client/diode_go_client/cmd/diode/diode.go:34 +0x2d

WARNING: DATA RACE when run ci_test

INFO Retry to connect to 139.162.56.162:41046 (3/3), waiting 2.334386763s
ERROR GetServer() failed: couldn't connect to server '&{Host:[49 51 57 46 49 54 50 46 53 54 46 49 54 50] EdgePort:41046 ServerPort:443 Sig:[1 56 236 161 110 37 136 149 17 61 135 32 241 215 61 97 114 224 68 24 95 220 43 19 194 171 0 107 130 83 47 64 191 32 56 185 125 138 23 167 220 227 199 40 84 210 224 112 54 156 20 94 121 223 41 155 155 93 207 219 228 56 141 8 85] ServerPubKey:[4 119 134 124 193 167 3 240 26 14 253 214 252 148 181 195 29 132 78 93 26 98 167 193 191 160 229 81 205 46 111 203 38 245 168 170 191 199 95 170 96 217 226 167 20 74 89 252 242 159 171 200 169 218 56 195 93 148 223 229 179 172 80 182 0]}' with error 'failed to connect to host: 139.162.56.162:41046'
ERROR Failed to connect to: 139.162.56.162:41046 (dial tcp 139.162.56.162:41046: connect: connection refused)
INFO Retry to connect to 139.162.56.162:41046 (1/3), waiting 1s
==================
WARNING: DATA RACE
Read at 0x00c000122100 by goroutine 38:
  github.com/diodechain/diode_go_client/rpc.(*Client).watchLatestBlock()
      /path/to/diode_go_client/rpc/bridge.go:301 +0x253
  github.com/diodechain/diode_go_client/rpc.(*Client).watchLatestBlock-fm()
      /path/to/diode_go_client/rpc/bridge.go:289 +0x44
  github.com/diodechain/diode_go_client/rpc.(*Client).addWorker.func1()
      /path/to/diode_go_client/rpc/bridge.go:27 +0x72

Previous write at 0x00c000122100 by goroutine 26:
  github.com/diodechain/diode_go_client/rpc.(*Client).ValidateNetwork()
      /path/to/diode_go_client/rpc/client.go:348 +0x8a4
  main.(*Diode).WaitForFirstClient.func1()
      /path/to/diode_go_client/cmd/diode/app.go:433 +0x315

Goroutine 38 (running) created at:
  github.com/diodechain/diode_go_client/rpc.(*Client).addWorker()
      /path/to/diode_go_client/rpc/bridge.go:25 +0x76
  github.com/diodechain/diode_go_client/rpc.(*Client).Start()
      /path/to/diode_go_aclient/rpc/bridge.go:376 +0x111
  github.com/diodechain/diode_go_client/rpc.DoConnect()
      /path/to/diode_go_client/rpc/ssl.go:400 +0xcbd
  main.connect()
      /path/to/diode_go_client/cmd/diode/diode.go:43 +0x85

Goroutine 26 (finished) created at:
  main.(*Diode).WaitForFirstClient()
      /path/to/diode_go_client/cmd/diode/app.go:414 +0x184
  main.(*Diode).Start()
      /path/to/diode_go_client/cmd/diode/app.go:381 +0x371
  main.socksdHandler()
      /path/to/diode_go_client/cmd/diode/socksd.go:32 +0x54
  github.com/diodechain/diode_go_client/command.(*Command).Execute()
      /path/to/diode_go_client/command/command.go:139 +0x552
  main.RunDiode()
      /path/to/diode_go_client/cmd/diode/diode.go:27 +0x5b
  main.main()
      /path/to/diode_go_client/cmd/diode/diode.go:33 +0x4b
==================

Enable stdin/stdout piping to diode ports

Example:

machine1> echo "Hello World" | diode publish -public stdin:4000

machine2> diode -bind stdout:machine1.diode:4000 | cat
Hello World

Allow diode being used as a tool in unix pipes to forward and receive content directly through the e2e encrypted diode network.

[v0.8.0] Diode client disconnects without error

From time to time, my Diode client (CLI) will disconnect without error and will be unreachable by the network.

When it disconnects, external accesses are returned a 404 page. The disconnect continues until the Diode CLI is restarted on the client - as soon as it is restarted, the content can be accessed again.

Because the client goes offline and continues to be offline until restarted, it indicates the problem is not with the client's network connection and also not with the monitoring tools.

[v0.8.0] Connect error can show random data - might be timeout issue?

Example when connecting to a node:

12/28/2020 20:02:25 INFO Validating ticket based on non-checked block 1201900 1203724 server=europe.testnet.diode.io:41046 
12/28/2020 20:02:25 INFO Validating ticket based on non-checked block 1203729 1203724 server=europe.testnet.diode.io:41046 
12/28/2020 20:02:25 INFO Validating ticket based on non-checked block 1203729 1203724 server=europe.testnet.diode.io:41046 
12/28/2020 20:02:31 ERROR doConnectDevice() failed:  �E6

12/28/2020 20:03:14 INFO Got proxy request from: 127.0.0.1:59146
12/28/2020 20:03:15 INFO Validating ticket based on non-checked block 1201900 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:15 INFO Validating ticket based on non-checked block 1201900 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:15 INFO Validating ticket based on non-checked block 1203732 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:15 INFO Validating ticket based on non-checked block 1203732 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:20 INFO Validating ticket based on non-checked block 1201900 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:20 INFO Validating ticket based on non-checked block 1201900 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:21 INFO Validating ticket based on non-checked block 1203732 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:21 INFO Validating ticket based on non-checked block 1203732 1203727 server=europe.testnet.diode.io:41046 
12/28/2020 20:03:26 ERROR doConnectDevice() failed: +#&I

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.