(#417) Replication #740
@jareksl I know this is huge but it's not going to get any smaller and I need to check it in sometime. It won't pass CI tests because of the Express-PouchDB problem but that will hopefully just be a bug fix. Please ignore all the java files as those are part of #720 and will be reviewed there. So please just pay attention to, well, everything else. A lot of the changes are just linting so in reviewable it should be easy to see that something is just a spacing change and not changing content. Sorry for dumping this monster on you but somebody has to do it. :)
TeamReadMe - Linting testThaliNotificationAction - Check that action is in KILLED state after start returns thaliNotificationAction - Making sure we go to killed state upon completion. thaliNotificationClient - Linting thaliReplicationPeerAction - Starting on the journey to implementing this. thaliPeerAction - Linting
testLocalSeqManager, localSeqManager, thaliPullReplicationFromNotifiction, thaliReplicationPeerAction - First skeletal work on replication thaliConfig - Added EC curve definition and some arguments for replication thaliSendNotificationBasedOnReplication - Exposing APIs to get public keys and secrets thaliWiFiInfrastructure - Call our public key api thaliReplicationManager - Adding in SALTI and hooking things up package.json - Add in SALTI as well as express-pouchdb thaliPeerAction - Fixed error in spec testThaliNotification, testThaliNotificationAction, testThaliNotificationClient, testThaliNotificationLocal, testThaliNotificationServer, testThaliPeerDictionary, thaliNotificationBeacons - Replaced the hard coded calls to our EC curve with the thaliconfig version
…use a custom manufacturer ID.
…ple_issues # Conflicts: # thali/package.json
testLocalSeqManager - Playing around with how we need to set things so that our calls will work testUtils - Let us get a raw level down enabled PouchDB instance localSeqManager - Clean up, still not done thaliPullReplicationFromNotification - Fixed typos thaliReplicationPeerAction - Mostly doc cleanup thaliReplicationManager - Clean up paths and removing SALTI for now thaliWifiInfrastructure - Removed unnecessary value
testThaliMobileNativeWrapper.js - Hardened the tests so they would pass even when the Bluetooth stack is being wonky. Fixed bug #717 to make us properly handle turning off Bluetooth. testUtils - Create a hardened HTTP GET that will keep trying even when there are connection failures. README - Fixed a syntax error in instructions testIdentityExchangeEndPoint, testLiveIdentityExchange, testSmallerHashStateMachine - Lint
testThaliMobileNative - The last test would hang if anything went wrong, now it has a time out. Note that the time out isn't perfect and causes a double call to .end and no I don't care right now. testThaliMobileNativeWrapper - Removed spurious logger definition testUtils - Turns out that code that runs before we set Mobile in test situations use testUtils so I had to delay us loading thaliMobileNativeWrapper (which we need for one test function) until after everything else to make sure we didn't load thaliMobileNativeWrapper before mobile was defined.
testLocalSeqManager - Added a bunch of tests, the last one in the file is failing because I don't properly return a promise in the case where we are waiting for a timer to expire in order to run the next update. Will fix tomorrow. httpTester - Added utility to do GETs to a PSK server localSeqManager - Fixing lots of bugs and adding functionality utilities - Linting
Readme - Add docs on --waitforInstance testLocalSeqManager - All non-coordinate tests are now done and passing! testLocalSeqManagerCoordinate - Still debugging why this isn't working httpTester - Added some PSK tests for getting docs and sequence #s testUtils - Created utilites to validate combined result objects and generate a remote facing PSK PouchDB server object package.json - In both cases I updated lie because I thought there was a bug in lie but there was actually a bug in my own code. Oh well. Didn't seem to hurt anything. thaliNotificationServer - Mostly linting but also explicitly setting the response to 200 localSeqManager - I hardened this so no matter what we won't have more than two request promises outstanding. thaliPeerPoolDefault - Now catch and log errors testThaliMobile, testThaliNotificationBeacons, testThaliNotificationLocal, testThaliNotificationServer, testThaliPeerDictionary, testThaliWifiInfrastructure, thaliMobile - fixing casing and reference issues around thaliConfig that were caused because I moved our elliptical curve setting there. testThaliPeerPoolDefault, httpTester, thaliConfig, thaliMobileNativeWrapper, thaliWifiInfrastructure - Removed our dependency on the bogus certs we needed before Shawn fixed a bug in how PKS support worked in JXcore on TLS.
I screwed up and for some reason thought that sequence IDs for records in _local were supposed to use the hashed version of the public key. I also screwed up and previously thought that the record prefix was supposed to be thali instead of thali_. And while I was fixing my screw ups I also moved the thali_ prefix into thaliConfig. testLocalSeqManagerCoordinated - Linting testThaliSendNotificationBasedOnReplication - moved the prefix to thaliConfig httpTester - Fixed syntax for sequence ID localSeqManager - Fixed ID generation thaliSendNotificationBasedOnReplication - Moved id prefix thaliConfig - Added ID prefix here
I ran into some issues that may or may not have been caused by the fact that I am running older versions of some dependencies than a fresh install would get. This kind of inconsistency leads to madness so for now we'll hard code specific versions rather than use Semver. I filed an issue, #266 to specify that we need to use something like greenkeeper so we can update when new versions of our dependencies come out.