Open mvines opened 5 years ago
@chris-remus and @mvines to work w/ @sunnygleason on open questions.
@sunnygleason did you get everything you need to do this?
I opened #425 about defining uptime, per the 50% requirement in the TdS Participation Agreement. The definition probably requires input from @ericlwilliams and Dominic. We're coordinating that discussion in 5.1 of the FAQ.
A couple (minor?) details I noticed:
(un-assigning myself -- if the solution is as easy as (1) compensating for scaling rewards in early epochs and (2) computing over all epochs, I can implement that anytime!)
@sunnygleason , the slots_in_epoch values don't look right to me. Epochs double in length until they reach DEFAULT_SLOTS_PER_EPOCH (currently set to 8192 here https://github.com/solana-labs/solana/blob/51ac05b3cf7cc323dfde7351cdb9110fd4ff1361/sdk/src/clock.rs#L12), so the epochs we're looking at in that SS are likely slots_in_epoch: 2048, 1024, 512, 256, 128
Do slots_in_epoch come from the cluster for each epoch? Or is that a constant set somewhere?
@CriesofCarrots great catch - I had forgotten about that!
What's the best way to proceed - update the RPC call to include slots_in_epoch
?
looking at this further - it appears that there is an EpochSchedule:
https://github.com/solana-labs/solana/blob/master/sdk/src/epoch_schedule.rs#L44
Would it be a good idea to expose this via RPC like getEpochSchedule()
?
I don't think that's quite what Sunny is looking for. @sunnygleason , we can get the EpochSchedule by getting the account data of the sysvar account, like we're doing here: https://github.com/solana-labs/solana/blob/7e6e7e8406318292b02591520fbe2cac7339090f/cli/src/vote.rs#L281 Of course, we'd need to implement the pattern to deserialize it.
Here's what the EpochSchedule looks like for edge.testnet.solana.com:
EpochSchedule { slots_per_epoch: 8192, leader_schedule_slot_offset: 8192, warmup: true, first_normal_epoch: 8, first_normal_slot: 8160 }
I assume you've figured out how to calculate the slots in the warmup epochs from that data...?
this is live at http://edge.explorer.solana.com/tour-de-sol?force=true
Note: mouse over the uptime to see additional details - if you have inspiration for exposing the multiple uptime values, let me know!
Uptime details view:
@sunnygleason Can you please help me understand how the ranking is calculated? From what I can see above, the ranking appears to be based on Most Rewards Collected, if I'm interpreting the credits correctly.
If that's the case, we should probably change the name from "Top Validator Ranking" to "Most Rewards Collected, since that is one of the three quantitative rewards categories -
Also, interpreting the stats you posted above -
Is a question that is commonly asked by validators during the dry runs. We've added the explanation to the FAQ.
Currently uptime for a validator is just reported over the last epoch (I think!). Perhaps we report multiple uptimes: last epoch, last N epochs, from the start of the stage?
We probably need to discuss how the implementation of this looks like, and ideally it could be computed directly from a ledger too (for offline analysis)