Write-write conflict #230
-
Discord user IDNo response Describe your question in detail.Issue:
What error, if any, are you getting?No response What have you tried or looked at? Or how can we reproduce the error?public fun function_xyz( … )
Which operating system are you using?Linux (Ubuntu, Fedora, Windows WSL, etc.) Which SDK or tool are you using? (if any)TypeScript SDK Describe your environment or tooling in detailNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hey there @Gurshaan7, I have clarifying questions, if you don't mind. Are you asking if two individual TXs can be ran in parallel against the same code? And furthermore, when the two TXs are resolved in parallel, if the effects (write) of one TX can cause unintended side-effects in the other, mid execution? Am I understanding your questions correctly? |
Beta Was this translation helpful? Give feedback.
-
Two transactions with a read-write conflict are run sequentially unless they use Aggregators. Aggregators, as detailed in AIP-47, enable simple counters to run in parallel. In your case, which I assume is a DEX swap transaction, the two transactions with a read-write conflict will run sequentially. If you're interested in reading more about how parallel workloads are handled in Aptos, you can read more here. |
Beta Was this translation helpful? Give feedback.
Two transactions with a read-write conflict are run sequentially unless they use Aggregators. Aggregators, as detailed in AIP-47, enable simple counters to run in parallel.
In your case, which I assume is a DEX swap transaction, the two transactions with a read-write conflict will run sequentially.
If you're interested in reading more about how parallel workloads are handled in Aptos, you can read more here.