BBVA / qed

The scalable, auditable and high-performance tamper-evident log project
https://qed.readthedocs.io/
Apache License 2.0
95 stars 19 forks source link

Move event hashing out of balloon internals #93

Closed aalda closed 5 years ago

aalda commented 5 years ago

Currently, inserted events get hashed in the Add method before inserting into both trees. This means that the raw event, whose size could be quite large compared with a 32B hash, is first stored in the WAL and then replicated to other nodes of the Raft cluster. We can avoid these unnecessary storage space and network traffic penalties by allowing Balloon to also accept event hashes instead of raw events in the Add method and hashing the events at the HTTP layer, before applying them to the WAL.