I'm working on a full refactor of the wire codec and message building code of Indra...
I just perused LND's tlv library, and was a little amused to see how it was constructed... has function signature types instead of using an interface, and two of them would make such a nice interface but instead, no,
I wanted to check it out, see if it was relevant, but honestly, building onions with it requires a secondary data structure built in parallel to the TLVs for tracking the encryption ciphers for the layers (ECDH key pairs and initialisation vectors)...
So, by way of introduction from something familiar, I dug up some old code I was writing for a bitcoin fork project on the Parallelcoin project:
There was some other commits on other branches but that was my first commit after returning from 2 months exile after my residence permission for Serbia was still not organised and ...
I basically overstayed 3 times and I was ordered to stay away for december and january 2019-2020.
This commit was the last time that this piece of code referenced in the above was present in the repository, I had been using it for a few things, but mainly a multicast network miner work delivery protocol to go with my CPU based proof of work algorithm (long division based).
Pretty funny. First commit on master branch after they locked us all down, in Serbia it was also a full weekend stuck indoors as well. Next commit on that branch, the whole "simplebuffer" codec was removed. I don't remember why. Might have been because I just replaced it with this hella fast codec called "gotiny" which is the fastest, non-generator based Go binary codec out there.
Can't do that this time, I don't want to exclude people from easily writing a conformant codec in another language.
My host and sponsor for doing the work at that point or very near that time stopped adding code to the repository, and was spending 18 hours a day watching conspiracy theory videos on youtube, which got really really irritating, on top of all this fuggin bullcrap.
So anyway, just gonna adapt this extremely small and concise bit of code, maybe improve it a tiny bit, add a handler for doing the encryption after encoding the messages.
Shouldn't take too long, the design is proven and almost perfect fit, and better than anything I put into Indra for this task to date, I just