zebra/book
Jane Lusby 4c9bb87df2
zebra-state: replace sled with rocksdb (#1325)
## Motivation

Prior to this PR we've been using `sled` as our database for storing persistent chain data on the disk between boots. We picked sled over rocksdb to minimize our c++ dependencies despite it being a less mature codebase. The theory was if it worked well enough we'd prefer to have a pure rust codebase, but if we ever ran into problems we knew we could easily swap it out with rocksdb.

Well, we ran into problems. Sled's memory usage was particularly high, and it seemed to be leaking memory. On top of all that, the performance for writes was pretty poor, causing us to become bottle-necked on sled instead of the network.

## Solution

This PR replaces `sled` with `rocksdb`. We've seen a 10x improvement in memory usage out of the box, no more leaking, and much better write performance. With this change writing chain data to disk is no longer a limiting factor in how quickly we can sync the chain.

The code in this pull request has:
  - [x] Documentation Comments
  - [x] Unit Tests and Property Tests

## Review

@hdevalence
2020-11-18 18:05:06 -08:00
..
src zebra-state: replace sled with rocksdb (#1325) 2020-11-18 18:05:06 -08:00
theme Use zebra favicon for zebra.zfnd.org book 2020-08-29 03:33:31 -04:00
.gitignore Add skeleton of eventual zebra book (#653) 2020-07-17 20:15:50 -07:00
book.toml Add skeleton of eventual zebra book (#653) 2020-07-17 20:15:50 -07:00
firebase.json Add skeleton of eventual zebra book (#653) 2020-07-17 20:15:50 -07:00