Ⓐ

Numbers

Big and Bigger

Within the AO protocol, all counted things are represented by integers or rational fractions aka the ratio of two integers. Internally, these integers are represented by 64 bit signed integers, or when that's not big enough, by arbitrarily large integers handled by the GMP library.

Floating point numbers may be used in user interface representations of rational fractions, but calculations are performed to obtain exact results which can be duplicated on a wide variety of hardware and software which may be cross checking the calculations.
*Originally, 128 bit integers were considered for the larger numbers, but even those are too small for some reasonable applications, and they are also problematic when porting to various computer architectures - the GMP library, while cumbersome, is more portable than __int128.

Storage

Both 64 bit integers and GMP integers are stored in key-value form where a 64 bit key
*stored as variable byte code
preceeds the data, with the data format indicated by the key value: 64 bit integers are stored as variable byte code, GMP integers and fractions use a different
*more compact for larger numbers
encoding.

Time

Time is expressed in Unix Time encoded in a signed 64 bit integer, with the seconds multiplied by 189,000,000.
*this encoding places the storage value rollover event approximately 1,500 years in the future.
The 189,000,000
*Why 189? 189 is 3x3x3x7, enabling even division by any number up to 10, and many more common larger numbers.
divisions are used to ensure that events generated on a single server are given a strictly increasing sequence in time - while events coming from multiple sources may be recorded as simultaneous, no two events recorded by a single actor may be marked as simultaneous.
*Regarding leap second concerns the only rule for AO protocol is that events must be sequential in represented time. One might condsider a leap second to be a brief trading halt, or if one must trade during the leap second, the software must simply assure monotonically increasing time numbers for all time records.
It is expected that actual clock times accurate to the millisecond will be used, and for events which are generated in the same millisecond of clock time, their timestamps will be adjusted to place them in proper sequence when considering the smaller divisions of time. When time values are stored, they are stored as straight 8 byte big endian storage of the integer.