Giter VIP home page Giter VIP logo

eth-netstats's People

Contributors

cubedro avatar debris avatar frozeman avatar jesuscript avatar jorisbontje 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  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  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

eth-netstats's Issues

pm2 module does not detect running node

I want to display statistics about a private network, but it seems the eth-net-intelligence-api can't detect the running node I want to display.

This is how I start the node I want to display in netstats:

#!/bin/bash

geth --identity "miner1" \
    --networkid 42 \
    --datadir "~/Blockchain/private_geth_network/miner1" \
    --nodiscover \
    --mine \
    --rpc \
    --rpcport "8051" \
    --port "30351" \
    --unlock 0 \
    --password "/Users/jonas/Blockchain/private_geth_network/miner1/password.sec" \
    --ipcpath "~/Library/Ethereum/geth.ipc" \
    console

And this is the app.json file I use to run pm2 start app.sjon:

[
  {
    "name"              : "miner1",
    "cwd"               : ".",
    "script"            : "app.js",
    "log_date_format"   : "YYYY-MM-DD HH:mm Z",
    "merge_logs"        : false,
    "watch"             : false,
    "max_restarts"      : 10,
    "exec_interpreter"  : "node",
    "exec_mode"         : "fork_mode",
    "env":
    {
      "NODE_ENV"        : "production",
      "RPC_HOST"        : "localhost",
      "RPC_PORT"        : "8051",
      "LISTENING_PORT"  : "30351",
      "INSTANCE_NAME"   : "miner1-1",
      "CONTACT_DETAILS" : "",
      "WS_SERVER"       : "http://localhost:3000",
      "WS_SECRET"       : "hello",
      "VERBOSITY"       : 2
    }
  }
]

But pm2 gives me this message:

[PM2] Spawning PM2 daemon with pm2_home=/Users/jonas/.pm2
[PM2] PM2 Successfully daemonized
[PM2][WARN] Applications miner0 not running, starting...
[PM2] App [miner0] launched (1 instances)
┌──────────┬────┬──────┬───────┬────────┬─────────┬────────┬─────┬───────────┬──────┬──────────┐
│ App name │ id │ mode │ pid   │ status │ restart │ uptime │ cpu │ mem       │ user │ watching │
├──────────┼────┼──────┼───────┼────────┼─────────┼────────┼─────┼───────────┼──────┼──────────┤
│ miner0   │ 0  │ fork │ 12230 │ online │ 0       │ 0s     │ 0%  │ 12.7 MB   │ jonas│ disabled │
└──────────┴────┴──────┴───────┴────────┴─────────┴────────┴─────┴───────────┴──────┴──────────┘

Can you see the problem?

Miner Node H/s Rate Not Right

In eth-netstats/public/js/filters.js, hashrateFilter function, the hashes or unit is off by a factor of 1000. Since the base unit of hashes reported is KH/s and not H/s, hashes should be set to hashes * 1000 prior to hashes conditional logic evaluation for results and units.

Add NodeID

Being able to manually add peers with NodeID would be very useful.

check that - I think it should be pointed to ~/bin/www/bin/eth.sh

root@poc-9-test:~# cd ~/bin
root@poc-9-test:~/bin# pm2 start processes.json
[PM2] Spawning PM2 daemon
[PM2] PM2 Successfully daemonized
[PM2] cron restart at 0 0 * * *
[PM2][ERROR] script not found : /home/ubuntu/bin/www/bin/eth.sh
Error: script not found : /home/ubuntu/bin/www/bin/eth.sh
    at resolvePaths (/usr/local/lib/node_modules/pm2/lib/CLI.js:1826:11)
    at /usr/local/lib/node_modules/pm2/lib/CLI.js:371:19
    at replenish (/usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:194:21)
    at /usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:211:15

Propagation

Move the propagation math logic to back-end

netstats.min.js does not exist

No content is shown in http://localhost:3000 because netstats.min.js does not exist,
this file is used in following files, is anything wrong with the code?

Gruntfile.js:209: dest: 'dist/js/netstats.min.js',
Gruntfile.js:239: dest: 'dist-lite/js/netstats.min.js',
src/views/layout.jade:13: script(src="/js/netstats.min.js")
src-lite/views/layout.jade:13: script(src="/js/netstats.min.js")

Can't start eth-netstats. fnName is not defined.

I couldn't start eth-netstats because of following error.

$ npm start

> [email protected] start /home/user/git/eth-netstats
> node ./bin/www

