Weekly Dev Update #77

Loki Dev Update 77 (numerals '77')

Hey Y’all,

This week we did a lot more work on Loki Messenger focusing on multi-device and profile images, getting everything ready for a quality-of-life upgrade for this week. We also forked the Loki core testnet with the latest Lokinet release candidate and Blink, gearing up for a planned release at the end of the year. We also squashed some final Lokinet bugs that were causing unexpected client disconnections.

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What went on last week with Lokinet: 

This past week was one of the most intense weeks in memory for the Lokinet team. The team was focused on nailing down and fixing some final bugs in order to get 0.6.0 ready for a stable release. The late nights, extra coffee, and some forgoing of Thanksgiving turkey (most of the Lokinet team is based in the US) paid off, however: we finally nailed the remaining issues and are confident with the current state of the Lokinet release.  We’re continuing to test it on both a private network and on the just-forked Loki testnet (see Loki Core notes), but so far performance has been steady and solid.

PR Activity:


Loki Messenger for Desktop


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Misc.

Lokinet Public Chat Server

Loki Android Wallet

Loki Public File Server


Thanks, 

Kee

Loki Messenger breaks new ground

Multi-device support is one of the most-requested features in modern messaging applications — people want to be able to chat seamlessly across all of their devices.

Decentralised chat applications have struggled to implement this crucial feature, leaving their user experience lagging behind messengers that use central servers.

The Loki Messenger team has been working on this problem for the last few months, and we’ve finally published our solution. Loki Messenger v1.5.0 puts multi-device into users’ hands for testing.

How we did it

Unlike many decentralised messengers, Loki Messenger is not a peer-to-peer messaging service. Instead, Loki Messenger uses a network of servers (Loki Service Nodes) to store and retrieve messages, which are operated by individuals and groups in the Loki community.

Because Loki Messenger is based on this unique decentralised architecture, it can do things that many traditional peer-to-peer messengers cannot, including storing messages offline and enabling multi-device syncing.

When a message is sent to a particular public key (Loki Messenger address), it is received by a ‘swarm’ (a group of 5-8 Service Nodes). The recipient’s Loki Messenger client polls its swarm to check for incoming messages. This polling typically occurs every 3 seconds, but exact intervals can vary depending on the device. If an incoming message is found, the client downloads it. If the receiving client is offline when the message is sent, it will receive the message when it next comes online and polls its swarm for messages. If the client remains offline for an extended period of time, the incoming message is deleted from the swarm (see Time to live below).

A record of active Service Nodes can be found here.

So, how does multi-device syncing work? 

Pairing 

Before you can use multi-device, your two devices need to be paired. This process involves generating a ‘device mapping’ — a cryptographically signed piece of information which links your primary device’s public key to your secondary device’s public key.

This device mapping is uploaded to the Loki File Server, which acts as a file storage solution for Loki Messenger. By default, all Loki Messenger clients use the official Loki File Server (hosted by the Loki Project) to upload and store device mappings. However, users will be free to set up and host their own instances of the Loki File Server once multi-device moves out of testing.

When someone sends a friend request to your primary device’s public key, the Loki File Server also provides that person with the public key of your secondary device. This allows the friend request to be delivered to both devices. A similar mechanism is used in public chats, to confirm that messages signed by either the primary or secondary device are coming from the same user (as per the user’s device mapping).

Sending messages

When a message is sent to a multi-device-enabled recipient, the sender’s Loki Messenger client looks up the recipient’s device mapping on the Loki File Server. The sending client collects the recipient’s primary and secondary keys, then sends a message to both keys’ swarms.

If the sender also has multi-device enabled, they will send a copy of their outbound message to their other device too, ensuring their sent message logs are synced between devices.

Receiving messages

The receiving process remains largely unchanged. To check for received messages, your client will ask a node in its swarm if it’s holding any messages for your public key. If you are on your secondary device, your client will ask the secondary device swarm. Since all messages destined for you are sent to both devices’ swarms, your messages are kept in sync across both devices.

Further questions and future work

While Loki Messenger’s current multi-device implementation offers a novel solution for cross-device syncing, there are a number of changes and refinements we intend to make as we continue to iterate on this new feature. 

