You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Token amounts (AttoFil) are currently encoded as an integer number of units, each of which represents 10**-18 FIL. Since most values aren't going to be that small it makes sense to serialize to scientific notation to save space. Note that this issue does not refer to changing the AttoFil representation which is a big.Int quantity of attofilecoin. This issue refers to changing the serialized format to be a (varint-encoded signficand, uint8 exponent) pair where the value represented is equal to significand * 10 ** exponent units (where each unit is still 10**-18). You basically just clear trailing zeros of the number to be serialized and add them to the exponent (that is, while the quantity mod 10 is 0, divide it by ten and add one to the exponent).
Token amounts (AttoFil) are currently encoded as an integer number of units, each of which represents 10**-18 FIL. Since most values aren't going to be that small it makes sense to serialize to scientific notation to save space. Note that this issue does not refer to changing the AttoFil representation which is a big.Int quantity of attofilecoin. This issue refers to changing the serialized format to be a (varint-encoded signficand, uint8 exponent) pair where the value represented is equal to
significand * 10 ** exponent
units (where each unit is still 10**-18). You basically just clear trailing zeros of the number to be serialized and add them to the exponent (that is, while the quantity mod 10 is 0, divide it by ten and add one to the exponent).https://docs.google.com/document/d/12xNPzVCPSC2bTv7myxNRoMGx79AqFHQb89LfmRcFpGc/edit#bookmark=id.ufk10xbo7xb
The text was updated successfully, but these errors were encountered: