We’re currently looking into a couple of improvements to force-move to counteract some front-running attacks. As part of this, we’re proposing to store a couple of different quantities inside a single
In order to do this we’re proposing making the following changes:
Here are some rough size calculations to put these into context:
- There are roughly
2^25seconds in a year.
- A max
2^48 = 2^10 * 2^25 * 2^13would allow for a channel where ~1000 states were exchanged every second for the next 8000 yrs. Which seems like plenty.
- A timestamp of
2^34gets us to Wednesday, May 30, 2514 1:53:04 AM, so even if
finalizesAtstays in seconds,
2^40should be sufficient.
- A hash difficulty level of
2^160is the same as used for ethereum addresses. (Although I don’t know the extent to which having to find a pre-image that is also a valid public key strengthens this.)
- Alternatively, the max hash rate of the Ethereum network to date was 300kGH/s ~= 2^39, so it seems like
2^160is going to be plenty.
Does this seem reasonable? Can anyone think of reasons why any of these quantities needs to be bigger?
Also keen to hear opinions on the smallest values we could get away with. (If we could fit in a couple of turnNumbers into the
bytes32, along with
finalizesAt and the
channelStorageHash, it opens up more options.)