If it were possible to know what other contracts a contract can invoke by any means (either through direct references hard-coded in the contract or through dynamic invoke calls), then it would be possible to safely support parallel contract execution. This would be possible since it could be verified that the call chains of two contracts would not collide on a common contract that could have had its state changed depending on the order the contracts are run.
Suppose that all contracts that will call any other contract by any means required having a contract owner explicitly set what contract hashes could be invoked dynamically. It could be argued that they would no longer be 100% dynamic anymore, but they would still be dynamic since additional contracts could be called from a contract after it's deployment if the owner explicitly adds an additional contract hash. As it is most contracts that do any type of dynamic invoke already require the concept of a contract owner to whitelist contracts that can be called; this would just make that process more defined so that neo implementations can know this information for purposes of parallel execution.
Required changes:
- Addition of a contract owner for contracts that will call any other contract
- A new transaction type that can be called by a contract owner to add or remove hashes that can be invoked by a specified contract
If it were possible to know what other contracts a contract can invoke by any means (either through direct references hard-coded in the contract or through dynamic invoke calls), then it would be possible to safely support parallel contract execution. This would be possible since it could be verified that the call chains of two contracts would not collide on a common contract that could have had its state changed depending on the order the contracts are run.
Suppose that all contracts that will call any other contract by any means required having a contract owner explicitly set what contract hashes could be invoked dynamically. It could be argued that they would no longer be 100% dynamic anymore, but they would still be dynamic since additional contracts could be called from a contract after it's deployment if the owner explicitly adds an additional contract hash. As it is most contracts that do any type of dynamic invoke already require the concept of a contract owner to whitelist contracts that can be called; this would just make that process more defined so that neo implementations can know this information for purposes of parallel execution.
Required changes: