This is actually not correct to count messages according to “f” value. In the general case, there will not be any “faulty” nodes. The correct way to count messages for PBFT should be:
- Request — 1
- Pre-prepare — n-1
- Prepare — n**2-n
- Commit — n**2
- Response — n
- Total — 1 + n-1 + n**2-n + n**2 + n = 2n**2 + n
So, for example, for 7 replicas it should be 2*7**2+7 = 105, for 10 replicas it should be 2*10**2+10 = 210 and so on.
Why this is more correct than calculating value according to faulty nodes? Because if a node is a “byzantine-faulty” it doesn’t mean it won’t send any messages. It can send any amount of messages to prevent the system from reaching consensus. And smart “byzantine-faulty” node will play strictly by rules until some critical state will be reached when it will do its dirty stuff. So, you actually getting “minimum” of messages when you do it this way. And you also represent actual bandwidth degradation (which is worse in this case).