casper icon indicating copy to clipboard operation
casper copied to clipboard

deposit_scale_factor might be zero

Open pirapira opened this issue 8 years ago • 3 comments

In initialize_epoch, new deposit_scale_factor is computed as:

    self.consensus_messages[epoch].deposit_scale_factor = something * (1 - 2 * base_coeff)

This can be zero because base_coeff can be 0.5:

    base_coeff = 1.0 / sqrt * (self.reward_at_1m_eth / 1000)

when sqrt happens to be 160.

This seems like a problem because sometimes deposit_scale_factor divides some other scaling factors.

pirapira avatar Apr 20 '17 16:04 pirapira

nice catch

krtschmr avatar May 07 '17 05:05 krtschmr

Perhaps to solve this cleanly, we just do something like resize_factor = min(resize_factor, 0.9)?

vbuterin avatar Aug 24 '17 06:08 vbuterin

I need to draw graphs to figure out what's going on.

pirapira avatar Aug 30 '17 16:08 pirapira