/ crates / tor-hsservice / src / state_dir.md
state_dir.md
 1  # LISTING OF AN ARTI STATE DIRECTORY for planning `state_dir.rs`
 2  
 3  TODO HSS delete these random notes at some point
 4  (possibly after making extra docs somewhere about these things?)
 5  
 6  ```text
 7  keymgr
 8  
 9      keystore/
10  
11  dirmgr
12  not in state/ because ???
13  storage.rs ad hoc sqlite3
14  EXPIRY built-in
15  
16  	dir_blobs/
17  	dir_blobs/con:microdesc:sha3-256-3f4d5d6519d51b20d7161d3f12cb7e23114d0f0f4d252a73077dfe9719011962
18  	dir.sqlite3
19  
20  tor_persist
21  FsStateMgr
22  .local/share/arti/state.lock
23  
24  	state/
25  	state/state.lock
26  
27  guardmgr
28  via storage handle
29  EXPIRTY singleton
30  
31  	state/guards.json
32  
33  circmgr?
34  via storage handle
35  EXPIRTY singleton
36  
37  	state/circuit_timeouts.json
38  
39  ipt_mgr x2
40  via storage handle
41  *no* lock against multiple instantiation of same HS
42  EXPIRTY needs to linked to hs (ie to instance)
43  
44  	state/hs_iptpub_ztest.json
45  	state/hs_ipts_ztest.json
46  
47  ?
48  not per instance ?
49  should it be ?
50  no locking ?
51  	pt_state/
52  
53  ?
54    3161169      0 -rw-r--r--   1 rustcargo rustcargo        0 Apr 28  2022 .local/share/arti/state.lock
55  	state.lock 
56  
57  HS IPT replay log
58  ad-hoc via Path
59  lock against multiple instantiation of same HS
60  secondary internal lock via mutex
61  EXPIRY whole dir needs to be linked to hs
62  EXPIRY needs internal expiry mechanism too
63  
64  	hss_iptreplay/
65  	hss_iptreplay/replay_ztest/
66  	hss_iptreplay/replay_ztest/lock
67  	hss_iptreplay/replay_ztest/9aa9517e6901c280a550911d3a3c679630403db1c622eedefbdf1715297f795f.bin
68  	hss_iptreplay/replay_ztest/92d897263497b7e9f998bc7b14cb60a09bfb1beb418cc8266b7e1cc36709b3bf.bin
69  	hss_iptreplay/replay_ztest/816885a3bf50c90f659304406bde9df0ec926c4b62c556a423b0f6ee7e646c0c.bin
70  	hss_iptreplay/replay_ztest/62355f8672a24cd76e3f6f769fdb66f829aca898824f88cd16f5dca12cab0fd1.bin
71  	hss_iptreplay/replay_ztest/7c3bc3ff6f8737b29bc54fd2dd0addf598dad2b69a3993e9f962c512fa42d6f7.bin
72  	hss_iptreplay/replay_ztest/a35dab4c73c2a2492833c38ea127eb64dfd62b03104b570cd303069e45db9cbb.bin
73  
74  ```