github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/storage/pebble/constants.go (about) 1 package pebble 2 3 import "github.com/onflow/flow-go/storage/pebble/registers" 4 5 const ( 6 // checkpointLeafNodeBufSize is the batch size of leaf nodes being read from the checkpoint file, 7 // for use by wal.OpenAndReadLeafNodesFromCheckpointV6 8 checkpointLeafNodeBufSize = 1000 9 10 // pebbleBootstrapRegisterBatchLen is the batch size of converted register values to be written to pebble by the 11 // register bootstrap process 12 pebbleBootstrapRegisterBatchLen = 1000 13 14 // placeHolderHeight is an element of the height lookup keys of length HeightSuffixLen 15 // 10 bits per key yields a filter with <1% false positive rate. 16 placeHolderHeight = uint64(0) 17 18 // MinLookupKeyLen defines the minimum length for a valid lookup key 19 // 20 // Lookup keys use the following format: 21 // [code] [owner] / [key] / [height] 22 // Where: 23 // - code: 1 byte indicating the type of data stored 24 // - owner: optional variable length field 25 // - key: optional variable length field 26 // - height: 8 bytes representing the block height (uint64) 27 // - separator: '/' is used to separate variable length fields (required 2) 28 // 29 // Therefore the minimum key would be 3 bytes + # of bytes for height 30 // [code] / / [height] 31 MinLookupKeyLen = 3 + registers.HeightSuffixLen 32 33 // prefixes 34 // codeRegister starting at 2, 1 and 0 reserved for DB specific constants 35 codeRegister byte = 2 36 // codeFirstBlockHeight and codeLatestBlockHeight are keys for the range of block heights in the register store 37 codeFirstBlockHeight byte = 3 38 codeLatestBlockHeight byte = 4 39 )