0

When someone is simply sending ETH from one address to another, and assuming that person does not include a custom message in the transaction, then what exactly is the message that is sent on the network used to sign the transaction?

When reading the basis of how message signing works, I found that the following method and formula is used:

sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message)))

...but if the signer does not include a message and only sends ETH, or perhaps maybe just uses MetaMask to send funds, what exactly does the message become?

(Side note: Doing a transaction decode shows that "data" field is simply "0x," but not sure if this data field is also correlated to the message itself or not).

0

All Ethereum transaction contains a data field. This field can be

  • Empty

  • A payload to call a smart contract function

  • Any user given message

The payload in the data field is separate for signing a message. A signed message can be transferred offchain, like email and copy paste, and does not need to be a part of a transaction.

2
  • 1
    When empty, does it still contain the "\x19Ethereum Signed Message:\n" prefix embedded as part of the raw transaction data? Jun 23 at 11:41
  • No. What you are referring to is the message signing preamble and its purpose is to differ signed Ethereum transactions from signed Ethereum messages (cannot have the same hash). Jun 23 at 14:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.