Forking Copay vs Electrum


#1

Hello

First of all, a big shout-out to the Bitcore team for building a great collection of tools in the Bitcoin ecosystem.

Some context for my questions first
Context Start
I am working on a cryptocurrency project that required forking Bitcoin’s C++ codebase (https://github.com/bitcoin/bitcoin) - and introducing significant changes in it - including but not limited to
a) moving away from elliptic curve cryptography to another cryptographic scheme
b) a new proof of work algorithm

Besides the wallet functionality that will come in the forked full node, I would also like to build a light wallet for the cryptocurrency. In this regard, I am considering forking an existing wallet codebase - and specially considering between CoPay and Electrum.
Context End

Questions

Now my understanding is (please correct me if I am wrong) that
a) CoPay uses BWS which in turn uses Bitcore-Node
b) Bitcore-Node is a full node implementation of Bitcoin in Node.js

Question 1 : So if I were to use CoPay, would I have to fork and maintain two full node implementations i.e. the Bitcoin C++ code that we are already forking ; and then Bitcore-Node in order to make CoPay work. (Of course, this is besides forking CoPay and BWS to make them work for the new cryptocurrency)?

I understand that both Electrum and CoPay have their respective strengths and weaknesses
For Electrum, my understanding is that

  • Electrum wallet talks to an Electrum Server which in turn talks to a Bitcoin node

So atleast on the face of it, it appears that with Electrum, I would have to fork just one full node implementation (C++) and then fork and maintain Electrum Server (ElextrumX) and the wallet.

Question 2 : I am wondering if, in general, CoPay’s strength lies in MultiSig and wallet collaboration, whereas Electrum is the project that’s more fork-friendly for new coins, specially if for the new (BItcoin forked) coin, the full node fork requires massive changes.

Really look forward to responses on this. Happy to explain if something is not clear. Thanks in advance.


(Nohea) #2

I looked at this too, a year and a half ago. ElectrumX is much simpler. However, client features are more limited.

Copay + BWS + Insight + non-standard bitcoind v0.12.x has more features as you noted, but it is brittle under the hood for a number of reasons:

  • depends on custom utxo indexes inside bitcoind. You would have to port them from bitpay’s bitcoin v0.12.x to the latest
  • Insight block explorer depends on that custom core. If you don’t want that you need to swap out for another block explorer with utxo indexs
  • bitcore wallet service would have to port to that block explorer. It would also need to add support for transactions in the mempool to report wallet coins which were just spent but not written to chain yet
  • copay would need to port certain things.

See my other answer for a diagram:


#3

Thanks Nohea! This is highly useful! :slight_smile:

Regards