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

Claim reward updates #2838

Merged
merged 75 commits into from
May 14, 2020
Merged

Claim reward updates #2838

merged 75 commits into from
May 14, 2020

Conversation

liberumed
Copy link
Contributor

@liberumed liberumed commented Nov 5, 2019

Motivation

Stakes snapshotting in the contract takes time and resources so it was decided to move it as part of the explorer app in blockscout so we can store snapshotted data in Postgress DB and populated it to the user differently.

Also, some contracts functions and events were removed or renamed so we need to update ABI as well.

This branch is working with https://github.com/poanetwork/posdao-test-setup repo.

Changelog

  • Rename contract functions
  • Rename contract events
  • Delete contract functions
  • Add fields to StakingPool and StakingPoolsDelegator required for stakes snapshotting
  • Remove chain based stakes snapshotting porcess
  • Add blockscout based stakes snapshottting process
  • Display “Accounted Stake Amount” and “Current Reward Percent” in delegators list

TBD

  • Implement Frontend for validator info
  • Check function that have changed implementation
  • Chechk consequences from removing update_tokens process

@liberumed liberumed self-assigned this Nov 5, 2019
@coveralls
Copy link

coveralls commented Nov 5, 2019

Pull Request Test Coverage Report for Build 1434bc61-985e-4ce1-8475-ae2306f436fe

  • 220 of 446 (49.33%) changed or added relevant lines in 15 files are covered.
  • 69 unchanged lines in 9 files lost coverage.
  • Overall coverage decreased (-2.3%) to 73.152%

Changes Missing Coverage Covered Lines Changed/Added Lines %
apps/explorer/lib/explorer/chain/staking_pool.ex 1 2 50.0%
apps/block_scout_web/lib/block_scout_web/notifier.ex 0 2 0.0%
apps/explorer/lib/explorer/staking/stake_snapshotting.ex 46 48 95.83%
apps/explorer/lib/explorer/chain.ex 3 6 50.0%
apps/block_scout_web/lib/block_scout_web/controllers/stakes_controller.ex 13 21 61.9%
apps/explorer/lib/explorer/staking/contract_state.ex 133 146 91.1%
apps/explorer/lib/explorer/staking/contract_reader.ex 0 33 0.0%
apps/block_scout_web/lib/block_scout_web/channels/stakes_channel.ex 0 164 0.0%
Files with Coverage Reduction New Missed Lines %
apps/block_scout_web/lib/block_scout_web/views/stakes_helpers.ex 1 67.74%
apps/explorer/lib/explorer/staking/contract_state.ex 1 92.13%
apps/indexer/lib/indexer/transform/addresses.ex 1 75.0%
apps/explorer/lib/explorer/chain.ex 2 77.23%
apps/indexer/lib/indexer/block/catchup/bound_interval_supervisor.ex 3 85.19%
apps/indexer/lib/indexer/block/fetcher.ex 3 82.93%
apps/block_scout_web/lib/block_scout_web/channels/stakes_channel.ex 4 0%
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/http.ex 7 64.0%
apps/ethereum_jsonrpc/lib/ethereum_jsonrpc/web_socket/web_socket_client.ex 47 18.75%
Totals Coverage Status
Change from base Build 162d6e30-a5de-4650-b599-029928268f83: -2.3%
Covered Lines: 5433
Relevant Lines: 7427

💛 - Coveralls

@liberumed liberumed force-pushed the claim-reward branch 2 times, most recently from 8d9b559 to 0d9895f Compare November 6, 2019 15:40
@liberumed liberumed changed the title Claim reward updates - Claim reward updates Nov 11, 2019
@varasev varasev self-requested a review May 14, 2020 14:10
Copy link
Contributor

@varasev varasev left a comment

Choose a reason for hiding this comment

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

Now I think we can merge this to the staking branch. Once merged, I will retest the app based on the staking branch and fix new issues (if any). After that, before merging staking to master, I'll make final UI fixes that were postponed (partially listed in https://github.com/poanetwork/blockscout/issues/2850).

@vbaranov
Copy link
Member

@varasev ci/circleci: dialyzer test is failed. It would be awesome to fix it before merging. Please, let me know if you want from me to take a look.

@varasev
Copy link
Contributor

varasev commented May 14, 2020

@vbaranov Yeah, I see - tried to fix the line in .dialyzer-ignore: 3561943

Copy link
Member

@vbaranov vbaranov left a comment

Choose a reason for hiding this comment

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

I think it is ready to be merged now 👍

@vbaranov vbaranov merged commit 975c91e into staking May 14, 2020
@vbaranov vbaranov deleted the claim-reward branch May 14, 2020 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants