harmony icon indicating copy to clipboard operation
harmony copied to clipboard

[Feature] Add Live BLS Keys to staking_network_info

Open davidwhicker opened this issue 3 years ago • 2 comments

https://api.stake.hmny.io/networks/harmony/staking_network_info supplies some very helpful information. I would like to propose the addition of some informaiton I beleive would be helpful for those who build apps for the validator community to include the BLS keys onto the live_table.

EDIT: with the upcoming HIP 16 which key limits and the way this has been proposed to work, the following setup would be ideal.

Eg. "live_table": [ { "address": "one1u6c4wer2dkm767hmjeehnwu6tqqur62gx9vqsd", "name": "Soph #P-OPS Validator node", "effective_stake": 9.448712045199636e+24, "bid": 9.448712045199636e+24, "total_stake": 5.669227227119782e+25, "num": 6, "hasLogo": false, "slot": "2-7" "bls_keys_counts" : ["s0"=>3,"s1"=>1,"s2"=>1,"s3"=>4] }, ]

Note: the bls_keys_count would only be the keys that will make it to active for the next election. I.e the ones used to calculate slot : 2-7 in the above example from testnet.

I for one have an election page on vStats that determines the shard stake per shard. We have been using this to help balance the rewards on the shards across the validators, which I believe have helped stabalise the movements.

Instead of calling hmyv2_getAllValidatorInformation 8 times to get all the bls keys, working out the shard per key and bid to aquire a total shard stake, I could only call https://api.stake.hmny.io/networks/harmony/staking_network_info once to aquire all the information needed. This should help reduce the load.

In addition to, it would be handy for "externalShards" to have the effective stake per shard if this is possible. e.g "externalShards": [ { "total": 237, "external": 212, "external_effective_stake_total": 1,071,870,459 }, ....

davidwhicker avatar Apr 21 '22 10:04 davidwhicker

@DavidWhicker, hey

Sorry, i forgot to ask you about format

Is it ok?

{
 "bls_keys_counts": {"shard0": 0, "shard1": 2}
}

ahiipsa avatar May 24 '22 23:05 ahiipsa

Hey

Yes that works, thank you.

Kind regards David Whicker

On 25 May 2022, at 00:40, Sergey Karasev @.***> wrote:

 @DavidWhicker, hey

Sorry, i forgot to ask you about format

Is it ok?

{ "bls_keys_counts": {"shard": 0, "shard1": 2} } — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.

davidwhicker avatar May 25 '22 05:05 davidwhicker