0
votes

As I understand, transaction receipts contain the outcomes of transactions, the point I do not clear is the order, is the order:

transaction -> consensus -> execution -> receipt 

or

transaction -> execution -> receipt -> consensus  

Another way to ask, dose ethereum consensus over inputs of contracts or over outputs of contracts, What would happen if two different nodes got different outcomes of same input on same contract(eg. calculation based on time)?

2

2 Answers

1
votes

As the transaction arrives, the first step is the validating the transaction. This includes checking transaction signature, transaction sender , nonce etc. Once the transaction is verified. Its ready to be executed and this job is done in state transition. If the transaction is successful it is added in state trie and transaction receipt is added to the receipt trie. State Trie and receipt trie are both present in the block header then the consensus occur on the block level.

0
votes

What would happen if two different nodes got different outcomes of same input on same contract(eg. calculation based on time)?

Consenus is built to solve these problems ( image that happens all the time, so we don't know which nodes are ''lying''). So I suppose this is desired answer:

transaction -> execution -> receipt -> consensus