Future plans

Although public key storage does not inherently create a privacy risk, we would still like to limit the amount of metadata which is publicly available, including the association between two public keys (i.e. a single user’s primary and secondary devices). There are several changes we aim to make to limit metadata availability, and to improve the overall Loki Messenger UX.

Device pairing

To eliminate the need for externally-stored device mappings, devices would pair with each other by sending a special control message to the other device. Once the control message is received and the secondary device has authenticated and accepted the request, the two devices would share their private keys. This ensures each device could act completely autonomously without the other device needing to be online. During this process, no device mapping would need to be stored on the Loki File Server or in the recipient’s swarm.

Receiving friend requests

To add a new friend, you would send a friend request to their primary device. Once the friend request has been confirmed by your friend, their Loki Messenger client would send you the public keys of both their primary and secondary devices.

Receiving friend requests under this future system would change slightly, because requests would always be received by the primary device. This means that both primary and secondary device would need to monitor the primary device’s swarm for friend requests. If either device detects an incoming request, they can download and accept it on behalf of the other. The device which accepts the request would then send the new friend the other device’s public key, as described above.

Public chats 

With multi-device implemented, public chats need to be able to ensure that messages from both primary and secondary devices appear to originate from the same person. Currently, every message sent to a public chat is signed by the sending device’s key, and receiving clients determine whether two seperate keys are related by checking the associated device mapping which is stored on the Loki File Server. 

In future, the primary device’s private key will be given to the secondary device, so that messages from both devices are signed by the same key. This will prevent servers and recipients from having to check device mappings in order to validate that messages from two seperate keys are associated. Instead, servers and clients will simply see messages from someone’s primary and secondary devices as coming from the same person, with no further checks necessary.

Time to live 

When a Loki Messenger client sends a message, it specifies the time to live (TTL) for that message. The TTL is the time that the message will be stored on the receiving Loki Service Node swarm before being deleted (this storage-and-deletion process occurs if the recipient is offline at the time of the message being sent).

The default TTL for messages is 24 hours. This means that if your secondary device is turned off (or otherwise offline) for more than 24 hours, its sent message history will become out of sync with the primary device.

To get around this, a user’s primary and secondary devices could re-sync using a Lokinet peer-to-peer connection when they are both online. This is something we will look to implement once Lokinet and Loki Messenger are working together successfully.

Overhead 

Multi-device support increases the overhead required to send individual messages. Currently, each public key can only have one secondary device associated with it. However, even with this limitation in place, sending a single message from a multi-device-enabled client can result in at least three messages being sent: one message to the recipient’s primary device, one message to the recipient’s secondary device, and one message to the sender’s secondary device.

This is not ideal because it increases the number of messages that need to be stored on Loki Service Node storage servers. It also creates additional metadata that could be used by malicious actors to identify links between devices.

A better solution would be to use the Lokinet peer-to-peer layer to sync messages between primary and secondary devices when both are online at the same time. If we combine the existing message sync method (used when one device is offline) with a peer-to-peer sync layer (used when both are online), most cases could be handled without needing to store all messages on the storage server. 

Conclusion

The current multi-device system is only the first in a series of iterations. Over the coming months, significant work will be done on improving multi-device UX, as well as refining the message history sync process to further increase the privacy and usability of Loki Messenger.

Weekly Dev Update #76

Hey Y’all,

Last week the Loki Messenger team released the first revision of multi-device for public usage. For the rest of the week, we worked on upcoming features for improving the multi-device user experience. This includes adding QR code scanning for multi-device pairing, and also the ability to unpair devices. Both of these features will be released shortly. On the Lokinet team, it looks like we’ve tracked down and fixed the notorious 0-hop bug, which was the major hindrance to a new release. In Loki Core news, it looks like we will be forking the Loki testnet this week to start aggressively testing Blink.

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What went on last week with Lokinet: 

This week was productive in tracking down and eliminating some of the remaining performance issues. We’re aware of one more outstanding bug to be fixed early this week and are continuing to test the code for an upcoming 0.6.0 release.

PR Activity:


Loki Messenger for Desktop


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks, 

Kee 

Weekly Dev Update #75

