-
Notifications
You must be signed in to change notification settings - Fork 991
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 - use finer-grained storage keys #16
Comments
This is even more important for the validator sets field - currently, the only way to validate its changes in the VP is to iterate the validator sets to check for expected and unexpected changes. For validator sets, it would be useful to have a "LazyMap/Set" built on top of the tx/VP interface, in which the map/set's keys would be formatted into storage sub-keys, so that VP would only receive the entries that have actually changed, without having to look for diffs in the whole collection. This depends on #168 |
@brentstone do you know what the status of this is? |
I think this will be closed by #740 |
Closed by #740. |
Depends on #12.
Refactor the PoS integration's storage keys to store the epoched data split up into finer-grained data. Currently, all the epoched data are serialized as the whole
Epoched
/EpochedDelta
value.For example, a validator's voting power is stored in
"{PoS_address}/validator/{validator_address}/voting_power"
. Instead, we can store the fields of theEpoched
/EpochedDelta
split up into their fields:"{PoS_address}/validator/{validator_address}/voting_power/last_update"
"{PoS_address}/validator/{validator_address}/voting_power/{n}"
for each set value in the inner arrayThis way, when a transaction changes this data, we don't have to find the diff in the whole structure for validation and the validation should then be simpler.
┆Issue is synchronized with this Asana task by Unito
The text was updated successfully, but these errors were encountered: