Since Smart Contracts can call multiple contracts, is there a chance that smart contracts enter a gridlock situation?
Asked
Active
Viewed 95 times
1
-
Deadlocks are discussed here: https://ethereum.stackexchange.com/questions/4564/can-you-execute-a-contract-twice-in-one-block – Richard Horrocks Apr 08 '18 at 15:07
1 Answers
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