You are here

GNUnet's PEERSTORE subsystem

Primary tabs

GNUnet's PEERSTORE subsystem offers persistent per-peer storage for other GNUnet subsystems. GNUnet subsystems can use PEERSTORE to persistently store and retrieve arbitrary data. Each data record stored with PEERSTORE contains the following fields:

  • subsystem: Name of the subsystem responsible for the record.
  • peerid: Identity of the peer this record is related to.
  • key: a key string identifying the record.
  • value: binary record value.
  • expiry: record expiry date.


Subsystems can store any type of value under a (subsystem, peerid, key) combination. A "replace" flag set during store operations forces the PEERSTORE to replace any old values stored under the same (subsystem, peerid, key) combination with the new value. Additionally, an expiry date is set after which the record is *possibly* deleted by PEERSTORE.

Subsystems can iterate over all values stored under any of the following combination of fields:

  • (subsystem)
  • (subsystem, peerid)
  • (subsystem, key)
  • (subsystem, peerid, key)

Subsystems can also request to be notified about any new values stored under a (subsystem, peerid, key) combination by sending a "watch" request to PEERSTORE.


PEERSTORE implements the following components:

  • PEERSTORE service: Handles store, iterate and watch operations.
  • PEERSTORE API: API to be used by other subsystems to communicate and issue commands to the PEERSTORE service.
  • PEERSTORE plugins: Handles the persistent storage. At the moment, only an "sqlite" plugin is implemented.