Open countvonzero opened 1 year ago
i think this excerpt is not sufficient to say that we specified it :). beside this part there is also other consensus code that might not be doing the best thing.
this is a multistep process. one step is to encode ballot weight into block. second step is to distribute issuance according to those weights. in both steps we are using big.Rat.
beacon uses big.Float and big.Rat for some computations.
vesting uses big.Int. i probably just need to check if we can compute same thing using u64 without overflow. issuance is independent from implementation, we could create schedule using matlab or anything.
tortoise uses fixed72/56 for counting weight, including thresholds. would be nice to switch to u64
scale=7 bits is enough to fit issuance per layer. need to double check this. the question is how do we want to encode user_weight. right now it is represented as rational number (with u64 for numerator and denominator). computed as atx_weight ballot_eligibilities / total_eligibilities. do we want too keep only one u64, so computation will be floor(atx_weight ballot_eligibilities / total_eligibilities). it definitely will not overflow, but we will loose some precision
Regarding issuance per layer, see https://github.com/spacemeshos/economics/blob/main/tenyears.txt. The highest issuance is in the earliest layer, and it's around 477 SMH or 477e9 smidge per layer. This would unfortunately require 39 bits to fully represent.
In [6]: math.log(477e9,2) Out[6]: 38.795198309991775
Description
from Iddo
from Tal