-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
Allow custom key types and address formats #4232
Allow custom key types and address formats #4232
Conversation
…er parameter to NewAnteHandler to allow for custom key types and address formats
Codecov Report
@@ Coverage Diff @@
## master #4232 +/- ##
==========================================
+ Coverage 60.18% 60.19% +<.01%
==========================================
Files 212 212
Lines 15187 15168 -19
==========================================
- Hits 9140 9130 -10
+ Misses 5418 5413 -5
+ Partials 629 625 -4 |
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #4232 +/- ##
==========================================
+ Coverage 60.18% 60.19% +<.01%
==========================================
Files 212 212
Lines 15187 15168 -19
==========================================
- Hits 9140 9130 -10
+ Misses 5418 5413 -5
+ Partials 629 625 -4 |
Codecov Report
@@ Coverage Diff @@
## master #4232 +/- ##
==========================================
+ Coverage 60.18% 60.29% +0.11%
==========================================
Files 212 212
Lines 15187 15171 -16
==========================================
+ Hits 9140 9148 +8
+ Misses 5418 5403 -15
+ Partials 629 620 -9 |
@alexanderbez I reopened #4166 over here and made the changes you requested. |
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.
ACK, just a few minor bits of feedback.
@@ -86,6 +86,18 @@ func AccAddressFromHex(address string) (addr AccAddress, err error) { | |||
return AccAddress(bz), nil | |||
} | |||
|
|||
func VerifyAddressFormat(bz []byte) error { |
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.
Can we add a quick godoc for this?
@@ -86,6 +86,18 @@ func AccAddressFromHex(address string) (addr AccAddress, err error) { | |||
return AccAddress(bz), nil | |||
} | |||
|
|||
func VerifyAddressFormat(bz []byte) error { |
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.
Missing godoc comment
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.
It'd be nice to have a test case as well
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.
Few minor changes are required, it looks good otherwise.
oh lol, I've left essentially the same feedback as @alexanderbez, I didn't see it coming through. Please address the comments and feel free to dismiss my review 👍 EDIT: removed dup comments/suggestions |
Co-Authored-By: aaronc <[email protected]>
Co-Authored-By: aaronc <[email protected]>
…address formatting
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.
ACKed. Will merge shortly.
Resolves #3685. (Was PR #4166 before the develop branch was removed.)
Adds:
NewAnteHandler
for a customSignatureVerificationGasConsumer
(the existing one is now called `DefaultSigVerificationGasConsumer)addressVerifier
field tosdk.Config
which allows for custom address verification (to override the current fixed 20 byte address format)Changes:
DefaultSigVerificationGasConsumer
now uses type switching as opposed to string comparison. Other zones like Ethermint can now concretely specify which key types they accept.Targeted PR against correct branch (see CONTRIBUTING.md)
Linked to github-issue with discussion and accepted design OR link to spec that describes this work.
Wrote tests
Updated relevant documentation (
docs/
)Added a relevant changelog entry:
sdkch add [section] [stanza] [message]
rereviewed
Files changed
in the github PR explorerFor Admin Use: