8

When smart contracts launch, will every node (relay and producer) have to execute all contracts executions, and therefore all see the same increase in resource usage?

My inkling is that they have to (to ensure the blocks are valid), although I wondered if there was some clever way to avoid this I hadn't considered.

1 Answer 1

7

The validation of the state change of a smart contact in the eUTXO model is done when accepting the transaction. When a node validates a transaction, the node determines if the transaction is allowed to use a certain output as an input. The transaction will look up the script provided by the output's address and will execute the script if the transaction can use the output as an input. The node can validate multiple transactions in parallel if they are not consuming the same input.

References:

2
  • So, does every node in the chain has to do all those stuff? May 2, 2021 at 22:26
  • @JelilAkjaly Perhaps only the block minting node needs to do it, creating resulting transactions in the mempool. Then another minter validates those transactions and so on...
    – emesik
    May 6, 2021 at 20:07

Your Answer

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

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