A client with address A signs a raw transaction, and leaves it all ready to be sent, gives it to the server with address B, which later will send it with sendSignedTransaction(...).

What will be the values of:

  • msg.sender

  • tx.origin

EDIT: Notice this is NOT a duplicate of this other question, since in the other question the answers and the questions are oriented towards contract vs. non-contract addresses, whereas here both addresses A and B are not contracts, but in this case A signs and server with address B sends.

  • 1
    Possible duplicate of What's the difference between 'msg.sender' and 'tx.origin'? Commented Jan 19, 2018 at 13:45
  • 1
    Do you know/can explain how we can sign a transaction without sending it?
    – willjgriff
    Commented Jan 19, 2018 at 22:45
  • @willjgriff The situation you are saying is not possible in Ethereum, if A signed the transaction then B cannot sign it again. He can broadcast the transaction on behalf of A.
    – Ismael
    Commented Jan 20, 2018 at 21:30

2 Answers 2


msg.sender and tx.origin will be the same (the account that signed the transaction). Neither relates to which servers were involved in transmitting the data.

  • This must be correct, otherwise there could be issues with anything that relies on msg.sender representing the owner of a public private key pair eg the ERC20 standard.
    – willjgriff
    Commented Jan 19, 2018 at 23:10

The Ethereum Virtual Machine is part of the consensus layer of Ethereum. It does not know anything about nodes or IP addresses, which are part of the network layer of Ethereum.

Therefore, msg.sender and tx.origin must have the same value, regardless of who broadcast it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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