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

PoS: lazy map epoched data #740

Merged
merged 45 commits into from
Feb 7, 2023
Merged

PoS: lazy map epoched data #740

merged 45 commits into from
Feb 7, 2023

Conversation

tzemanovic
Copy link
Member

@tzemanovic tzemanovic commented Nov 4, 2022

Currently based on #1108.

The main issue this closes is #16, also closes #366, fix #43, fix #157, fix #13, fix #15, fix #158 ("validator total deltas" is just "validator stake" now), fix #787.

We also added a new client delegations query command.

There are 2 little change in the PoS VP RPC - 665f1be#diff-cc52d1a0ab349c3059b5b4b06cc705b47761c974a8b69d96ebc6d03cfd63d30e:

  1. validator_stake now returns Option<token::Amount> instead of just token::Amount and returns None iff the given address doesn't belong to a validator. Note that it will still return Some(0) when the address is a validator, but without any stake.
  2. bond_amount is being replaced with bond_with_slashing

As this PR is already pretty large and there isn't anything of substance that could be split out from it, we have for the time removed most of the PoS VP validation together and disabled its test as it's not essential for security in combination with tx whitelisting and authorization is checked by other VPs (vp_implicit, vp_validator, vp_user) which have been updated (with added test cases).

@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch 3 times, most recently from f3d3bab to 8cc15c0 Compare November 14, 2022 18:37
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch 2 times, most recently from 8b48db9 to e122a3a Compare November 24, 2022 16:24
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch 2 times, most recently from 050a7e0 to a6401cd Compare December 1, 2022 13:31
@tzemanovic tzemanovic force-pushed the tomas+brent/lazy-map-epoched branch 2 times, most recently from e741e57 to d16f854 Compare December 5, 2022 12:10
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch 3 times, most recently from f92a3bd to affbf70 Compare December 9, 2022 13:45
@brentstone brentstone mentioned this pull request Dec 13, 2022
@tzemanovic tzemanovic force-pushed the tomas+brent/lazy-map-epoched branch 3 times, most recently from c413b3d to 3c1f071 Compare December 15, 2022 18:03
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch from c692ac7 to a8ca01e Compare December 16, 2022 21:57
@brentstone brentstone mentioned this pull request Dec 20, 2022
15 tasks
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch from e623fcc to 814dc42 Compare December 27, 2022 02:19
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch from 814dc42 to 924a7d8 Compare January 13, 2023 22:41
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch from 86e9058 to d45e9d0 Compare February 3, 2023 17:19
@tzemanovic tzemanovic marked this pull request as ready for review February 3, 2023 17:40
@brentstone brentstone force-pushed the tomas+brent/lazy-map-epoched branch from 2e454e5 to 328b335 Compare February 3, 2023 17:59
@brentstone brentstone self-requested a review February 6, 2023 20:21
brentstone
brentstone previously approved these changes Feb 6, 2023
Copy link
Collaborator

@brentstone brentstone left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment