If I have a function that counts up by 1 every time someone calls it, what happens if 10 people all call the function at the same time, during the same block? Without knowing for sure, I see two possibilities.
A particular sender is chosen to successfully call the function, and then the counter is only increased by 1 1a) If this is the case, what happens to the other 9 senders? Do they get pushed to the next block, hoping to succeed again? This process would repeat until their request expires (TTL) I suppose.
All 10 are able to successfully call the function, and the counter is increased by 10 in the next block. 2a) If this is the case, how is it possible that there are no overlaps on the counting if the counter is not yet submitted to the blockchain? Who gets to increase it from 1->2, 2->3, 3->4 and so on?
Is there something else that happens?