Spool directory holds encrypted packets received from remote nodes and queued for sending to them. It has the following example structure:
spool/tmp/ spool/2WHB...OABQ/rx.lock spool/2WHB...OABQ/rx/5ZIB...UMKW.part spool/2WHB...OABQ/tx.lock spool/BYRR...CG6Q/rx.lock spool/BYRR...CG6Q/rx/ spool/BYRR...CG6Q/tx.lock spool/BYRR...CG6Q/tx/NSYY...ZUU6 spool/BYRR...CG6Q/tx/ZI5U...5RRQ
Except for tmp
, all other directories are Base32-encoded node
identifiers (2WHB...OABQ
, BYRR...CG6Q
in our example).
Each node subdirectory has rx
(received, partly received and
currently unprocessed packets) and tx
(for outbound packets)
directories.
Each rx
/tx
directory contains one file per encrypted
packet. Its filename is Base32 encoded BLAKE2b hash of the contents. So
it can be integrity checked at any time. 5ZIB...UMKW.part
is
partly received file from 2WHB...OABQ
node. tx
directory
can not contain partly written files – they are moved atomically from
tmp
.
Only one process can work with rx
/tx
directories at once,
so there are corresponding lock files.