/home/user/eth-netstats/lib/utils/logger.js:114
        if(verbosity[ENV_VERBOSITY].indexOf(fnName) === -1)
                                            ^

ReferenceError: fnName is not defined
    at Console.console.(anonymous function) [as error] (/home/shimo/git/eth-netstats/lib/utils/logger.js:114:39)
    at Object.<anonymous> (/home/shimo/git/eth-netstats/app.js:28:11)
    at Module._compile (module.js:425:26)
    at Object.Module._extensions..js (module.js:432:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:313:12)
    at Module.require (module.js:366:17)
    at require (module.js:385:17)
    at Object.<anonymous> (/home/shimo/git/eth-netstats/bin/www:3:11)
    at Module._compile (module.js:425:26)

User can switch between two configurations

config / monitored nodes are stored in config/nodes.js

how to switch between develop nodes and live nodes?

Ideally I can start with cmd line pointing to a different config directory. This option should be exposed also to the docker image, so I can do something like this

docker run eth-netstat --config config-live 
docker run eth-netstat --config config-devel 

Transaction status not updated properly in the graph

I couldn't see the transaction status graph moving when a transaction is recorded in the ethereum private network. Please find the attached image

And the geolocation information is missing

data

I am running the app on:
Node version: 4.6.0
Npm version: 3.10.7

Display is regularly updated

The display is currently static. Changes in the network are not updated.

Usecase:
Start eth-netstat
Kill a node
-> the status of the killed node should be shown.

Currently I have to restart eth-netstat to see the update. Even a browser refresh does not update the display.

start/stop miner status not correct

Hello,

I start a private "eth" node without enabling miner.
Then, I "geth attach" to this node for administration and the Mist browser as the front-end.
The first time, when I run: miner.start(1), I really see the miner status of the node is changed correctly.
After that, I run: miner.stop() for stopping the miner. I also see the miner status of the node updated correcty. After that, if I try again miner.start(1) then I no longer see the updated miner status correctly although the log output of the running "eth" node looks like in mining.

Maybe this's a bug of net-stats?

Difficulty displayed as "0.00 H" when it's over 1 PH

Browser: both Firefox 54.0 and Chromium 59.0.3071.115
OS: Arch Linux (64-bit), last updated on 2017-06-27

It seems to me that the rounding does not do well after the difficulty has recently gone over 10^15.

Decide about the best way to query nodes

Initially nodes are queried via json-rpc interface, which has security implications.

What are other options to query nodes (from skype channel)

Fellix Lange: so you need a ‘backdoor’ in the clients. that’s fine for system testing but bad for live network.
[3:13:17 PM] Heiko Hees: sven, what about a small service (which runs locally next to the client), that queries the local rpc and periodically logs a message to our server?
[3:14:04 PM] Heiko Hees: less configuration, less firewall issues, built in security. ....
[3:15:30 PM] Heiko Hees: what data is collected? if it's only about connectivity, we can even write a simple crawler based on the discovery protocol.
[3:15:41 PM] Felix Lange: discovery protocol crawler is a much better idea.
[3:16:11 PM] Felix Lange: if you want other data, i would suggest that the best way to implement it would be a dapp
[3:16:49 PM] Felix Lange: we would add an option: “enable telemetry” and then push this info via whisper
[3:17:51 PM] Felix Lange: anyway, it’s fine for testing right now
[3:18:05 PM] Stephan Tual: enabling telemetry is a great idea! “help us improve the network” type thing.

Show running history of last blocks mined

The "Last Blocks Miners" section currently shows a horizontal bar with one square for each block mined within the last 40(?) blocks. Modify the presentation to show which blocks were mined. For example, if the current block is #90 and miner "foo" produced blocks 75-80 and 85-88, the section would show:

foo.....................................10
........................xxxxxx....xxxx..

instead of:

foo.....................................10
xxxxxxxxxx..............................

suggestion: header arrangement

Suggest considering the order of the items in the first row/header.
For example, Best Block should be more to the left in my opinion. Uptime maybe more to the right, or smaller, possibly even part of "Active Nodes".

Add API

Add API for fetching latest block

Nginx config

Hey, I'm trying to deploy the server to display stats for the ETC network but ran into some issues trying to get a remote client to connect. Please share the correct Nginx config if you don't mind. Thanks.

