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

Reduce RPC requests and DB changes by Staking DApp #3583

Merged
merged 8 commits into from
Jan 21, 2021

Conversation

varasev
Copy link
Contributor

@varasev varasev commented Jan 20, 2021

Motivation

Staking DApp requests information about pools and delegators (and rewrites the corresponding DB tables) on every block even when there are no changes in StakingAuRa and ValidatorSetAuRa contracts. This PR makes DApp only do that when some changes occurred. For that purpose, it uses the lastChangeBlock field from the contracts introduced in poanetwork/posdao-contracts@ef9ccff

Also, this PR comments out the warning added in #3576 (but doesn't remove it completely).

Checklist for your Pull Request (PR)

@varasev varasev requested a review from vbaranov January 20, 2021 08:37
@coveralls
Copy link

coveralls commented Jan 20, 2021

Pull Request Test Coverage Report for Build fed392f6b441d8daf91f34d422bcf1379cf52757-PR-3583

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.9%) to 66.742%

Files with Coverage Reduction New Missed Lines %
test/block_scout_web/features/pages/chain_page.ex 1 90.0%
Totals Coverage Status
Change from base Build 81d3a8162fe381a96af110ace9df582f00f7d03b: 0.9%
Covered Lines: 2077
Relevant Lines: 3112

💛 - Coveralls

@varasev varasev force-pushed the va-staking-dapp-light-optimization branch from f51d2c3 to fed392f Compare January 21, 2021 04:36
@vbaranov vbaranov merged commit 3cd59ed into master Jan 21, 2021
@vbaranov vbaranov deleted the va-staking-dapp-light-optimization branch January 21, 2021 07:32
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.

None yet

3 participants