Draft for indexing blocks in leveldb