client log:
node-app-0 (err): { domain: null,
node-app-0 (err): _events: { error: [Function: onerror] },
node-app-0 (err): _maxListeners: 10,
node-app-0 (err): _socket: null,
node-app-0 (err): _ultron: null,
node-app-0 (err): _closeReceived: false,
node-app-0 (err): bytesReceived: 0,
node-app-0 (err): readyState: 3,
node-app-0 (err): supports: { binary: true },
node-app-0 (err): extensions: null,
node-app-0 (err): _binaryType: 'arraybuffer',
node-app-0 (err): _isServer: false,
node-app-0 (err): url: 'wss://rpc.etcstats.net/api/?_primuscb=LOpihbd',
node-app-0 (err): protocolVersion: 13,
node-app-0 (err): _closeTimer: null,
node-app-0 (err): _closeCode: 1006 } }
node-app-0 (err): 2016-07-28 18:49 -04:00: [wsc] =!= Reconnecting in 500 ms
node-app-0 (err): 2016-07-28 18:49 -04:00: [wsc] =!= This is attempt 1 out of 10
node-app-0 (err): 2016-07-28 18:49 -04:00: [wsc] =!= Reconnecting in 1850 ms
node-app-0 (err): 2016-07-28 18:49 -04:00: [wsc] =!= This is attempt 2 out of 10

[PM2] Streaming realtime logs for [all] processes

node-app-0 [wsc] =i= Socket reconnect attempt started
node-app-0 [wsc] =!= Reconnecting in 3306 ms
node-app-0 [wsc] =!= This is attempt 3 out of 10
node-app-0 [eth] =i= { id: 'node0',
node-app-0 stats:
node-app-0 { active: true,
node-app-0 syncing: false,
node-app-0 mining: false,
node-app-0 hashrate: 0,
node-app-0 peers: 63,
node-app-0 gasPrice: '20000000000',
node-app-0 uptime: 100 } }
node-app-0 [wsc] =i= Socket reconnect attempt started
node-app-0 [wsc] =!= Reconnecting in 5313 ms
node-app-0 [wsc] =!= This is attempt 4 out of 10

Consider making publication of a node's IP address optional

Currently, each node listed on the netstats page has its IP address published. Some folks might like to have their nodes listed but not necessarily their IP addresses published on the world wide web. Please consider making publication of the IP address a per node config option.

WS_SECRET NOT SET!!!

When I execute npm start it throws the error " WS_SECRET NOT SET!!!" I can access the site however no data is loaded.
Also I would like to point to my localhost node. How can I do that ?

RangeError: out of range index

/root/eth-netstats/node_modules/ws/lib/Receiver.js:386
    default: srcBuffer.copy(dstBuffer, dstOffset, 0, length); break;
                       ^

RangeError: out of range index
    at RangeError (native)
    at fastCopy (/root/eth-netstats/node_modules/ws/lib/Receiver.js:386:24)
    at Receiver.add (/root/eth-netstats/node_modules/ws/lib/Receiver.js:86:3)
    at Socket.realHandler (/root/eth-netstats/node_modules/ws/lib/WebSocket.js:800:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at readableAddChunk (_stream_readable.js:176:18)
    at Socket.Readable.push (_stream_readable.js:134:10)
    at TCP.onread (net.js:543:20)

Improvement suggestion: Add nodes current hash rate to the table.

It would be a useful way for a user to know how his machine compares to others. Knowing the difficulty is 9 million and their hash rate is 710 doesn't help most users as those numbers are very different. Knowing the hash rate of the top nodes, or the average hash rate of nodes in the network, could be better for a new user to easily measure himself against most.

SECURITY ALERT

Hi,

when I execute "PORT=3015 WS_SECRET=big-secret npm start", the following log is show:

[email protected] start /home/cloudhorse/eth-netstats
node ./bin/www

The problem is, when I open http://localhost:3015/, then the following message appears in the webbrowser

ATTENTION!This page does not represent the entire state of the ethereum network - listing a node on this page is a voluntary process.
SECURITY ALERTRead the blog post

"Read the blog post" contains a link to "https://blog.ethereum.org/2015/09/10/security-alert-previous-security-patch-can-lead-to-invalid-state-root-on-go-clients-with-a-specific-transaction-sequence-fixed-please-update/"

Why is that happening? No network status is displayed

"Private" EthStat behind proxy - empty portal

I have ethstats for local cluster running on port 3000. Now I try to add a proxy on port 80 it can be visible without opening extra firewall holes.

Currently I'm trying Apache. With following configuration I see full, but empty interface. Any hints welcome.


ProxyRequests off
<Proxy *>
    Require all granted
</Proxy>
ProxyPass / http://localhost:3000/
ProxyPassReverse /  http://localhost:3000/
<Location />
    Require all granted
</Location>

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.