Hey Y’all,

Last week we finished the last of our edge case testing for multi device and we’re readying ourselves for a release tomorrow. This will contain the first version of multi device, which allows for contact syncing and syncing of sent and received messages. While multi device for Loki Messenger has been our primary focus, the Loki core team also continues to put the finishing touches on Blink, specifically focusing on how Blink transactions are treated in the mempool. The Lokinet team continues to iron out a number of bugs introduced in the dev branch. 

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What went on last week with Lokinet:

The week was spent predominantly “in the weeds” debugging various issues in the dev branch, with a focus on tracking down and fixing unexpected latency introduced in 0.6.0 and a fix for the “0-hop” bug that is sometimes seen with suspended processes in 0.5 and 0.6.0  While some bugs remain in the new 0.6.0 code, we are pleased that CPU usage looks to be considerably improved compared to 0.5.

PR Activity:


Loki Messenger for Desktop


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Misc


Thanks,  

Kee 

Weekly Dev Update #73

Hey Y’all, 

This week we made big progress on Lokinet and Loki Messenger. On the Loki Messenger side, we are putting most of our efforts into finishing multi-device support, which means solving lots of edge cases. For Lokinet, we are getting closer and closer to a 0.6.0 release which will allow cryptographic operations to utilise multithreading, and iron out a number of bugs found in 0.5.2. 

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What went on last week with Lokinet: 

There was an increase in the public use of the Lokinet testnet this week. While we were encouraged to see the network being tested by real users, it’s important to remind the community that the current Lokinet release is still a testing, beta release!  Some things will change (i.e. break) between now and the final release on the Loki mainnet — most notably, protocol, private and public key cryptography has already changed in the dev branch and will result in (unavoidable) new keys and .loki addresses in 0.6.  We have our eyes set on a final, mainnet release but there may be additional, backwards-incompatible changes between now and then.

This week saw lots of activity, fixes, and improvements in the Lokinet dev branch, heading towards a 0.6 release. We have decided to clean up Lokinet internals by removing the home-grown JSON RPC HTTP server with a simpler JSON-over-zmq based approach. There were also various improvements to the debs (especially for routers), and we included several changes to make things work on xenial, while de-vendoring Libsodium in preference to the local system’s Libsodium library.

PR Activity:


Loki Messenger for Desktop 


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks,  

Kee 

Weekly Dev Update #72

Hey Y’all, 

We’re powering along with updates on Loki core. Last week, the Trusty Tyr Hardfork enabled Service Node checkpointing. This week, we are beginning work on LNS, and have finished a Blink pull request  which has most of the changes needed to send and receive Blink transactions. Loki Messenger pushed out Voice Snippet messages, more types of attachments, and a number of bug fixes. 

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What Went on Last Week with Lokinet:

This week was focused on stamping out bugs and deploying a new internal testnet for the current dev builds. There’s a great addition (in PR activity below) enabling traffic prioritization, which should enable better performance as network traffic heats up. Behind the scenes, we’re also looking into reconnection issues that happen when Lokinet is suspended or disconnected for long periods of time, as well as starting development for iOS and Android support.  We are also getting started on our plans to re-architect how the Lokinet daemon runs this coming week, which will make the way the binary runs more secure; aside from that, our primary aim is now stabilization and small improvements heading towards a 0.6 release. 0.6 will, of course, include the various improvements we’ve made over the past month, plus it will come with a much nicer means of controlling and monitoring Lokinet for desktop users.

PR Activity:


Loki Storage Server 

Loki Messenger for Desktop 


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks,  

Kee 

New Ways to Connect with Loki Messenger

Loki cryptocurrency featured image

Did you hear the news? Loki Messenger v.1.3.0 is now available on all platforms across mobile and desktop. Here are some great reasons to get chatting on it.

Pics, Vids and GIFs

Got a funny video to share? A photo you’re dying to post? Or a GIF that perfectly expresses your innermost feelings? Loki Messenger’s got you covered. Now you can send all these files up to 10MB in size. Just tap that handy + button.

Chat Mentions

