Due to the difficulty bomb it is very hard to estimate block numbers.
Some thoughts from my end (cross post from Slack)
For now you are generally using block.number instead of block.timestamp.
Advantages of what you do:
block.number will always increase by one compared to previous block, this is guaranteed by the protocol.block.timestamp can be minimally gamed by a miner, see here and hereblock.timestamp. Hence I鈥檇 suggest to use block.timestamp (or now) instead of block.number for your crowdsale contract.Thank you for your thoughts @SCBuergel. I agree with all of them. We have done the change (#353) because of the disdvantage you stated, and the reasoning that it's a good trade-off for crowdsales. I'll recap this in the release notes.
Finally.
Months ago I reported that the ethereum team members had agreed that a block time could not be gamed by more than a few seconds. Certainly not the 15 minutes mentioned above.
The original comment was to prevent it being used for things like rand seeds.
Most helpful comment
Some thoughts from my end (cross post from Slack)
For now you are generally using
block.numberinstead ofblock.timestamp.Advantages of what you do:
block.numberwill always increase by one compared to previous block, this is guaranteed by the protocol.block.timestampcan be minimally gamed by a miner, see here and hereDisadvantages:
Given that ICOs usually run over several days, the in-accuracy due to unknown block times is actually higher than the max 15 minutes practical gamable of the
block.timestamp. Hence I鈥檇 suggest to useblock.timestamp(ornow) instead ofblock.numberfor your crowdsale contract.