got JSON.({"requestType":"sendmessage","dest":"8894667849638377372","msg":"
hello"})
pNXT_json_commands sender.(482478496576188177) valid.1 | size.22 | command.(sendmessage) orig.([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}])
sendmsg_func sender.(482478496576188177) valid.1 dest.(8894667849638377372) ([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}])
ONIONIZE: np.0x7f3700010530 NXT.8894667849638377372 8894667849638377372 pubkey.f080a422dff8ed23 encode len.275 -> new len.331 + 42 = 373
sendmessage ([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}]) len.275 to 8894667849638377372
np.0x7f3700000ea0 NXT.482478496576188177 | destnp.0x7f3700010530
add layer 1: NXT.13434315136155299987
ONIONIZE: np.0x7f37000025f0 NXT.13434315136155299987 13434315136155299987 pubkey.aeb37026ae0c3b45 encode len.373 -> new len.429 + 42 = 471
ONIONIZE: np.0x7f37000025f0 NXT.13434315136155299987 13434315136155299987 pubkey.aeb37026ae0c3b45 encode len.471 -> new len.527 + 42 = 569
DIRECT udpsend to 209.126.70.159/6777 finalbuf.573
portable_udpwrite 573 bytes to 209.126.70.159/6777
parms.({"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"}) valid.1
UDP RECEIVED
{"status":"482478496576188177 sends via p2p encrypted sendmessage to 8894667849638377372 pending"}
decrypted2 len.373 dest.(13434315136155299987)
[?wȄH5p{ߝ
??u4#.?s/o?^
?3???%<
@K?$A???F?
$?%?eq["] argjson.(nil) udp.0x7f370802b5c0
DIRECT udpsend to 209.126.70.156/6777 finalbuf.377
portable_udpwrite 377 bytes to 209.126.70.156/6777
UDP RECEIVED
The above is the result of: ./BitcoinDarkd SuperNET '{"requestType":"sendmessage","dest":"8894667849638377372","msg":"
hello"}'
on one server and:
UDP RECEIVED
mismatched len expected 13411 got 275
decrypted len.275 dest.(7310874250626366299)
[[{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}]] argjson.0x7f443c0109f0 udp.0x7f4454023000
pNXT_json_commands sender.(482478496576188177) valid.1 | size.22 | command.(sendmessage) orig.([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}])
sendmsg_func sender.(482478496576188177) valid.1 dest.(8894667849638377372) ([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}])
received message.([{"requestType":"sendmessage","dest":"8894667849638377372","msg":"
hello","NXT":"482478496576188177"},{"token":"sc749qe0te0ln5417busj6453qnkfl5knuhev55ilij0jhqqh7jqq09h8hbqe08116u2r9totg04edv
r2ia77c3f43pd8l6flk9m4q3hv8j0aomunkbeoh1puui7ssrgevae58f77jba9digp7n0dgvr27l621
2g"}])
add.1 Uaddr.(209.126.70.159/6777) to 0
A lot of back and forth just to send "hello", but this is the same path for any SuperNET API call between two nodes.
I had to make some shortcuts to get this to work, but now that I have it working for this command, it is a matter of propagating this to all the other API calls. I also need to check for any memory leaks, i have a feeling I put some in there as I changed to a more streamlined approach.
also, only one API call is differentiating between a locally generated API call and a remotely sent one. Clearly we need some sort of limits on what sort of API calls we allow remote nodes to do!
The messaging is not filtering and this needs to be fixed in the BTCDcore, but now I am able to solidify the SuperNET routing and get back to implementing the API calls themselves.
James
tl:dr making steady progress debugging the core of SuperNET functionality, once this is done I can complete the Teleport