cothority icon indicating copy to clipboard operation
cothority copied to clipboard

Calculation of block size uses wrong block-time

Open ineiti opened this issue 4 years ago • 0 comments

When collecting ClientTransactions the routine makes sure that the block doesn't get too big. For this to work it applies one ClientTransction after another to the current. However, two things are not done properly:

  1. Every ClientTransaction is applied to a clean state, not taking into account eventually queued up ClientTransactions
  2. It uses the wrong timestamp for the block, now, where it should be the time set by the leader later

This means that the size of the final block might be off:

  1. a ClientTransaction that depends on another ClientTransaction in the same block might produce fewer or more StateChanges
  2. a ClientTransaction that creates a different set of StateChanges depending on the time will produce fewer or more StateChanges

Anyway, the attack surface is deemed very little, but it's still written down here...

ineiti avatar Nov 12 '20 14:11 ineiti