ton-society / grants-and-bounties

TON Foundation invites talent to imagine and realize projects that have the potential to integrate with the daily lives of users.
https://ton.org/grants
309 stars 137 forks source link

Pages with detailed stats for each category #240

Closed ingria closed 1 year ago

ingria commented 1 year ago

Summary

Pages with detailed stats for each category

Context

For each of the blockchain entities, we propose to make a separate page with detailed information to ensure real-time monitoring at tonscan.org.

Goals

Create convenient tools for monitoring new transactions, blocks and actual validators.

Deliverables

1) Validators page, including all actual validators list with their stakes and current status, and also frozen stakes. 2) Blocks page, with pagination into other blocks and a list of all transactions in the block and real-time monitoring of all actual blocks indicating their workchains, hash and txs count. 3) Transaction page, with real-time monitoring of all transactions: new tx's, TPS count, average transaction speed and

Definition of Done

Reward

3000 USD in TON

Oriental Release Date

TBD

Gusarich commented 1 year ago

Can you explain your idea in more details please?

alfredonodo commented 1 year ago

Hi, this footstep is very important to improve the statistics and transparency of TON. I hope to have it as soon as possible. Thank you

tonscan commented 1 year ago
  1. Validators page is now avaliable at https://tonscan.org/validators

  2. We decided to merge the Transactions page and the Blocks page into a single entity since their statistics have a lot of overlap. Now it's avaliable at https://tonscan.org/blocks – as soon as the number of shardchains will increase, the page will change the way it is displayed to a tabbed system.

Example of a specific block page: https://tonscan.org/block/-1:000000000000000:32294312

Wallet

EQDCH6vT0MvVp0bBYNjoONpkgb51NMPNOJXFQWG54XoIAs5Y

alfredonodo commented 1 year ago

Hello, thank you very much for your important result. However, I compared your data with those of other statistics aggregators and there are some inconsistencies:

Thanks

P.S. I cannot copy and paste the list of validator wallets in order to compare them better. Is it an intended server-side block?

ingria commented 1 year ago

different from that on your main page

We don't have any statistical info on the main page, what page do you mean?

Anyway, 6.2% displayed on the validators page is median apy across currently active validators, while 5.2% on tontech seems to be average.

Is it an intended server-side block

No, it is not intentional. You may check validator list at toncenter

alfredonodo commented 1 year ago

We don't have any statistical info on the main page, what page do you mean?

Anyway, 6.2% displayed on the validators page is median apy across currently active validators, while 5.2% on tontech seems to be average.

I was referring to this main page of statistics in the staking section where 5.2% APY is reported. If 6.2% is a median and not an average as is usually reported, I think you should specify this otherwise it is misleading.

No, it is not intentional. You may check validator list at toncenter

It is not possible to copy and paste all table columns into that page either manually or programmatically (especially the wallet address column). Is there any reason for this?

Do you know why your list of validators is substantially (completely) different from that of ton whales?

Thank you

ingria commented 1 year ago

Is there any reason for this?

This is a peculiarity of html rendering - we are using pseudo-elements, which are not interactive in modern browsers. It is possible to get the values programmatically:

console.table(
    Array.from(document.querySelectorAll('.validators-table tr')).slice(1)
        .map((row) => Array.from(row.querySelectorAll('td'))
            .map((cell) => cell.innerText || cell.querySelector('a').href.split('/').at(-1)
        ))
) 

Do you know why your list of validators is substantially (completely) different from that of ton whales

No idea, we'll look into this

tonscan commented 1 year ago

Do you know why your list of validators is substantially (completely) different from that of ton whales?

Yeah, we found the problem, get method of the Elector returns the stake value without considering the returned part. So we'll try to get this data in another way soon. Thanks.

tonscan commented 1 year ago

Do you know why your list of validators is substantially (completely) different from that of ton whales?

https://tonscan.org/validators

Fixed.

alfredonodo commented 1 year ago

Do you know why your list of validators is substantially (completely) different from that of ton whales?

https://tonscan.org/validators

Fixed.

Thank you. However, the values are still different from those of the ton whales. In particular, the number of validators and their stakes are different, it could be due to the different time of analysis. Also, there are many wallets that are not listed (I do not know which list is correct). For example, the following wallets should be the same: Ef8W1vCpA1tr9xr6QSXSxcVSdn1Sm7SYX_PCWQdClaWhales->tonscan Ef-m2UP6rg1Izra_yzSOvPboEem9d2HFzdWarnuNvrWhales->ton whales->Whale nominators #2 Moreover, in their case the sum of the stakes weight is 98.83%, while in yours it is 46.46%.

delovoyhomie commented 1 year ago

@tonscan, could you please tell me what's your progress? How much work is left to do?

delovoyhomie commented 1 year ago

Rewards sent!

Questbook proposal

delovoyhomie commented 1 year ago

To accurately recognize your valuable contributions in our repository, we kindly request you to submit a Pull Request to the Hall of Fame file, providing the wallet address and a link to the bounty with the number.

Please follow these steps: 1) Fork the repository (if you haven't already). 2) Edit the Hall of Fame file, commit, and push your changes. 3) Create a Pull Request from your fork to the main repository, providing the wallet address and a link to the bounty with the number (for example, Pull Request https://github.com/ton-society/grants-and-bounties/pull/136).

For reference on what your entry should look like, please see the examples of past merged pull requests.

@ingria, thank you for your contribution!

alfredonodo commented 1 year ago

Do you know why your list of validators is substantially (completely) different from that of ton whales?

https://tonscan.org/validators Fixed.

Thank you. However, the values are still different from those of the ton whales. In particular, the number of validators and their stakes are different, it could be due to the different time of analysis. Also, there are many wallets that are not listed (I do not know which list is correct). For example, the following wallets should be the same: Ef8W1vCpA1tr9xr6QSXSxcVSdn1Sm7SYX_PCWQdClaWhales->tonscan Ef-m2UP6rg1Izra_yzSOvPboEem9d2HFzdWarnuNvrWhales->ton whales->Whale nominators #2 Moreover, in their case the sum of the stakes weight is 98.83%, while in yours it is 46.46%.

Finally the data between ton whales and tonscan are aligned.