one-way-compaction
v1.0.1
Published
compact and randomly reorder a log of key-value put and delete operations
Downloads
7
Readme
Given a log in which each entry is a put or delete operation affecting a key-value store:
Compact the log, producing a new log containing only put operations for still-existing keys with latest values.
Shuffle the log using a provided one-way function (hash function) to seed a pseudo-random number generator.
This package was motivated by the need to replicate a grow-only set using a log while obscuring the ordering of operations. Replicating peers can independently verify that a log compacted in this way reflects the state resulting from a slice of the shared log. Future peers can replicate the compacted log, rather than the entire log.