ethermint
ethermint copied to clipboard
fix: eip712 support for pubkey any messages
Closes: #XXX
Description
Most messages with EIP712 are working fine, but the code is not working if some values that are not the cosmos transaction itself, are contained inside a proto.Any
object.
The issue is that when we create read the transactions values, they are parsed using the JSON lib, for example, for public keys it returns the base64 representation of the pubkey as a string
.
When the lib generates the types for the EIP712 message, it uses codec.UnpackAny if the message is contained inside a proto.Any
object it will return {type:string, value:...} instead of the expected string
For now the only value that I found that is sent as a proto.Any
message is the pubkey, but I need to review the rest of the cosmos-sdk messages
For contributor use:
- [ ] 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.
- [ ] Code follows the module structure standards.
- [ ] Wrote unit and integration tests
- [ ] Updated relevant documentation (
docs/
) or specification (x/<module>/spec/
) - [ ] Added relevant
godoc
comments. - [ ] Added a relevant changelog entry to the
Unreleased
section inCHANGELOG.md
- [ ] Re-reviewed
Files changed
in the Github PR explorer
For admin use:
- [ ] Added appropriate labels to PR (ex.
WIP
,R4R
,docs
, etc) - [ ] Reviewers assigned
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
This PR would close https://github.com/tharsis/evmos/issues/545
@zmanian we also would need to remove the single signature check as @tony-iqlusion mentioned
Iqlusion would be willing to join the validator set with a single sig ledger backed key.
It's a partial fix for the issue.
Codecov Report
Merging #1076 (03cc04b) into main (d559893) will increase coverage by
0.09%
. The diff coverage isn/a
.
:exclamation: Current head 03cc04b differs from pull request most recent head f7ea579. Consider uploading reports for the commit f7ea579 to get more accurate results
@@ Coverage Diff @@
## main #1076 +/- ##
==========================================
+ Coverage 59.39% 59.49% +0.09%
==========================================
Files 85 84 -1
Lines 6992 6940 -52
==========================================
- Hits 4153 4129 -24
+ Misses 2622 2598 -24
+ Partials 217 213 -4
Impacted Files | Coverage Δ | |
---|---|---|
rpc/types/utils.go | 0.00% <0.00%> (ø) |
|
x/evm/client/cli/query.go | 0.00% <0.00%> (ø) |
|
x/evm/migrations/v2/migration.go | ||
x/evm/keeper/state_transition.go | 75.54% <0.00%> (+0.16%) |
:arrow_up: |
x/evm/module.go | 53.73% <0.00%> (+0.87%) |
:arrow_up: |
x/evm/types/params.go | 100.00% <0.00%> (+6.52%) |
:arrow_up: |
x/evm/keeper/migrations.go | 100.00% <0.00%> (+33.33%) |
:arrow_up: |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days-before-close if no further activity occurs.
Replaced by this https://github.com/evmos/ethermint/pull/1283