2

There can be multiple transactions may executed inside a block. The states that are changed by those transactions may or may not be dependent to each other.

[Q] How should a winner miner execute those transaction such as synchronously or asynchronously?

For example, is each transaction executed inside the EVM should be a atomic instruction, where when a transaction is taking place, should all states (World-State) not interpreted by any other transaction?

Thank you for your valuable time and help.

3

Yes, transactions are executed individually and serially ("atomically") by the miner when constructing a block. Each transaction sees the blockchain state as it was left by the previous transaction. There is no concurrency; a single transaction is executed at a time.

It's worth noting that a miner can include transactions in a block in any order (but transactions from the same account will only execute in the correct Nonce order).

This may change in future. There is an EIP #648 under discussion that proposes allowing miners/nodes process transactions in parallel. But in order to do this there will be a mechanism to ensure that there is no dependency between the transactions (i.e. they are reading from and writing to disjoint sets of accounts). So the end result is equivalent to executing them serially, but it could be faster to process.

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.