Refactor store keys for variable-length addresses#8363
Merged
mergify[bot] merged 54 commits intomasterfrom Feb 1, 2021
Merged
Conversation
amaury1093
commented
Jan 22, 2021
| type validatorsByAddr map[[sdk.AddrLen]byte][]byte | ||
| // map of operator bech32-addresses to serialized power | ||
| // We use bech32 strings here, because we can't have slices as keys: map[[]byte][]byte | ||
| type validatorsByAddr map[string][]byte |
Contributor
Author
There was a problem hiding this comment.
most changes in this file are related to this change: since we use variable-length addresses, we cannot have map[[]byte][]byte. I'm using the bech32-string as map key here.
alessio
reviewed
Jan 22, 2021
alessio
reviewed
Jan 22, 2021
aaronc
reviewed
Jan 29, 2021
Member
aaronc
left a comment
There was a problem hiding this comment.
This generally looks good to me. It would be great if we had someone else who's worked with staking take a look as it's a pretty significant change... If not, I can approve
aaronc
approved these changes
Jan 29, 2021
Contributor
Author
|
Putting automerge on as to unblock other pieces depending on this PR |
12 tasks
tony-iqlusion
pushed a commit
to cosmos/cosmos-rust
that referenced
this pull request
Apr 19, 2022
This Cosmos SDK change allows variable-sized addresses: cosmos/cosmos-sdk#8363 This commit changes the validation logic to support addresses whose lengths are `1..=255`.
tony-iqlusion
added a commit
to cosmos/cosmos-rust
that referenced
this pull request
Apr 20, 2022
This commit changes the constructor and `to_bytes` methods to fully support variable-width account IDs, as added in cosmos/cosmos-sdk#8363. This is a breaking change.
tony-iqlusion
added a commit
to cosmos/cosmos-rust
that referenced
this pull request
Apr 21, 2022
This commit changes the constructor and `to_bytes` methods to fully support variable-width account IDs, as added in cosmos/cosmos-sdk#8363. This is a breaking change.
larry0x
pushed a commit
to larry0x/cosmos-sdk
that referenced
this pull request
May 22, 2023
* Change account store key in x/bank * Fix pagination test * Fix merge master * Fix staking keys.go * Use bech32 in val state change map * Fix sortNoLongerBonded * Use length-prefix function * Use length prefix function * Fix test accountStore * Fix ExamplePaginate * Fix staking keys * Use shorter balances prefix * Do slashing keys * Fix gov keys * Fix x/gov tests * Fix x/distrib * Address reviews * add change log entry * Add changelog * Fix failing tests * Fix sim tests * fix after-export sim * Fix lint * Address review * Fix x/authz * Fix global config in test * Update x/staking/keeper/val_state_change.go Co-authored-by: Robert Zaremba <robert@zaremba.ch> * Address comments * Fix comments * Address review * Fix authz test * Update comment * Rename to LengthPrefixedAddressStoreKey * Use variable * Rename function * Fix test build * chore: update rosetta CI (cosmos#8453) * Rename again * Rename yet again * Update feegrant keys * Add function to create prefix Co-authored-by: Robert Zaremba <robert@zaremba.ch> Co-authored-by: Frojdi Dymylja <33157909+fdymylja@users.noreply.github.com> Co-authored-by: Aaron Craelius <aaron@regen.network> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
ref: #8345
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/) or specification (x/<module>/spec/)godoccomments.Unreleasedsection inCHANGELOG.mdFiles changedin the Github PR explorerCodecov Reportin the comment section below once CI passes