Dealing with NAT connectivity issues and other messy networking, slow progress. So, I decided to just see what happens if I ran the following API:
./BitcoinDarkd SuperNET '{"requestType":"teleport","coin":"BTCD","amount":".0001","contact":"s0"}'
now I have about a dozen telepods on my s2 server and already added contacts on both for the other. Now once you have a contact, it is put into the database, so it automatically loads. also, both servers have no connection issues.
the teleport command uses a simple genetic algorithm to select the telepods to use:
start evolving.14 at 384601.546000
hwm {"c":"BTCD","tpd":"{\"v\":\"0.00010000\",\"t\":1414326260,\"c\":1538090497,\"x\":\"70d63e7c807a4734080e91ef05fc77ad151ed1cde6410bf201b06f98df1cfabe\",\"p\":\"UqoYd3rocuGrN4XdA6smBdQx4BTeeDqpBTgtq2B8N94LNCQR6ifC\",\"a\":\"RDqzsrkE6Th8rFZqJUfYdo99hzSJu1khuo\",\"o\":0,\"s\":\"76a9143214e137b7bf0c3cf7172d3e13a3b146c00e318f88ac\"}"}
-> evolved with bestn.1 0x7f952c0a7d50
finished evolving 1 at 384601.846000
Once it finds the telepod, it encrypts it using a shared key and a one time password:
private_publish({"deaddrop":"8201588598475185021","id":7,"time":1414960364,"type":"teleport","attach":"{\"c\":\"BTCD\",\"tpd\":\"{\\\"v\\\":\\\"0.00010000\\\",\\\"t\\\":1414326260,\\\"c\\\":1538090497,\\\"x\\\":\\\"70d63e7c807a4734080e91ef05fc77ad151ed1cde6410bf201b06f98df1cfabe\\\",\\\"p\\\":\\\"UqoYd3rocuGrN4XdA6smBdQx4BTeeDqpBTgtq2B8N94LNCQR6ifC\\\",\\\"a\\\":\\\"RDqzsrkE6Th8rFZqJUfYdo99hzSJu1khuo\\\",\\\"o\\\":0,\\\"s\\\":\\\"76a9143214e137b7bf0c3cf7172d3e13a3b146c00e318f88ac\\\"}\"}"}) -> s0.7
decrypted.({"deaddrop":"8201588598475185021","id":7,"time":1414960364,"type":"teleport","attach":"{\"c\":\"BTCD\",\"tpd\":\"{\\\"v\\\":\\\"0.00010000\\\",\\\"t\\\":1414326260,\\\"c\\\":1538090497,\\\"x\\\":\\\"70d63e7c807a4734080e91ef05fc77ad151ed1cde6410bf201b06f98df1cfabe\\\",\\\"p\\\":\\\"UqoYd3rocuGrN4XdA6smBdQx4BTeeDqpBTgtq2B8N94LNCQR6ifC\\\",\\\"a\\\":\\\"RDqzsrkE6Th8rFZqJUfYdo99hzSJu1khuo\\\",\\\"o\\\":0,\\\"s\\\":\\\"76a9143214e137b7bf0c3cf7172d3e13a3b146c00e318f88ac\\\"}\"}"}) len.479
location.374764261261180465
telepathic.(1e3190d8212ed742060637316591a2cc5bc75871a6f311ee836f226970536548695eb51a5996da1 3027644556411630cdf320a31949af01f8bd2ffca9d946b855ac5ddc78dc3e8cd80c386736a2328 e28ceed4e793bbeba63f897064f0eef802abf01f0bf21f16d97da9441a7070ab8e043f4da1e5953 8ead72f53540c224d6ad1d00a8caf8e7d88b65785cda44be9a20675e83fafddac150d0b250e8184 9bbe135e0f0d7ebf10f1b593a903bf3a01423a0d5da94cabb2c1a2ac7b6c2f40a4bc7d4a06327c6 8a3aa0970d97c78b6f3dca1316a628a2f803876163e293640f5391a661aad3d170f89c0999398d7 bfce99523ba2257d18f56ef56730209162a4c41963567920482a8a03ccc9f12be8020d5d8e51184 49acc94319c8c7e42acbd3b16672fa73131149d2b470149a14320285c6c6d09924bfe892ef86fd8 b501daaea40e28694ea329a3da7e00300c3303587dec31509b14572bb79499fc481a7e0193beccd 544cce79910fbd8012bc62255637547b955cc1dae41ac73a4230030f9ff6dfe917e1bfbcaec4f0f 2c926b3254dd4a98b644071cde9c1ad272bb91d5e22947c93f55c148ae207fb281f02b7182dfbba 85086fdf38cb5370fc95c13b810b815c77c30bcbe895efeafe82f698b446b227e7d095e50073886 50d62046acbf1056e09e16eccecd3db592f457e87d) len.495 -> 140279230066432 374764261261180465
Now it sends it over the network using a findnode command:
telepathic send to s0.7 via 8447171643292973228 using 374764261261180465 (af79ca8f7e1eee29af74a8db4a12a8527e41613d975f3406e61487b955e26797)
Basically it is pretending to be acct #374764261261180465 and searching for node 8447171643292973228
You have to keep in mind that the actual destination's node address is 10694781281555936856.
####################### on the s0 machine, it receives a findnode for 8447171643292973228
but while it processes it, it notices that it is "from" 374764261261180465, which just happens to be in its list of possible senders that means it is really the 7th message from the s2 server acct 13434315136155299987
myNXT.(374764261261180465) kademlia_find.(findnode) (8447171643292973228) data.(1e3190d8212ed742060637316591a2cc5bc75871a6f311ee836f226970536548695eb51a5996da1 3027644556411630cdf320a31949af01f8bd2ffca9d946b855ac5ddc78dc3e8cd80c386736a2328 e28ceed4e793bbeba63f897064f0eef802abf01f0bf21f16d97da9441a7070ab8e043f4da1e5953 8ead72f53540c224d6ad1d00a8caf8e7d88b65785cda44be9a20675e83fafddac150d0b250e8184 9bbe135e0f0d7ebf10f1b593a903bf3a01423a0d5da94cabb2c1a2ac7b6c2f40a4bc7d4a06327c6 8a3aa0970d97c78b6f3dca1316a628a2f803876163e293640f5391a661aad3d170f89c0999398d7 bfce99523ba2257d18f56ef56730209162a4c41963567920482a8a03ccc9f12be8020d5d8e51184 49acc94319c8c7e42acbd3b16672fa73131149d2b470149a14320285c6c6d09924bfe892ef86fd8 b501daaea40e28694ea329a3da7e00300c3303587dec31509b14572bb79499fc481a7e0193beccd 544cce79910fbd8012bc62255637547b955cc1dae41ac73a4230030f9ff6dfe917e1bfbcaec4f0f 2c926b3254dd4a98b644071cde9c1ad272bb91d5e22947c93f55c148ae207fb281f02b7182dfbba 85086fdf38cb5370fc95c13b810b815c77c30bcbe895efeafe82f698b446b227e7d095e50073886 50d62046acbf1056e09e16eccecd3db592f457e87d) mynode.0
updated.1 (8447171643292973228)
saved parsed decrypted.({"deaddrop":"8201588598475185021","id":7,"time":1414960364,"type":"teleport","attach":"{\"c\":\"BTCD\",\"tpd\":\"{\\\"v\\\":\\\"0.00010000\\\",\\\"t\\\":1414326260,\\\"c\\\":1538090497,\\\"x\\\":\\\"70d63e7c807a4734080e91ef05fc77ad151ed1cde6410bf201b06f98df1cfabe\\\",\\\"p\\\":\\\"UqoYd3rocuGrN4XdA6smBdQx4BTeeDqpBTgtq2B8N94LNCQR6ifC\\\",\\\"a\\\":\\\"RDqzsrkE6Th8rFZqJUfYdo99hzSJu1khuo\\\",\\\"o\\\":0,\\\"s\\\":\\\"76a9143214e137b7bf0c3cf7172d3e13a3b146c00e318f88ac\\\"}\"}"})
DECRYPTED expected (s2.7) ({"deaddrop":"8201588598475185021","id":7,"time":1414960364,"type":"teleport","attach":"{\"c\":\"BTCD\",\"tpd\":\"{\\\"v\\\":\\\"0.00010000\\\",\\\"t\\\":1414326260,\\\"c\\\":1538090497,\\\"x\\\":\\\"70d63e7c807a4734080e91ef05fc77ad151ed1cde6410bf201b06f98df1cfabe\\\",\\\"p\\\":\\\"UqoYd3rocuGrN4XdA6smBdQx4BTeeDqpBTgtq2B8N94LNCQR6ifC\\\",\\\"a\\\":\\\"RDqzsrkE6Th8rFZqJUfYdo99hzSJu1khuo\\\",\\\"o\\\":0,\\\"s\\\":\\\"76a9143214e137b7bf0c3cf7172d3e13a3b146c00e318f88ac\\\"}\"}"}) lastrecv.6 lastentry.191
updated.5 (s2)
(s2.7) pass.(af79ca8f7e1eee29af74a8db4a12a8527e41613d975f3406e61487b955e26797) | process_telepathic: key.(8447171643292973228) got.(1e3190d8212ed742060637316591a2cc5bc75871a6f311ee836f226970536548695eb51a5996da1 3027644556411630cdf320a31949af01f8bd2ffca9d946b855ac5ddc78dc3e8cd80c386736a2328 e28ceed4e793bbeba63f897064f0eef802abf01f0bf21f16d97da9441a7070ab8e043f4da1e5953 8ead72f53540c224d6ad1d00a8caf8e7d88b65785cda44be9a20675e83fafddac150d0b250e8184 9bbe135e0f0d7ebf10f1b593a903bf3a01423a0d5da94cabb2c1a2ac7b6c2f40a4bc7d4a06327c6 8a3aa0970d97c78b6f3dca1316a628a2f803876163e293640f5391a661aad3d170f89c0999398d7 bfce99523ba2257d18f56ef56730209162a4c41963567920482a8a03ccc9f12be8020d5d8e51184 49acc94319c8c7e42acbd3b16672fa73131149d2b470149a14320285c6c6d09924bfe892ef86fd8 b501daaea40e28694ea329a3da7e00300c3303587dec31509b14572bb79499fc481a7e0193beccd 544cce79910fbd8012bc62255637547b955cc1dae41ac73a4230030f9ff6dfe917e1bfbcaec4f0f 2c926b3254dd4a98b644071cde9c1ad272bb91d5e22947c93f55c148ae207fb281f02b7182dfbba 85086fdf38cb5370fc95c13b810b815c77c30bcbe895efeafe82f698b446b227e7d095e50073886 50d62046acbf1056e09e16eccecd3db592f457e87d) len.495 from 374764261261180465 dist 28 vs mydist srv 32 priv 32 | 209.12
So a telepod went from one computer to another without any node knowing the actual IP address for the destination! Then I realized that I didnt actually hook it up to the telepod processing, so the sent telepod is now in limbo. I guess this will help test the teleport cancelling logic.
Still quite messy and many loose ends, but the fundamental process is working if all the conditions are met. Now I have to get the telepathic transfers much more reliable and of course activate the reception side of teleport, eg. cloning.
James
P.S. wc *.c *.h -> 34611 118707 1286274 total, yes that is 34000+ lines of code mostly written by me and it doesnt include: wc cstdlib/* gzip/* includes/* libtom/* platform/* -> 53810 236325 2181668 total
almost 90,000 lines of code is compiled into SuperNET, this is over and above the libwebsockets, libuv and other libraries