Reading through the Yellow paper, I can see that each block header includes the Keccak 256 hash of the root of the trie for transactions and transaction receipts. I am struggling to understand how and where they are created.
How are the Transactions Trie and the Transaction Receipts Trie related for a given block?
Is it the case that, as the world state is updated by going through the transactions, the transactions and transaction receipts are stored in their respective tries?
Best Answer
Transaction Tries and Transaction Receipt Tries are indeed independent data structures with distinct roots stored on the blockchain header and differ in both purpose and content.
Purpose:
Transaction Tries: records transaction request vectors
Transaction Receipt Tries: records the transaction outcome
Content:
Parameters used in composing a Transaction Trie [details in section 4.3 of the yellow paper]:
Parameters used in composing a Transaction Receipt Trie [details in section 4.4.1 of the yellow paper]: