-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
R4R: Refactor Validator Account Types/Bech32 Prefixing #2040
R4R: Refactor Validator Account Types/Bech32 Prefixing #2040
Conversation
r4r @cwgoes & @rigelrozanski /cc @faboweb |
Does this implement #2103 (or would anything need to be changed to implement the revised spec)? |
I actually think the signing info logic was never updated -- the signing info is done based on the validator's TM key pair. Tbh, I'm a bit confused how validator's are instantiated/created. In genesis.go, it used to be validators were created with I changed this to now be a But signing info works based off of the TM signing key, which is now of type Shouldn't EDIT: @cwgoes helped clarify things for me a bit. The validator should be instantiated with |
s.Write([]byte(fmt.Sprintf("%p", ca))) | ||
default: | ||
s.Write([]byte(fmt.Sprintf("%X", []byte(ca)))) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small side point - it may be nice to reuse some of the basic logic for the different address types such as this function Format
- we could create an address interface to implement some of this stuff. Probably for a later refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually had an Address
interface implemented, but then later decided to remove it as I thought it was too much overhead for the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah "for a future pr"
looks like need to merge develop but let's merge soon other than that |
@rigelrozanski for sure. I'll handle these conflicts today. |
@rigelrozanski this is good for another review. I also updated the Cosmos account bech32 prefix to reflect @jaekwon changes ( |
…bech32-stake-prefixing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work! Added a minor formatting commit
Thank you @rigelrozanski -- these are notable changes. How do you suggest we inform others? |
Good question - I'll mention it to @faboweb - up and coming! |
* Upgrade to v9 * Update handler * Fix linter * Remove old or basic upgrades from codecov * add execute rights to test scripts (cosmos#2041) * Add e2e tests * Update code smell * Remove and refactor duplicated query exec * Fix linter * Update ICS dependency * Update dependency * Fix typo Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com> Co-authored-by: MSalopek <35486649+MSalopek@users.noreply.github.com> Co-authored-by: Simon Noetzlin <simon.ntz@gmail.com>
cosmosconsaddr
andcosmosconspub
. Thesenow represent a validator's Tendermint signing key and address.
ConsAddress
cosmosvaladdr
andcosmosvalpub
to be usedexclusively to represent a validator's operator address and signing key
respectively.
Validator.operator
type fromsdk.AccAddress
tosdk.ValAddress
gaiacli keys show
to include new--bech
flag and respective REST endpoint to support custom Bech32 encoding (cons|acc|val
)sdk.ValAddress
andsdk.AccAddress
accordingly alongwith auxiliary functions used.
I understand this is a relatively "big" PR, but a majority of the changes are simply type changes (
sdk.AccAddres
=>sdk.ValAddress
or vice versa), as such I think it'll help to focus on the following files:Hopefully this reduces confusion 🤞
closes: #1910
docs/
)PENDING.md
that include links to the relevant issue or PR that most accurately describes the change.cmd/gaia
andexamples/
For Admin Use: