gochain / netstats

GNU General Public License v3.0
4 stars 4 forks source link

Refactoring backend to Go. #36

Closed benbjohnson closed 5 years ago

benbjohnson commented 5 years ago

This commit converts the backend from node.js to Go.

TODO
jmank88 commented 5 years ago

Does this address #33 and/or #34? Or is it a straight port of the existing code?

benbjohnson commented 5 years ago

Does this address #33 and/or #34? Or is it a straight port of the existing code?

It's mostly a straight port except that the block storage is updated so that we can compute the best chain instead of doing the weird block slots data structure that existed in the JS implementation. #33 should be resolved with this. #34 wouldn't be difficult to change now but you had a comment on there that made it sound like that might not be important.

jmank88 commented 5 years ago

Block times appear to be rounded to whole seconds: screenshot from 2018-11-15 08-34-27

jmank88 commented 5 years ago

Did we lose auto lookup by ip? Is that something we need a Go alternative for? screenshot from 2018-11-15 08-40-08

jmank88 commented 5 years ago

When a node restarts with a new version, the Node type details are not updated in the UI.

jmank88 commented 5 years ago

When a node goes down, it no longer shows as gray (remains green as if online).

benbjohnson commented 5 years ago

Block times appear to be rounded to whole seconds

Fixed

Did we lose auto lookup by ip? Is that something we need a Go alternative for?

For some reason I thought we were pulling geo from the trusted file. I added GeoIP lookup via MaxMind and it downloads the MaxMind lite DB into the Docker container.

When a node restarts with a new version, the Node type details are not updated in the UI.

Fixed

When a node goes down, it no longer shows as gray (remains green as if online).

Fixed.

benbjohnson commented 5 years ago

Also, I didn't mention it already but there are now /debug/nodes and /debug/blocks endpoints to dump out the current state of the DB in pretty-print JSON for easier debugging.

jmank88 commented 5 years ago

For some reason I thought we were pulling geo from the trusted file

We are, but not for everyone.