Which one of the following sentences is correct? and why?
"The protocol ensures that only when all the clients agree can the server compute the result."
"The protocol ensures that only when all the clients agree the server can compute the result."
Which one of the following sentences is correct? and why?
"The protocol ensures that only when all the clients agree can the server compute the result."
"The protocol ensures that only when all the clients agree the server can compute the result."
The first is correct. The first denotes that the clients agree on something, and then the server can compute. The second denotes that the clients are agreeing about the server computing.
You could make the second one correct by changing the sentence around:
"The protocol ensures that the server can compute the result only when all the clients agree."