input-output-hk / jormungandr

privacy voting blockchain node
https://input-output-hk.github.io/jormungandr/
Apache License 2.0
364 stars 132 forks source link

additional node stats values #233

Open gufmar opened 5 years ago

gufmar commented 5 years ago

would it be possible to have additional node/stats values (as soon as related functionality is implemented)

{ 
 "leaderState":1, 
 "delegationCount":123, 
 "delegationSum":12345, 
 "lastBlockTx":2, 
 "LastBlockSum":123, 
 "lastBlockTime":"2019-03-31 12:34:56", 
 "lastBlockFees":1 
} 
nicarq commented 5 years ago

good idea! One little detail that I would recommend is to use ISO8601 and add the UTC notation to it e.g. 2019-03-31T12:34:56Z.

gufmar commented 5 years ago

while looking at the current node startup command options, I was thinking leaderState may be

0 without-leadership
1 awaiting-leadership
2 elected-leader
CodeSandwich commented 5 years ago

leaderState is too volatile to be usable. In order to find out when block should be written https://github.com/input-output-hk/jormungandr/issues/423 will be added.

CodeSandwich commented 5 years ago

What value exactly is needed in delegationCount and delegationSum fields? Is it supposed to be total count and sum of delegated stakes in the network? Or just for a given list of accounts (e.g. wallet app user's)? @gufmar ?

gufmar commented 4 years ago

Sorry for the late reply. missed this. delegationCount and Sum was just examples. Generally, I would consider and describe these stats values as not mission-critical but useful for stake pool operators and end users. They can record the values in their monitoring and also feed that data into widgets on their website or other news-channels. Many delegators might don't care, but some could have an interest delegating to a long-time stable pool. Grew it up fast recently? does it have thousands of small delegations or a hand full of big sums. How often the pool is close to the capped limit?

On the other side: better focus on mission-critical things for now, and rethink about such surrounding things as (third-party) modules. The verifiable data is on-chain, must not come from the node itself.