Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduce checkpoint file size by 5.8+GB
Further reduction of 4.4+GB is planned for a total reduction of 10.2+GB. (see TODOs at bottom). Leaf node is encoded as: - node type (1 byte) (new in v4) - height (2 bytes) - max depth (2 bytes) - reg count (8 bytes) - hash (2 bytes + 32 bytes) - path (2 bytes + 32 bytes) - payload (4 bytes + n bytes) Encoded payload size also reduced by removing prefix (version 2 bytes + type 1 byte). Interim node is encoded as: - node type (1 byte) (new in v4) - height (2 bytes) - max depth (2 bytes) - reg count (8 bytes) - lchild index (8 bytes) - rchild index (8 bytes) - hash (2 bytes + 32 bytes) Trie is encoded as: - root node index (8 bytes) - hash (2 bytes + 32 bytes) Removed v3 leaf node fields: - version (2 bytes) - left child index (8 bytes) - right child index (8 bytes) - payload version and type (3 bytes) Removed v3 interim node fields: - version (2 bytes) - path (2 bytes) - payload (4 bytes) Removed v3 trie field: - version (2 bytes) Leaf node data is reduced by 20 bytes (2+8+8+3-1). Interim node data is reduced by 7 bytes (2+2+4-1). Trie is reduced by 2 bytes. TODO: remove max depth and reg count fields from both leaf node and interim node types. TODO: reduce hash length from 2 bytes to 1 byte for both leaf node and interim node types.
- Loading branch information