ElectrumSV Paymail Roadmap

Why ElectrumSV does not have Paymail support yet, and what needs to be done to get us there.

Image for post
Image for post
Is it much further Papa Smurf?

I do not claim to be a Bitcoin expert, just one developer of a Bitcoin-based application. If something is misguided or wrong, please point it out. That would be the main benefit for me, for writing this article.

I won’t mention that this article is probably boring, because that would predispose you to interpreting it as boring. Boring boring boring boring boring boring boring boring boring boring boring boring boring boring boring boring boring boring boring. Read on if you want to know the details of what we have to do to get Paymail integrated!

The initial plan

When the news came that Paymail was going to be launched at CoinGeek Toronto, the plan was to try and get it done before then. We currently have two branches, our unstable development branch and our stable branch. The development for the Paymail feature was started in our stable branch, as the development one includes some more extensive changes I did not want to have to deal with in order to get Paymail out in the short-term.

Differences from other wallets

When people say, “I’m developing a Paymail host.” I ask them who is going to use it. You may wonder what I mean.

Consider this, Moneybutton is a wallet service, Handcash is a wallet service and Centbee is a wallet service. They provide commercial trusted and quality services on behalf of their wallet users. This involves servers, and knowledge of their users payment addresses and generally enhancing the user’s experience as an internet-based service. They can and likely do have a database of the addresses that have been generated on a user’s behalf, and easily build and integrate a Paymail service on top of it

ElectrumSV is itself your own independent wallet service. It is an application and has no servers. It can never host your Paymail itself. A Paymail host for an ElectrumSV wallet would require uploading the method of generating addresses for an ElectrumSV user, and likely require ElectrumSV to connect and synchronise in order to provide a quality experience. This isn’t bad, it’s just quite different from the hosting Paymail for a specific commercial wallet service, as the above businesses would do.

So who is going to use the Paymail host Jolene Bloggs write? Not those businesses, that would create a lot of work that would distract from providing the already excellent experiences they already do. Not ElectrumSV, as she has no idea how we are going to generate addresses for our users, and we don’t want to have to integrate and support everyone else’s way of generating addresses until the end of time! That would create a huge amount of work for us, we have to do it the best way for us to work well, and reduce ongoing demands on our time.

Let’s move on and consider it Jolene’s problem.

Finding the right address

The user interface work was pretty much done before the CoinGeek conference. I also implemented the core of the server infrastructure for the Paymail hosting ElectrumSV will provide. What wasn’t done, and what I decided couldn’t be done in the stable branch, was the work to integrate the addresses the Paymail host gives out, so that ElectrumSV can monitor them.

In theory, I could just take an ElectrumSV wallet’s master public key, and give it to our Paymail host. Then it could generate the same addresses as the wallet itself, and the wallet would monitor the addresses the Paymail host gives out the same way it monitors the addresses the wallet itself gives out.

But my belief is that this is a terrible idea. The key problem is that this locks in address reuse. If you don’t know, Uncle Craig tells us that address reuse is bad, you can go and read his writings or the writings of others to find out why. I agree, and we’re not going to support it. ElectrumSV has no way of knowing what addresses the Paymail host is giving out, and the Paymail host has no way of knowing what addresses ElectrumSV gives out. So nothing prevents either of them from giving out the same addresses. We can do better.

It doesn’t matter how we do it better, it comes down to ElectrumSV monitoring and using it’s own sequence of addresses, and assigning a second sequence of addresses for Paymail to give out. Then ElectrumSV can monitor and spend from these, but not give them out. However, ElectrumSV wallet internals limit each wallet to one type of wallet functionality. It can be an ElectrumSV wallet, it can be a watch only wallet of your yours.org or moneybutton.com wallet, it can be a multi-signature wallet and so on. But it cannot contain one of each of these. And this is the core problem, going into the future we want ElectrumSV to be one wallet with all your different keys inside it, and different accounts for each key, and even for separated fund accounts.

Image for post
Image for post
A wallet will contain a lot of accounts if the user wants.

Putting it simply, for the purposes of Paymail your wallet would contain two accounts. The default one when you created it, and the Paymail account you add. Each would have it’s own extended private key. And going forward we’d extend the account concept as a basic element of ElectrumSV’s future.

Because the source code in the development branch and the stable branch differ so much, if we did this in the stable branch we’d have to completely redo it in the development branch. It’d create more than twice the work. The best thing to do is just discard the concept of doing it in the short term in the stable branch, and move forward doing the infrastructure for the account system we need and will have to do anyway in the development branch.

So where does that leave us?

The roadmap to Paymail support at this time is:

  1. Refactor our wallet and key support to allow a wallet to contain multiple accounts and keys.
  2. When someone creates a Paymail identity in the ElectrumSV wallet, add it as a second account.
  3. Initially the user will copy the identity to give to the ElectrumSV Paymail host. They will paste it into a form on the website, and the host will parse it.
  4. Extend the ElectrumSV Paymail host to be production ready.
  5. Stabilise a release from the development branch.

What then?

We, the ElectrumSV developers, may not be offering Bitcoin SV Paymail hosting. We may however be offering testnet and scaling testnet Paymail hosting.

The reason for this is that providing a secure internet service is a lot of work that adds to our obligations, and takes away from the time we have available to actually work on ElectrumSV. The other more handsome mobile and web-based wallets already have secured and trusted services, and that is what they do well.

I think it’s in our users best interests for us to provide trusted hosting for them, but whether it will be possible for us to do so without being too expensive attention-wise, is unknown at this time. Whether we do or not, if there are trusted businesses in the BSV eco-system who implement our hosting model, I believe it is in our users interests that we list alongside or in lieu of any service we do or do not provide.

Comments below! Or on the most excellent Metanet.ICU slack, or Unwriter’s also excellent slack.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store