, Weekly Dev Update #16

Weekly Dev Update #16

Hey Y’all,

The dev team had an interesting week, which was primarily spent responding to bugs in the Loki core implementation. Lokinet developers have been working super hard and are getting close to something that is usable by the end user.



This week we published a minor release which can be found here: https://github.com/loki-project/loki/releases/tag/1.0.2 This incorporates fixes for newly operating Service Nodes and prevents a burning bug, mentioned below.

This update does not contain any consensus rule changes and therefore is a non-mandatory upgrade. However, if you are a Loki merchant, you should update immediately. Service Nodes who consistently take their nodes offline should also update. We will publish a guide soon on how to safely update a Service Node, however you should not be concerned unless you are planning to take your Service Node offline for a period of time.


Service Nodes


LLARP / Lokinet

We are looking for experienced sysadmins for running nodes that connect to our toynet. Please join the Discord room called Lokinet, and we can add you to the node operator role. You can host a hidden service or browse existing hidden services.

  • Progress continues on libllarp
    • Prep for next release
    • FreeBSD Compile fixes
    • Various low level network updates
      • Give protocol a fresh buffer instead of resetting
      • Only tick ev if running
      • Properly close sockets so we don’t run out over time
      • Double max protocol message size to 4k to make sure intros fit inside one packet
      • Increase the UTP socket buckets
      • Improve llarp::Addr utility
      • Start IPv6 support for tun
      • Promote tun to enabled by default, disable tap
    • DHT changes
      • Make sure DHT old RCs updates don’t stomp new ones
      • Try fixing DHT crash
    • Configuration
      • Update testnet config generation
      • Update auto configuration
      • Bootstrap node
    • Sessions
      • Server shutdown now cleans up sessions
      • Prevent dead sessions from updating and building more paths
      • Up session inactivity cost and change timeout to 60s from 10s
    • Introsets
      • Allow node introset to have 10s clock difference
      • Don’t propagate or store introsets on crypto error
      • Made sure timestamp is added to introset (Protocol backwards compatible breaking change)
    • Intros
      • If intro is bad then potentially trigger a manual path rebuild
      • Prevent spamming of intro frames
      • Reset intros before reuse
      • Fix intro matching by removing expiration and latency comparisons
    • Hidden service
      • Make sure hidden service lookups are valid and handle response
      • Optimise hidden service publishing from a random establish path to using a “closer” algorithm
      • Require 6 paths for a hidden service instead of 4
      • Expire outgoing hidden service paths
    • Path building improvements
      • Track path data usage
      • Don’t kill paths when under heavy use
      • Make sure path is recently active (20s) before checking for expiration
      • Only timeout path if no messages received are ever received on it
      • Don’t accept introset if it expires in the next 60s
      • Separate send (40s) and connect (60s) hidden service timeouts
      • Enable path callbacks even if marked bad
      • Reduce outbound path failure by attempting to use parent endpoint’s pathset
      • Path building backoff to prevent DoS in such a way that make sure intros don’t die
      • Preemptively trigger rebuild before expiration to ensure continuity
  • DNS library
    • Support other tun gateways other than 10.x.x.x
    • Refactor .loki lookup into its own file
    • Fix SIGINT handling on DNS binary
    • Moved logic worker loop into DNSc (client) for timers
    • Support multiple DNS IP trackers for netns
    • Allow upstream DNS configuration per tun interface (nameresolver key)
    • Fix PTR query detection to allow reverse DNS to work
    • Fix NXDOMAIN (not found) packet to include question name
    • SOA packet fixes
    • Various header cleanup
    • Make sure all vectors use unique_ptr for tighter memory management
    • Prevent duplicate mappings
  • GitHub Pulse Stats for the last week: Excluding merges, 2 authors have pushed 90 commits to master and 90 commits to all branches. On master, 76 files have changed and there have been 3,606 additions and 1,553 deletions.
  • Most changes can be found at: https://github.com/loki-project/loki-network/
  • Current version: v0.2.2 (next one coming soon!) https://github.com/loki-project/loki-network/releases/tag/v0.2.2
  • Compile helper (include assets, initial seed routers and dependencies)https://github.com/loki-project/lokinet-builder


Loki core

  • Fixed a bug affecting Cryptonote coins where no warning was giving for non spendable outputs, leading to effective burning if coins were credited.