eth-cache

Ethereum chain data caching tools
Info | Log | Files | Refs | LICENSE

README.lmdb.md (1194B)


      1 # Storage paths
      2 
      3 
      4 ## Content prefixes
      5 
      6 | file cache path | lmdb cache key | content |
      7 |---|---|---|
      8 | `block/src/<block_hash_hex_leveldir>` | `block/src/<block_hash_bytes>` | block json source |
      9 | `block/num/<block_number_int_leveldir>` | `block/num/<block_number_int_bytes_be>` | block hash (32 bytes) |
     10 | `block/hash/<block_hash_hex_leveldir>` | `block/hash/<block_hash_bytes>` | block number (8 bytes) |
     11 | `tx/src/<tx_hash>` | `tx/src/<tx_hash_bytes>` | tx json source | 
     12 | `tx/raw/<tx_hash>` | `tx/raw/<tx_hash_bytes>` | tx rlp (bytes) |
     13 | `rcpt/src/<tx_hash>` | `rcpt/src/<tx_hash_bytes>` | tx receipt json source |
     14 | `address/<address_hex_leveldir>/<tx_hash_hex>` | `address/<address_bytes>/<tx_hash>` | none |
     15 
     16 The address index has no content, and it has one key/file per transaction hash associated with the address.
     17 
     18 ## Leveldir
     19 
     20 ## hex
     21 
     22 Two first bytes became two nested directory named after the byte value.
     23 
     24 
     25 | value | path |
     26 |---|---|
     27 | `2B10B3DF...BCEF9D9B` | `2B/10/2B10B3DF...BCEF9D9B` |
     28 
     29 
     30 ## number
     31 
     32 Two nested directories segment numbers in 100000 and 100 strides respectively.
     33 
     34 | number | path |
     35 |---|---|
     36 | 12345678 | 12300000/12345000/12345678 |
     37 | 98654 | 0/98000/98654 |