Calling all attention seekers! Forget about driving a red sports car, walking around with a boombox on your shoulder, or throwing a tantrum in a shopping mall… The best way to get someone’s attention is with an @mention. Simply type @, followed by the name of a contact, in your message. It’s a great way to cut through the noise in Loki Public Chat. (or, if you want to avoid the noise all together, you can opt out of it now too).

Performance and UI improvements

We know – under the hood improvements aren’t always as exciting as flashy new features. But every bump in performance, every improvement in the user interface, and every bug squished, leads to a better overall Loki Messenger experience. “It’s the little things that count…”

To try out these new features, download Loki Messenger v.1.3.0 here: https://loki.network/getstarted

Weekly Dev Update #71

Hey Y’all, 

Last week the Loki Messenger team continued their short term pivot to get File Attachments and Mentions finished for a quick release. These long requested features are very close to being rolled out. The Loki Core team continued their push to get Blink finished, while also working on LNS (Loki Name System) – expect updates on these soon. Finally, the Service Node checkpointing fork will be happening in about 24 hours from this post being published, so if you have not yet updated your Service Node to 5.1.2, please do so now. This will ensure your node does not desync when the fork occurs. 

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What Went on Last Week with Lokinet: 

Work continued on the Lokinet control panel, which will become a GUI control interface in the next release. Progress was made on the changes to make Lokinet switch back to lokid’s standard ed25519 keys (added in loki-core 5.x). There’s also been prep work to make Lokinet talk directly to lokid, and continued work on the core VPN-layer functionality needed for future Android support.

PR Activity:


Loki Messenger for Desktop 


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks,  

Kee 

Weekly Dev Update #70

Weekly Dev Update #70

Hey Y’all, 

Last week we released the Trusty Tyr 5.1.1 Binaries. All Service Nodes, mining pools and exchanges will need to update to these new binaries before block height 385824 (est. 7PM AEDT, 2019-10-23). Currently, approximately 78% of Service Nodes have upgraded, so if you are operating a Service Node, make sure you update in the next week so you stay on the correct chain.

In other news, the Loki Messenger team has sidelined multi device work for now since a key team member is on holidays. Instead, the Loki Messenger team are working on File attachments, profile pictures and @mentions, which should be delivered in a new release shortly.  


Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What Went on Last Week with Lokinet:

We merged a significant batch of performance improvements for Lokinet, which should allow for better performance scaling, particularly on multi-core machines. Work continues on implementing a Lokinet GUI, which will allow desktop users to easily control and view their Lokinet connection stats. This requires the underlying Lokinet daemon to be securely controlled by another process (the GUI), so we will need to do some rearchitecting of the Lokinet internals to allow for that. The plan here is for the interface to be used in both the GUI and also via a `lokinetctl` command-line tool that will allow command-line users (such as Linux greybeards and SNApp admins) to control some portions of Lokinet without having to edit config files.

PR Activity:


Loki Messenger for Desktop 

Loki Storage Server


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks,  

Kee 

Weekly Dev Update #69

Hey Y’all, 

Last week the Loki Messenger team continued work on limited multi-device support for mobile devices, and finished the last required changes to support @mentions on Desktop. The Loki Core team is almost ready to release Trusty Tyr 5.0.0 – we just want to fix a bug which previously caused some Service Nodes running lokid 4.0.5 to become stuck on an invalid chain.

Loki Core


Lokinet

If you’re on our Discord you can catch Jeff, the lead developer of LLARP, live streaming as he codes at https://www.twitch.tv/uguu25519. He typically streams on Tuesday mornings, 9am – 12pm Eastern (US) time.

What Went on Last Week with Lokinet: 

The Lokinet team (now including new addition Stephen Shelton – welcome!) spent some time discussing new designs for the Lokinet internals. In the long term, we’re aiming to make Lokinet easier to use for end-users with, among other things, a separation in the design to allow the integration of a graphical control interface. We’re also looking make Lokinet work on mobile devices. In the shorter term, we’re planning some significant performance improvements to the build process, a new starting point for iOS builds, and various command-line updates.

PR Activity:


Loki Messenger for Desktop 

Loki Storage Server


Loki Messenger for Mobile (iOS and Android)

Loki Messenger for iOS:

Loki Messenger for Android:


Thanks,  

Kee