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

GIVpower is acting strange #4326

Closed
divine-comedian opened this issue Jun 24, 2024 · 12 comments
Closed

GIVpower is acting strange #4326

divine-comedian opened this issue Jun 24, 2024 · 12 comments
Assignees
Labels
bug Something isn't working GIVPower GIVpower Test Env P1 it's a blocker to other tasks or issues. QA

Comments

@divine-comedian
Copy link
Contributor

divine-comedian commented Jun 24, 2024

We've had several user reports of GIVpower acting strange.

Some projects not changing rank at the beginning of a new round, when the estimate has show for several rounds that the project's rank would increase. Several projects have their estimated rank the same as many other projects.

image.png

image.png

Some projects or specific boosting have their amount shows as NaN

image.png

@RamRamez Did some investigation and here are his findings:

This is the first time I'm working on Givpower, the logic is complicated and I'm reading the codes trying to understand.

Different tables are involved in calculating givpower rank:

power_snapshot
power_round
power_balance_snapshot
power_boosting_snapshot
project_power_view
last_snapshot_project_power_view
user_project_power_view
project_user_instant_power_view

etc...

The problem in staging is the totalPower field is zero for all projects in project_power_view table.

project_power_view table is a materialized view calculating totalPower by having power_balance_snapshot, power_boosting_snapshot and power_snapshot tables.

The current power round is 44197 but we don't have this roundNumber in power_snapshot table. The newest round in power_snapshot table is 35864 and we don't have any data for rounds after that.

Also other tables like power_balance_snapshot and power_boosting_snapshot have data until 35864 round, and there's no data for rounds after that.

We should investigate further, find out what's wrong with GIVpower and execute the required fixes to bring it back to normal.

cc: @laurenluz

@divine-comedian divine-comedian added bug Something isn't working GIVPower GIVpower Test Env P1 it's a blocker to other tasks or issues. labels Jun 24, 2024
@aminlatifi
Copy link
Member

The problem was a wrong power boosting record from a user who never have had a positive givpower balance 0xa198b3e3028882122d6365a2290906074aad3431

I removed his boosting record and the state would be fine after the cronjob is executed again.

@aminlatifi
Copy link
Member

Giveth/impact-graph#1655

@aminlatifi
Copy link
Member

@RamRamez staging issue must be fixed now. The issue was database name was changed from staging -> staging2 and the db cron job was not updated to point to that db.

@RamRamez
Copy link
Collaborator

RamRamez commented Jun 25, 2024

@aminlatifi the totalPower in projectPowerView is still zero for all projects on staging and givPower is not shown on UI.

Maybe we should refresh all views manually?

https://staging.giveth.io/project/a-delicious-help?tab=givpower

@aminlatifi
Copy link
Member

@aminlatifi the totalPower in projectPowerView is still zero for all projects on staging and givPower is not shown on UI.

Maybe we should refresh all views manually?

https://staging.giveth.io/project/a-delicious-help?tab=givpower

It's fixed now. It need some time

@RamRamez
Copy link
Collaborator

@aminlatifi totalPower is still zero for all projects. Also UI not showing the GIVPower.

@mohammadranjbarz
Copy link
Contributor

@aminlatifi totalPower is still zero for all projects. Also UI not showing the GIVPower.

Screenshot 1403-04-06 at 10 45 20 in the morning @RamRamez Are you sure? It's ok for my project

@aminlatifi
Copy link
Member

aminlatifi commented Jun 26, 2024

Staging balance aggregator has issue in querying subgraph


Fetch id 0xdaea66adc97833781139373df5b3bced3fdda5b1-100 - subgraph url https://api.studio.thegraph.com/query/76292/giveconomy-staging-gnosischain/version/latest - last update time 1719241855 - skip 0 - take 500 |  
-- | --
  |   | [Nest] 1  - 06/26/2024, 8:50:34 AM   DEBUG [FetchAgent] |  
  |   | [Nest] 1  - 06/26/2024, 8:50:34 AM   DEBUG [FetchAgent] Fetching id 0xdaea66adc97833781139373df5b3bced3fdda5b1-100 |  
  |   | [Nest] 1  - 06/26/2024, 8:50:25 AM   ERROR [FetchAgent] AxiosError: Request failed with status code 410 |  
  |   | [Nest] 1  - 06/26/2024, 8:50:25 AM   ERROR [FetchAgent] Error on fetch id 0x632ac305ed88817480d12155a7f1244cc182c298-420 -

@mhmdksh can you look at this?

@RamRamez
Copy link
Collaborator

@aminlatifi totalPower is still zero for all projects. Also UI not showing the GIVPower.

Screenshot 1403-04-06 at 10 45 20 in the morning @RamRamez Are you sure? It's ok for my project

@mohammadranjbarz GIVPower not showing is on staging only

@aminlatifi
Copy link
Member

@aminlatifi totalPower is still zero for all projects. Also UI not showing the GIVPower.

Screenshot 1403-04-06 at 10 45 20 in the morning @RamRamez Are you sure? It's ok for my project

@mohammadranjbarz GIVPower not showing is on staging only

It's fixed now.

@RamRamez
Copy link
Collaborator

@aminlatifi Thanks, it's ok now

@maryjaf
Copy link
Collaborator

maryjaf commented Jun 26, 2024

Some projects not changing rank at the beginning of a new round, when the estimate has show for several rounds that the project's rank would increase. Several projects have their estimated rank the same as many other projects.

The rank of this project changed to 19

https://giveth.io/project/diamante-luz-center-for-regenerative-living-0?tab=givpower

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working GIVPower GIVpower Test Env P1 it's a blocker to other tasks or issues. QA
Projects
Status: Merged to Production
Development

No branches or pull requests

5 participants