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

Changed givpower boosting related queries to improve performance #1079

Merged
merged 7 commits into from
Aug 2, 2023

Conversation

aminlatifi
Copy link
Member

Changed power_balance_snapshot table balance column to accept null values Change take TAKE_POWER_BOOSTING_SNAPSHOT procedure to make instances of power_balance_snapshot for users has power_boosting_snapshot for each snapshot Updated tests to match these changes
Ref #1067

Changed power_balance_snapshot table balance column to accept null values
Change take TAKE_POWER_BOOSTING_SNAPSHOT procedure to make instances of power_balance_snapshot for users has power_boosting_snapshot for each snapshot
Updated tests to match these changes
Ref #1067
@aminlatifi aminlatifi marked this pull request as draft July 31, 2023 06:30
@aminlatifi aminlatifi marked this pull request as ready for review July 31, 2023 08:19
@aminlatifi
Copy link
Member Author

@CarlosQ96 @MohammadPCh We must monitor database load before and after this merge

@aminlatifi
Copy link
Member Author

I noticed some of gnosis tests pass by setting xdai rpc to https://xdai-rpc.gateway.pokt.network/

@CarlosQ96
Copy link
Collaborator

CarlosQ96 commented Aug 1, 2023

@aminlatifi once I change the XDAI node url like you said the error is fixed.

If you look at the errors its a UNIQUENESS ERROR. Which doesn't make sense. But I encountered this before.

I found the root cause, I think it's a bug in our test library.
When any http/blockchain/rpc call fails (in this case the xdai url), the tests retry themselves multiple times.
Since we don't clean the data on each test start it hit the uniqueness error.

We should update the test environment to this new url and rerun tests.

It's not the PRs issue but some network, xdai rpc url issue.

@CarlosQ96
Copy link
Collaborator

when changing Xdai url most tests worked but seems 2 are failing. Couldn't find the cause, if its still the xdai url or something else.

@aminlatifi
Copy link
Member Author

@CarlosQ96 Let's raise the gnosis provider with the Devops team.
Did you review the PR? can we proceed? do you think we must wait for all tests be passed?

@CarlosQ96
Copy link
Collaborator

@aminlatifi I think all test need to pass or else it wont deploy. But I think the code is fine.

Its a url/rpc issue not code.

Copy link
Collaborator

@CarlosQ96 CarlosQ96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but we have to fix the URLS/RPC for tests to pass or wont deploy.

@CarlosQ96
Copy link
Collaborator

Locally all tests pass for me, its an rpc provider issue.

@CarlosQ96
Copy link
Collaborator

CarlosQ96 commented Aug 2, 2023

@geleeroyale @mhmdksh We are having some issue with the gnosis provider as it's not being reliable and failing when requesting data, throwing errors so our tests are failing.
We might need to find a new url or test won't pass.

@geleeroyale
Copy link
Collaborator

Hey Carlos! Which provider do we have set? If it is a gateway RPC I recommend to switch back to our quicknode instance

@CarlosQ96 CarlosQ96 merged commit 1a16012 into staging Aug 2, 2023
3 checks passed
@CarlosQ96 CarlosQ96 deleted the feat/1067_improve_givpower_db branch August 2, 2023 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants