-
Notifications
You must be signed in to change notification settings - Fork 0
/
TODO
558 lines (488 loc) · 24.5 KB
/
TODO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
xlReg_go/TODO
2016-11-15
* modify xlReg server so that if only -a 127.0.0.1 option is
specified it does NOT listen on its global interface
- AND regCred.dat has the 127.0.0.1 address
2016-06-02
* need a standard script to run xlReg detached, at least * DONE
nohup xlReg &> /dev/null & * DONE
2015-11-26
* missing links from README.md/index.md to ghpDoc/*md * FIXED
2015-10-02
* get rid of "error = <nil>" messages in test runs * DONE
* URGENT: need v1.9.10 on public xlReg servers * DONE
2015-06-01
* consider conforming to:
http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
* the server should write its PID to a well-known place, such as * DONE
/tmp/xlReg/pidFile * DONE
* improve ~/bin/start.xlreg so that it can be run either by ubuntu
or root
2015-04-26
* SERIOUS problem with NewInHandler and CnxHandler: the CnxHandler * FIXED
embeds an AesSession, but this is created before handleHello * FIXED
has negotiated keys with the client! The embedded session * FIXED
should of course be the sSession created by ServerDecryptHello * FIXED
* code rejigged to suit new aes_cnx API, but definitely in_handler
and memberNode need cleanup
- all use of CnxHandler should be inspected
2015-04-25
* need to review bootstrap.go
- and either integrate it into this package
- or return it to xlCluster_go if that is appropriate
- it will need a bootstrap_test.go
2015-04-24 (-23,22 edited)
* write aes_cnx_test.go * DONE
- notion of session key should be retained * YES...
- need per-message encrypters and decrypters * DONE
* these should not reside in the data structure * MAYBE
* rename aes_cnx.go cnxHandler.go * DONE
* rework to use xa = xlProtocol_go/aes_cnx for all AES stuff * DONE
* gut aes_cnx_test.go, turn remnants into cnxHandler_test.go * DONE
* cnxHandler_test has parties A and B and three phases:
- A (client) uses xa.helloAndReply OAEP pass AES Key1 to B,
then sets up its end of a one-shot AES half-circuit
- B uses the other end of the half-circuit to send Key2 to A,
then sets up its end of the permanent circuit (using Key2)
- A sets up its end of the Key2 circuit
- then the two exchange random messages for a few iterations
* then we rework the existing code as necessary to make the
memberNode/regServer comms follow the same pattern as A and B
- correct memberNode.go
- correct in_handler.go
* XXX xlReg passes its tests but PANICS if I run tests in upax_go
2015-04-17 (edited from -16)
* change code to agree with current xlProtocol/aes_cnx/helloAndReply* DONE
specifically to remove iv1 and iv2 from various data structures * DONE
and argument lists; IVs should be generated locally as needed * DONE
- in_handler.handleHello * DONE
- MemberNode.SessionSetup * DONE
2015-04-15
* xlReg on Portland needs to log all accesses
* xlReg needs to have a default timeout on all sessions
- and all timeouts need to be logged
* if -v option set, all interactions with the outside world
must be logged
2015-04-11
* gh-pages site needs link to plain-text version of regCred.dat
for portland = xlreg.xlattice.org
- so can update regCred.dat without updating index.html
2015-04-11 (edited from 2014-12-27)
* need a tool which verifies that the regCred.dat embedded in
http://jddixon.github.io/xlreg_c/ is valid
2015-04-10
* FIX: registry_test.go is empty !
* add notion of GlobalAddress and so GlobalEndPoint for use with * DONE
eg servers on the Amazon EC2 cloud, which have local addresses * DONE
in private address space (192.168/16) and global addresses * DONE
which are not otherwise known to the server * DONE
2015-04-09
* portlandRegCred_test reports no errors but there is no evidence * OK
that it succeeds: in particular there is no corresponing entry * OK
in the log on Portland (=xlreg.xlattice.org) * OK
* this makes questionable the results of solo_client_test.go * FALSE
* to listen on all interfaces, the server should use 0.0.0.0:56789 * DONE
* CRITICAL ERROR: started server (xlReg) with -a 0.0.0.0 but * FIXED
TcpAcceptor is 127.0.0.1:56789 * FIXED
* if eph_server_test is set to run on 0.0.0.0:56789, it displays * FIXED
the address as [::] and then panics in * FIXED
xlTransport_go/v4_address.go:100 * FIXED
2015-04-08
* regCred.dat on remote servers must report the public IP address * DONE
of the server OR its fully qualified domain name * DONE
* XXX FIX PANIC: portlandRegCred_test.go, data in file junk * DONE
2015-03-28
* xlreg.xlattice.org resolves to www.xlattice.org (= portland) * OK
* nobody's listening at http://54.186.197.123:56789 * FIXED
- after fix telnet 56789 still returns Connection refused * FIXED
* need test program to verify that xlReg is running on Portland
and regCred.dat data is correct
2014-12-27
* xlReg around line 248 calls Node.OpenAcc(), CloseAcc needs to
be called
2014-11-26
* copy paxos_go/pktComms as xlReg_go/pktComms * DONE
- later delete this subdir from paxos_go * DONE
2014-11-25
* move paxos_go/pktComms/bootstrap.go into this package * DONE
* on the current host, given (a) regCred.dat describing the xlReg
server, (b) the details of the prospective cluster member,
and (c) the cluster name and/or ID, the Bootstrapper contacts
the xlReg server, joins the cluster, and saves the node
configuration in LFS/.xlattice/config.
* create command xlRegJoinAndSave which invokes
NewBootstrapper(), saving the configuration as described
* create Python script xgJoinAndSave with the same functionality
* create Python script xgList which lists (initially) clusters and
optionally clusterMembers
2014-11-24
* need to further improve handling of node acceptors, possibly
renaming Node.Run() to Node.OpenAcc() and Node.Close() to
Node.CloseAcc(), and then eg AdminClient.Start() paired with
AdminClient.Stop()
2014-11-23
* eph_server_test, about line 55: after es.Start(), server has * FIXED
a non-zero acc port, but GetEndPoint(0) returns port zero * FIXED
2014-11-21
* rename EphServer.Run() EphServer.Start() * DONE
* likewise for AdminClient() * DONE
* BUG: line 65, eph_server.go: rn is nil XXX * FIXED
2014-11-18
* look for unused error codes * DONE
* verify consistency of xlreg_errors.go, xlreg_error_str.dat, * DONE
xlreg_error_str.go * DONE
* sed script to generate xlreg_error_{const,names,str}.dat from
xlreg_errors.go
- sed script gets added to Makefile
2014-11-17
* split xlCluster_go from xlReg_Go * DONE
* gocheck_test.go makeAMemberInfo() belongs in xlCluster_go
2014-11-16
* add real testCluster_test.go, verify that serialization and * SKIP
deserialization work THIS GETS DONE UNDER xlCluster.go * SKIP
2014-11-15
DONE WITH NAME CHANGES:
* extract code for creating and populating a test cluster from * DONE
TestClusterMemberSerialization as * DONE
s.makeATestCluster(c *C, rng *xr.PRNG) *TestCluster * DONE
* add this and s.closeAcceptors(c *C, members[]*ClusterMember) * DONE
to testCluster_test.go * DONE
2014-11-14 (-13, edited)
* cluster_member_test.go
- add EPCount endPoints to each node * DONE
- defer closing each member's acceptors * DONE
- verify that all members' acceptors are live * DONE
- add peers to each ClusterMember * DONE
* add connectors to peers * DONE
- serialize a randomly selected ClusterMember * DONE
- deserialize * DONE
- verify equality * DONE
2014-11-12
* testCluster_test.go needs quite a bit more work * YEP
2014-11-10
* drop notion of registry-level RegMembersByID because node can
use different IP addresses in different roles
- alternatively require that any host using the registry use
role-specific NodeID
2014-11-06
* modify xlReg_go so there are 2^t slots in the cluster root HAMT * DONE
table and w defaults to hamt_go.MAX_W, where t is * DONE
NextExp2(ClusterSize) * DONE
2014-10-24
* Registry must update RegMembersByID
- possibly what we need is a single ByID map, and then an
IsMember() or IsCluster() bool field
* consider drop idFilter, which seems to be misused, replacing it
with HAMT?
- con: idFilter can be a memory-mapped file, which would seem
to have real advantages
* must be certain that deserialization restores
ClusterByID, RegMembersByID XXX it cannot XXX
* must test the memory-mapped filters
* modify eph_server.go as required to allow us to examine registry
contents
* then modify eph_server_test.go as required to verify that the
cluster generated is correctly represented in the registry
2014-10-24 (-22, edited) * DONE
* consider adding the registry as peer to * DONE
- AdminClient, * DONE
- SoloMember, * DONE
- UserMember * DONE
2014-10-24
* modify MemberInfo to contain POINTER to Peer * DONE
* write test to verify that (a) all other members have been added
to Node as Peers but (b) the 'self' member is not so added.
2014-10-24 (-16, edited) * DONE
* cluster members should be added to Node.peers[] using AddPeer() * DONE
(which makes a copy) * DONE
- this is done BEFORE serializing the node * NOTED
2014-10-22 (-21, edited)
* need xlTransport function to strip off address prefixes like
"TcpEndPoint: "; this caused problems in memberNode.go
2014-10-15
* FIX: epCount at end of clusterMember serialization is wrong
* in the definition of ClusterMember struct (line 26 or so) it
claims that the EPCount is potentially different from the
count of endpoints passed to xn.New(), but this is nowhere
enforced
* verify that references to cluster member endPoints use
GetEndPoint(n) or GetAcceptor(n)
* SoloMember should NOT persist a ClusterMember and in fact
it just calls PersistNode()
* AdminClient is completely ephemeral; it does not persist anything * TRUE
* UserMember also doesn't persist anything; its mission is to
collect MemberInfo. Callers can persist the information, but
the endPoints will necessarily be WRONG, as discussed above.
2014-10-07 (-07-25, edited)
* need to automatically edit private IP address, 192.168.240.4
in this case, to the public IP address, 54.187.133.62
- sed
* need test here which runs against portland:56789
2014-09-16
* MemberNode.{endPoints,lfs,name} appear to be wholly redundant;
consider dropping them
* MemberNode.{c,s}kPriv are redundant given Node.Get{C,S}KPriv()
2014-09-13
* REVIEW: ClientNode.clientID renamed ClientID, other fields
not similarly exposed
- need to at least adjust version date
* REVIEW: ClientNode fields size, epCount were int, now uint
* REVIEW: ClusterMember fields SelfIndex, ClusterSize,
EpCount were uint32, now uint
* REVIEW: protocol ClusterSize and EndPointCount are uint32,
whereas struct fields are uint
2014-09-12
* EphServer.GetAcceptor() needs to be tested
- NO, should be dropped; this is just Server.GetEndPoint(0)
* reg_cluster_test.go is incomplete; when paxos_go/pktComms/
keep_alive_test.go is working, backport relevant bits
- NO, eph_server_test.go is the model to follow
2014-07-03
BUT TEST SUCCEEDS ON PORTLAND:
* FIX: cluster_member_test.go line 62 gets strconv.NumError
(Func:"ParseInt", Num:"4592296101443653904", presumably
because EC2 instances are in some sense 32-bit, whereas
software developed on 64-bit machines
* need -d/--runDetached switch to make server run detached
* to start from rc.local need -u/--user option
* RESOLVE: regCred.dat should include publicly accessible IP
address, but on EC2 cloud has to use its private (10/8 or
192.178.*/24) address to get address to bind
- if 127.0.0.1 is used, clients must be on same host
2014-05-14
* review whether reg_node.go actually needs xlattice_go/msg
* website needs new reg_cred before this is deployed
2014-02-24
* write testData_test.go exercizing data in test_dir as model for
xlreg_*
- 001 regCred tests * DONE
- 002 hello/reply tests * DONE
* do hello/reply with stockton
- 003 client/ok tests
- 004 create/reply
- 005 join/reply
- 006 get/members
- 007 bye/ack
2014-02-20
* need to step version number at each branch merge
* investigate: msg_handlers.go L 169: "NO LONGER MAKES ANY SENSE"
* also determine why xlReg continued to load on Stockton
despite having no /var/app/xlReg
2014-02-03 (2013-10-09, edited)
* ClientMsg is
- EITHER token with digSig but without clientID
- OR clientID plus salt plus digSig
2013-12-06
* NewRegistry must populate indexes if clusters supplied
2013-12-05
* UserClient.Run() may return error, especially EOF, in which case
we need to try again; using code needs to be fixed
2013-11-22
* modify client_node.go to use SetupSessionKey()
* insofar as possible, ClientNode.SessionSetup() should
migrate to AesCnxHandler.InitSessionSetup()
* insofar as possible, InHandler.handleHello() should
migrate to AesCnxHandler.ReceiverSessionSetup()
* consider migrating to another package
- aes_cnx.go
- msg.ServerDecodeHello()
- msg.ServerEncodeHelloReply()
* the other package could be protocol/aescnx/, but the code must
be stable and usable externally
* cnx initializer / receiver distinction must be made very clear
and the code (re)structured accordingly
* XXX the problem is the protobuf protocol, which will vary from
application to application
- need at least proto.Unmarshal and proto.Marshal functions
- don't know cost of using interface{} instead of eg *XLRegMsg
- alternative is to build a code generator; need not be in Go
- it's acceptable in the short term to simply copy and edit
the code in xlattice_go/reg
- tentively
xlattice_go/protocol/AesCnxHandlerGen -s NAME -l LONGNAME
where NAME/LONGNAME is that of the protocol
2013-11-18
* this introduced a bug not caught here; need to modify tests
to catch it
2013-11-05
* Registry is logging EOFs on all client connections; this
should be dropped
2013-11-04
* xlReg should log all interactions
- cluster joins
* logging should be in separate goroutines and should include at
least the IP address and port number at the far end of the
connection (to gather enough information for blacklisting
where appropriate)
* xlReg is dying at seemingly random intervals; need to log errors
where possible
- "fatal I/O error accept tcp ...: use of closed network
connection, shutting down the server"
- ignoring this in tests results in infinite loop
* it appears to be the acceptor (the listening socket)
which is closed, so ignoring it is impossible
* we are in fact using the close() to shut down the server,
so it makes no sense at all to ignore this particular
error.
* so need to determine which end of the connection is
closed and respond accordingly (far end: who cares?
this end: we are done)
2013-11-02
* connections to xlReg are being left open; the server should
close
2013-10-31
* need to properly implement 10-02 Registry-related items
* when ParseRegistry is available, code must be available which
rebuilds volatile data structures, including ClustersByName
and ClustersByID
- in particular, the registry ID and all cluster IDs must be
in the registry Bloom filter
2013-10-28
* (from 10-17) xlReg starting for the first time should
- writes regCred to the log
2013-10-25
* drop options.Ephemeral, which is implied by empty backing
file name ?
2013-10-18
* Whatever is using BadVersion should be using the DecimalVersion
type
- This is in reg/in_handler.go init() and references VERSION in
../const.go.
2013-10-17
* determine what LFS is being used and whether the node is
being serialized to LFS/.xlattice/node.config
2013-10-17
* NewSoloClient needs mode parameter which is ORed into default
0600 on LFS/.lattice/node.config
* FIX: InHandler.doCreateMsg() treatment of existing clusters
doesn't make any sense
REGISTRY SERVER
* (longer run) verify that xlReg can be configured to listen on
either ALL IP addresses or on more than one IP address,
such as {192.168.152.10.44444, 192.168.136.10.44444}
* add RegCred message, which of course can't be used without
knowing the registry's comms public key
* ephemeral admin client unique ID should be itself ephemeral
UTILITIES
* xlClusterReg -e -s K -o FILE CLUSTER_NAME -p PERM
where K is cluster size, FILE defaults to ./reg.cred
* xlRegCred -o FILE IP_ADDR:PORT
where FILE defaults to ./cluster.cred, PERM to 0640
utility which retrieves regCred, displays and/or
writes to LFS/.xlattice/reg.cred perm 0444
2013-10-13
* ClientNode must be able to read config from LFS
* CHANGE Client/ClientOK to expect either
- token without name but with digSig OR
- clientID plus digSig
*ClientNode Node is created after keys are created and ID is known
2013-10-12
* need clear decision: does UserClient get clusterName?
* use BloomSHA to handle registry ID map? about 300 SLOC
in Java (as implemented in xlattice_j)
2013-10-11
* msg_handlers doClientMsg about line 70 sets all generated
IDs to 32 bytes (SHA3)
* doClientMsg assigns an ID if nil but just uses the SHA3
of ckPriv and skPriv; need to add some randomness!
* server must guarantee uniqueness of all IDs, including
- unique clientID (both user and admin)
- unique clusterID
* so registry must have a map of all IDs used
2013-10-10
* msg_handlers.go doClientMsg: change to either
- accept ID, which must be known, plus digsig
- or to accept token without ID plus digsig
* in this case it generates a new and unique ID
- old tests must continue to run at least until new
code is stable
2013-10-03
* verify that mock_server_test considers it an error when
not all members are returned
2013-10-02
CLIENT, MOCK_CLIENT
* change protocol so that nodeID is assigned by server (to
avoid Douceur's Sybil Attack)
- so first variant of Client message has token + digSig
* without clientID in token
- any client ID is ignored and discarded
- which will cause digSig to be wrong
- second version of Client message has only clientID + digSig
- either attaches client's full token to the connection
* this includes nodeID
* code up the usual serialization/deserialization
* ParseClient
* Client.String()
* Client.Strings()
* Client.Run()
* when a Client is run,
- if it has a configuration in its lfs, it loads = does a
ParseClient on its configuration file; this returns
a Client with a *xn.Node field
- otherwise it starts talking to the server (does a
Hello/Reply to get a session key) and then sends a
Client message without a nodeID; the nodeID returned
is used to build its *xn.Node
* if testing (-T option), default lfs is ./tmp/ID/lfs, where
ID is the hex version of the server-assigned ID
* otherwise default lfs is ./lfs
- so there is one obvious configuration file in a subdirectory
of the current directory
SERVER, CLIENT/SERVER MESSAGING
* it must be possible for a Client to create a Cluster (by name) * DONE
and set its size without joining it * DONE
- ah: it must be possible for a Client to create a Cluster
without a name and get its assigned name and ID back
* equally it must be possible for a client to join a cluster * DONE
using its name and get its ID back
- but if it's full the client gets a ClusterFull error msg
* code up Registry serialization in reg/registry.go:
- ParseRegistry()
- String()
- Strings()
* code up RegServer bits in reg/server.go:
- ParseRegServer()
- String()
- Strings()
* any errors found by InHandler should be logged
2013-10-01
* need locking for reg_cluster Members
- checking whether client is cluster member by ID (read lock)
* registry RegMembersByID should be dropped or used; if used
- when members added to clusters
* must read lock reg and check reg.RegMembersByID
* must write lock when adding
- but need to decide whether this is useful
* and whether the intention is to prevent clients from
belonging to more than one cluster (why??)
* when this is running, drop into ../cmd/xlReg/xlReg
2013-09-30
* xlReg 0.2.0 must have lfs, logging, load/save
* deploy xlReg 0.2.0 on salinas:55555
2013-09-29
* improve RegCluster.AddMember handling of dupe names
2013-09-24
* packets.go readData should handle partial reads, looping on count
until all bytes have been received
* packets.go writeData should handle partial writes, looping on count
until all bytes have gone
2013-09-20
* several tests could obviously benefit from parallelizing:
they run one CPU at 100% while the others are more or less idle
- look at cluster_member_test
- also reg_cluster_test
2013-09-13
* URGENT FIX: ClientMsg does NOT include digsig, so server cannot * DONE
verify that the client knows skPriv * DONE
* longer term xlReg needs to be distributed, using Paxos for
consensus
2013-09-12
* build and thoroughly test ../cmd/xlReg * DONE
* this stays on main branch
* deploy on test:44444 as service
* on regBeta branch figure out how to persist the registry in * DONE
such a way it easily loads itself from disk after a * DONE
crash or reboot * DONE
* when this is stable, merge back into main branch * DONE
- and deploy on test:44444
* document