Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Allow from field to be empty #110

Closed
thomas-nguy opened this issue Jun 10, 2021 · 4 comments
Closed

Allow from field to be empty #110

thomas-nguy opened this issue Jun 10, 2021 · 4 comments

Comments

@thomas-nguy
Copy link
Contributor

thomas-nguy commented Jun 10, 2021

System info:

MacOs

Steps to reproduce:

Some tools such as metamask or truffle does not set the field 'from' when sending a transaction. Instead it expects the value to be extracted from the signature.

( snippet from geth to extract sender address from signature
https://github.com/ethereum/go-ethereum/blob/master/core/types/transaction_signing.go#L131 )

However some antler handler such as the EthAccountVerificationDecorator expect the MsgEthereumTx field 'from' to be not empty or it will returns an error.

I suggest either to modify the logic in the AnteHandler to extract the sender address from the signature if it is not in the message or always set the field from in the cosmos tx with the signature if it is not present in the eth tx.

What do you think?

linked to issue

#79

@thomas-nguy thomas-nguy changed the title From field can be empty Allow from field to be empty Jun 10, 2021
@thomas-nguy thomas-nguy linked a pull request Jun 11, 2021 that will close this issue
@thomas-nguy thomas-nguy removed a link to a pull request Jun 11, 2021
@fedekunze
Copy link
Contributor

so the msg validation allows the From field to be empty. I recently (#109) changed the EthSigVerify ante handler decorator to set up the sender address if not already. What other actionable items do you think are left for this issue?

@thomas-nguy
Copy link
Contributor Author

thanks, I think this fix should solve the issue with empty field from.
(I guess the ValidateBasic verification of the from address become redundant now)

With current main, I am unable to broadcast transaction. Is there any protobuf file to be updated?

@fedekunze
Copy link
Contributor

Is there any protobuf file to be updated?

not to my knowledge. Should we just close this issue @thomas-nguy?

@thomas-nguy
Copy link
Contributor Author

yes this can be closed

@khoslaventures khoslaventures added this to the Milestone 1: Developer Usability and Testing milestone Jun 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants