Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sampling and validation of key indicators. #583

Open
Keith-CY opened this issue Mar 25, 2024 · 13 comments
Open

Sampling and validation of key indicators. #583

Keith-CY opened this issue Mar 25, 2024 · 13 comments
Assignees
Labels
documentation Improvements or additions to documentation feature

Comments

@Keith-CY
Copy link
Member

Add a new service to sample and validate the following key indicators to guarantee the correctness of CKB Explorer

Indicators:

  1. Count of live cells of a specific address
  2. Balance of a specific address
  3. TODO

This service can also be expanded into a data sampling service for data analysis.

@Keith-CY Keith-CY added the documentation Improvements or additions to documentation label Mar 25, 2024
@Keith-CY Keith-CY moved this to 🎨 Designing in CKB Explorer Mar 25, 2024
@Keith-CY Keith-CY assigned Keith-CY and poor-defined and unassigned Keith-CY Mar 25, 2024
@Keith-CY
Copy link
Member Author

@Sven-TBD @Danie0918 please have a review to see if any other indicators should be added in this monitor service.

@Danie0918
Copy link
Contributor

@Sven-TBD @Danie0918 please have a review to see if any other indicators should be added in this monitor service.

I'm not sure about the method of 'guarantee the correctness of CKB Explorer', if it's the ' data analysis' aspect, I would suggest that the following data could be added:

  1. Top 100 CKB Address: Statistics on balance, Txs count, and change in 24 hours/3 days/7 days balance.
  2. Top CKB Senders/Receivers: Statistics on the Txs count, amount, and percentage of top 10 addresses sending/receiving in 24 hours/3 days/7 days.
  3. Top Tokens: Statistics on Txs count, New Address count of the top 10 Tokens in 24 hours/3 days/7 days.

@Keith-CY
Copy link
Member Author

Keith-CY commented Apr 7, 2024

'guarantee the correctness of CKB Explorer'

For instance, when a transaction has been synced, the monitor will list addresses included in the transaction, fetch live cells of each address and get their real-time balances to check if the data has been timely updated on the Explorer.

Live cells are fetched from the node so they are definitely correct

Top 100 CKB Address: Statistics on balance, Txs count, and change in 24 hours/3 days/7 days balance.
Top CKB Senders/Receivers: Statistics on the Txs count, amount, and percentage of top 10 addresses sending/receiving in 24 hours/3 days/7 days.
Top Tokens: Statistics on Txs count, New Address count of the top 10 Tokens in 24 hours/3 days/7 days.

Good points, should be included.

@poor-defined poor-defined moved this from 🎨 Designing to 📌CurrentWeek in CKB Explorer Apr 8, 2024
@poor-defined
Copy link
Contributor

I think these points are sufficient enough for demonstration. For any other information, I suggest counting the number of cells for each tab in the Address Details page overview. Additionally, adding a list mode to these tabs.

So, it looks like this
Live Cell (1000) | RGB++ (200)| XUDT(300)| NFT(500)

Image

Or we can check the total Gas spent, which is an independent function.

So, if we all agree, we can start from

  1. Count of live cells/XUDT/sUDT/Inscription/NFT of a specific address on Address detail Page
  2. Balance of a specific address on Address detail Page
  3. Top Address/Tokens/Senders on a different page

@Keith-CY
Copy link
Member Author

I think these points are sufficient enough for demonstration. For any other information, I suggest counting the number of cells for each tab in the Address Details page overview. Additionally, adding a list mode to these tabs.

So, it looks like this Live Cell (1000) | RGB++ (200)| XUDT(300)| NFT(500)

Image

Or we can check the total Gas spent, which is an independent function.

So, if we all agree, we can start from

  1. Count of live cells/XUDT/sUDT/Inscription/NFT of a specific address on Address detail Page
  2. Balance of a specific address on Address detail Page
  3. Top Address/Tokens/Senders on a different page

LGTM

@Keith-CY
Copy link
Member Author

+1: Check if a BTC UTxO owning a Cell has been transferred.

@poor-defined
Copy link
Contributor

+1: Check if a BTC UTxO owning a Cell has been transferred.

Related issue here : #638

@Keith-CY
Copy link
Member Author

Keith-CY commented May 8, 2024

Validator running on Vercel

Image

@Keith-CY
Copy link
Member Author

Keith-CY commented May 8, 2024

Available on https://t.me/ckb_metrics_bot
image

Optimization for performance and storage is required so alert messages won't be repeated


Or visit https://ckb-metrics.vercel.app/addresses/incorrect to see the addresses list to revalidate, these addresses will be double-checked every 5 mins, or be triggered manually by https://ckb-metrics.vercel.app/api/trpc/ckb.validation.revalidate

@Keith-CY
Copy link
Member Author

Keith-CY commented May 10, 2024

Repo: https://github.com/Magickbase/ckb-metrics
TG: https://t.me/ckb_metrics_bot start by /subscribe and end by /unsubscribe
Online: https://ckb-metrics.vercel.app/addresses/incorrect


Only capacity is validated now, specific types of cells will be added later.

@Keith-CY Keith-CY moved this from 📌CurrentWeek to 👀 Testing in CKB Explorer May 10, 2024
@Keith-CY Keith-CY moved this from 👀 Testing to 🏗 In Progress in CKB Explorer May 10, 2024
@Keith-CY
Copy link
Member Author

Validation of cell count has been added

@Keith-CY
Copy link
Member Author

Validation of xudt has been added

@Keith-CY
Copy link
Member Author

Will add validation of cell's count

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation feature
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

3 participants