0

The hash of a transaction is computed by serializing it and then hashing that. How are transactions serialized?

Specifically, knowing that this is the data structure of a transaction, what fields are included in the serialized transaction, and in what order?

  • It's the fields in the answer you linked to, in the order they appear in the answer you linked to. – user19510 May 4 '18 at 3:01
  • Obviously I need to read the links that I link to. Once I am fully convinced, I'll go ahead and answer this question and accept my answer. – jcarpenter2 May 4 '18 at 5:40
  • The linked answer is correct, you can verify it using the yellow paper ethereum.github.io/yellowpaper/paper.pdf (section 4.2). There is one minor addition not mentioned (because the structure of the message itself does not change). The yellow paper differentiates between two types of transactions: Message calls and contract creations. For message calls, the recipient address must not be empty and the message can contain arbitrary data. For contract creations, the recipient address must be empty and instead of arbitrary data, you include the contract initialization data. – sea212 Oct 27 '18 at 10:58

Your Answer

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

Browse other questions tagged or ask your own question.