I’m trying to wrap my head around how parallelization works in Fuel.
I understand that the contract id is permanent, and that this is the only property over which users sign transactions (
stateRoot , and
txPointer are initialized to zero).
But how does parallelization work in this case? Suppose you have a contract Foo, two users Alice and Bob, and two transactions like this:
- Alice sends a tx to Foo
- Bob sends ax to Foo
These transactions will necessarily have to run on the same thread, won’t they?
I think this section of the spec might help you to grasp around it.
As seen in the spec, values such as txID, outputIndex are set after the base sanity checks
Let me know if you need further explanation!
Key part of the link @sandusky shared is this:
The validity rules below assume sequential transaction validation for side effects (i.e. state changes). However, by construction, transactions with disjoint write access lists can be validated in parallel, including with overlapping read-only access lists. Transactions with overlapping write access lists must be validated and placed in blocks in topological order.
So in the example you sent, you’re correct that the two transactions would have to be executed in serial.
This is one reason Fuel uses native assets: so that asset transfers can be processed in parallel, and don’t require access to the contract that minted them.
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.