Disclaimer: this is by all means unfinished work.
This script should be run at most once a day (preferably exactly once a day), and the uid
must be unique. It requires a modified pyFreenet with this patch applied.
To run, first edit fetchpull.py
to set a unique uid
, then:
python2 fetchpull.py
By default, it inserts 100 SSK keys for each of the 8 deltas on each run, where the deltas are given as powers of two (e.g. 1, 2, 4, 8, 16, 32, 64, 128 days), amounting to 800 keys in total. The total insert duration is by default limited to 7200 seconds = 2 hours. All keys that were successfully inserted during that period of time are saved in a pickle for future reference. After inserting, previously inserted keys are fetched for the different deltas (i.e., keys inserted n days ago that were intended to be fetched today, that is, with delta of n days), and the number of successful fetches vs. total keys attempted is saved in a pickle.
It creates several pickle files in the working directory:
- the
keys-<uid>-<day>.pkl
pickle holds the inserted keys on a given day - the
results-<day>.pkl
pickle holds the fetch results for a given day
Here <uid>
is the self-assigned unique ID, <day>
the number of days passed since epoch (January 1st 1970).
In addition, it outputs the results in human-readable form to the standard output. You are advised to output this to some sort of log file for future reference.