1

Since Smart Contracts can call multiple contracts, is there a chance that smart contracts enter a gridlock situation?

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145
Nathan Aw
  • 1,954
  • 12
  • 27

1 Answers1

1

No.

Transactions a well-ordered and execute serially. Contracts can call other contracts, which passes flow control to the other contract.

Although they can be logically entangled (parent do child.method(), and child do parent.method()) there is no wait loop so those methods either return or fail.

The block gasLimit is the outer bulwark against the "halting problem". A transaction that does not complete "on budget" is deemed failed.

Have a look over here for more discussion of concurrency: What is the order and concurrency behavior of multiple calls to a contract in a single transaction?

Hope it helps.

Rob Hitchens
  • 55,151
  • 11
  • 89
  • 145