Open pirapira opened 7 years ago
In initialize_epoch, new deposit_scale_factor is computed as:
initialize_epoch
deposit_scale_factor
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
base_coeff = 1.0 / sqrt * (self.reward_at_1m_eth / 1000)
when sqrt happens to be 160.
sqrt
This seems like a problem because sometimes deposit_scale_factor divides some other scaling factors.
nice catch
Perhaps to solve this cleanly, we just do something like resize_factor = min(resize_factor, 0.9)?
resize_factor = min(resize_factor, 0.9)
I need to draw graphs to figure out what's going on.
In
initialize_epoch
, newdeposit_scale_factor
is computed as:This can be zero because
base_coeff
can be 0.5:when
sqrt
happens to be 160.This seems like a problem because sometimes
deposit_scale_factor
divides some other scaling factors.