1

My understanding is that an originating node broadcasts a transaction to its neighbours, who all validate the transaction to ensure (a) the signature is valid and (b) the state change is valid, before broadcasting the transaction to their neighbours. The node at this point does NOT execute the transaction.

Eventually, the transaction would arrive at a mining node which then includes it in a block. If the miner is successful, it broadcasts the block to the network.

Regular nodes will then validate the block and if valid, will execute the transactions within.

Is this correct?

1 Answer 1

0

... and (b) the state change is valid, before broadcasting the transaction to their neighbours. The node at this point does NOT execute the transaction.

Checking that the state transition is valid essentially runs the transaction without persisting any associated state changes. So in a sense, the node would be "executing" the transaction.

However, at this stage, I don't believe non-mining nodes validate the state changes associated with the contents of the transaction pool. It would be too large an overhead for low-powered nodes to do so. (I'll try to find a source for this assertion.)

Regular nodes will then validate the block and if valid, will execute the transactions within.

Yes*. To validate the block they first check the proof of work is correct, then apply the state transitions associated with the block's transactions. (This second step is essentially "executing the transactions".)

(*Note that some mining nodes may be running with a strategy whereby they don't validate the state changes associated with a newly received block. By blindly accepting a block without validating it they can start mining the next block more quickly. Presumably they'll validate it at some point... )

Your Answer

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

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