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?

Shane Fontaine
  • 18,036
  • 20
  • 54
  • 82
jcarpenter2
  • 141
  • 4
  • It's the fields in the answer you linked to, in the order they appear in the answer you linked to. – user19510 May 04 '18 at 03: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 04 '18 at 05:40
  • The linked answer is correct, you can verify it using the yellow paper https://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

0 Answers0