array_index is 32 bit, will require expansion.
evoskuil opened this issue · 3 comments
block/header_index/table, transaction_index, and address_table/rows all use array_index for records. block/header_index/table are safe for a very long time, but the others may require updating to higher domain offsets. This is based on the number of records, not the file/data size. If the record count reaches 2^32 the domain must increase (to 2^40). 2^24 (3 bytes) is too small for any of these record sets.
This can be resolved by changing the way file_offset records are stored. the maximum file size dictates the largest necessary size of the file_offset pointer. This size does not have to correspond to 32 or 64 bit boundaries, since these are not pointers but a sequence of bytes on disk. So any number of bytes up to 8 is easily mapped to memory. Similarly the array_size constant can be varied with the template definition.
This also applies to optimization of 64 bit slabs (tx table), which can be safely reduced to 40 bits.
Resolved in v4 with configurable link template arg.