Why Epistula

/eˈpis.tu.la/ Latin for Letter, Mail

Manifold Labs is proud to announce the release of the Epistula protocol. This is the first truly open source networking protocol in Bittensor history. This protocol will be used to ensure security, reduce bloat, and improve QOL for any users.

What is Epistula?
Epistula /eˈpis.tu.la/ is the Latin word for letter, or a piece of mail.

High Level

The Epistula Protocol is a standard for sending signed public messages between entities using ed25519 keys. Although primarily developed for the Bittensor network, the Epistula standard can be used on any network with ed25519 keys. The Epistula protocol is a ground up protocol created by the Manifold Labs team that provides easy to understand, industry standard ways of communicating between any product. We at Manifold use this already in not only Subnet 4, but Sybil, Targon Hub, and Targon Stats.

DDOS attacks are a challenge that miners often face. Epistula provides an extra set of signatures that are temporally cacheable and easy to validate that miners can optionally use to protect against such attacks. These can be implemented all the way up to the load balancer level, so that protecting against such attacks takes virtually no compute.

Axon Interface on Bittensor vs Epistula

We chose to create Epistula because of some glaring issues we encountered in the Axon Interface, these include:

  • Strict and opinionated
  • Forced usage of Bittensor library
  • Essentially forced usage of Python
  • Slow to process incoming requests
  • Potentially broke on new versions of Bittensor
  • Implementation was not industry standard
  • Only usable between validators and miners

Epistula was built with these issues in mind to improve quality of life for any user. Some of Epistula's core features include:

  • Easy to implement in any language
  • No library -> no breaking changes
  • Simply a protocol
  • Allows secure communication between any entities on Bittensor
  • uses industry standards; header naming conventions, hashing algorithms (sha256)
  • no limits on speed
  • no limits on request body (can be json, images, streams, etc)

Epistula replaces the axon interface for subnet 4. With this new build, all Epistula requests allow miners to primarily focus on speed for their responses rather than being unfairly scored lower due to blackbox code that they are not privy to. Epistula lets miners and validators use any software they choose to interface with requests. Miners could find faster or better http servers, and are no longer locked to fastapi, let alone python.

Why we are releasing as v2 instead of v1?

With our initial release of Epistula being a silent roll out we took this time to identify any mistakes that needed attention.

v1 at its core is simply a header that is the signature of the request body. The header body-signature is the signature created via the sender’s ed25519 key. In Bittensor this is generally the users hotkey.

With this implementation we noticed that miners were prone to DDOS attacks as they had to decode the entire body to determine if the signature was verified, which was expensive to compute. This was our initial motivation for a v2.

We noticed some important changes that were needed. These include, by moving the Epistula fields to the body we no longer require forced use of json. The previous iteration was not industry standard, siting most protocol level details should be in the headers. Finally v1 required full parse of body to verify the only signature (slow and costly). These ideas helped us migrate to our v2. The header now holds multiple signatures and a timestamp to determine a recent request and the validity of said request.

With this new protocol Manifold Labs is forging the path to truly open source and easy to use standards in Bittensor that will pave the way for the community to build products like Sybil.