Althea Development Update #72: Easy local Althea testnet

Althea Development Update #72: Easy local Althea testnet

For this development cycle I've focused on building a more advanced and easier to run series of integration tests. As Althea matures the complexity of the average bug to track down, identify and test increases so to stay one step ahead our old integration tests needed an upgrade.

You can now easily download and run a local Althea testnet through a series of highly instrumented tests with a single command.

Running the tests in one easy step

First have docker installed and running. Then run these commands. Word of warning this will blow away your systems docker cache so don't run it on a production server, the builds are pretty big and will fill up your root dir very quickly if we don't, you can edit test.sh if you want to avoid this.

Dependencies are Docker and a local WireGuard kernel module. This is mostly easily done on Linux. If you don't have a Linux machine setup you can see the test output on Travis.

git clone https://github.com/althea-net/althea_rs
cd althea_rs
bash scripts/test.sh

That's it! The entire test suite will run from start to finish in this order.

  1. Unit tests
  2. Creating a docker container and building Rita our biling daemon and Babel the routing protocol from scratch
  3. Creating a virtual network using net-namespaces to connect 7 different virtual nodes.
  4. Checking connectivity and optimal price/paths for all nodes
  5. Registering client nodes with the exit and checking the various http endpoints for the router dashboard
  6. Running a series of iperf tests to generate traffic and then ensure that the resulting billing output is consistent

This is a cool way to see everything at work and even mess around with it without having to get specialized hardware or do a lot of setup. The ~12 minute runtime isn't exactly ideal but it's a lot less work than any other form of of in depth testing that we have had before.

You could pretty easily generalize this test to more than the 7 nodes we test now. But I'll leave that as an exercise for the reader.


What's new in Beta 7

  • Fixes for importing backed up private keys
  • Fixes for exits behaving improperly when private keys where imported
  • Fixes for DAO payments sometimes causing the router to crash
  • Long term memory for router debts to prevent restarts resulting in not paying other people
  • Fix for the dashboard thinking routers had a password set when they did not
  • Added a version toggle that allows devices to opt into early access updates
  • Users can now visit althearouter.net instead of 192.168.10.1 to access their own router dashboard.

This is a pretty quick release hot on the heels of Beta 6, but we have a lot of fixes to roll out so I figure we'll push it out quickly.