You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the context of smart contract execution, synchronous call refers to the ability to pause the current contract's execution, execute another contract, and then resume the initial contract's execution with the results from the called contract. Protocols like Ethereum and Solana support synchronous calls. However, in the case of Cosmos, the execution of the current context is terminated, and sub-messages are used to trigger the execution of other contracts. If the result needs to be processed further, it must be handled in a reply entrypoint.
Synchronous calls enable several use cases, such as flash loans, but they also come with risks. Without a thorough understanding and careful implementation, they can open up vulnerabilities like reentrancy attacks.
In the case of Noir, the support for Cross-VM calls introduces additional considerations. It is crucial to evaluate what type of synchronous call mechanisms, if any, should be permitted.
Alternatives for Cross-VM Call Implementation:
Allow full synchronous calls
This approach provides maximum flexibility but increases complexity and the potential for vulnerabilities, such as reentrancy.
Allow synchronous calls only for read-only operations
This strikes a balance by enabling limited synchronous interactions without the risk of modifying state during the cross-VM call.
Disallow synchronous calls entirely
Adopt an approach similar to Cosmos, where cross-VM calls are handled through a message-passing mechanism, avoiding the risks associated with synchronous calls.
Each option has its trade-offs in terms of usability, security, and performance. A careful analysis is necessary to determine the best approach for Noir while aligning with its goals and maintaining a secure environment.
The text was updated successfully, but these errors were encountered:
Description
In the context of smart contract execution, synchronous call refers to the ability to pause the current contract's execution, execute another contract, and then resume the initial contract's execution with the results from the called contract. Protocols like Ethereum and Solana support synchronous calls. However, in the case of Cosmos, the execution of the current context is terminated, and sub-messages are used to trigger the execution of other contracts. If the result needs to be processed further, it must be handled in a
reply
entrypoint.Synchronous calls enable several use cases, such as flash loans, but they also come with risks. Without a thorough understanding and careful implementation, they can open up vulnerabilities like reentrancy attacks.
In the case of Noir, the support for Cross-VM calls introduces additional considerations. It is crucial to evaluate what type of synchronous call mechanisms, if any, should be permitted.
Alternatives for Cross-VM Call Implementation:
Allow full synchronous calls
This approach provides maximum flexibility but increases complexity and the potential for vulnerabilities, such as reentrancy.
Allow synchronous calls only for read-only operations
This strikes a balance by enabling limited synchronous interactions without the risk of modifying state during the cross-VM call.
Disallow synchronous calls entirely
Adopt an approach similar to Cosmos, where cross-VM calls are handled through a message-passing mechanism, avoiding the risks associated with synchronous calls.
Each option has its trade-offs in terms of usability, security, and performance. A careful analysis is necessary to determine the best approach for Noir while aligning with its goals and maintaining a secure environment.
The text was updated successfully, but these errors were encountered: