Bitcoin Forum

Bitcoin => Electrum => Topic started by: dmcdad on August 08, 2017, 07:46:20 PM



Title: offline signing of BCC transaction using normal (non-BCC) Electrum
Post by: dmcdad on August 08, 2017, 07:46:20 PM
I understand the recommended process to extract BCC form an Electrum wallet: move BTC to new wallet first, install or restore old wallet with Electrum Cash, move BCC coins. Is it possible for Electrum to sign unsigned transactions created by Electrum Cash?


Title: Re: offline signing of BCC transaction using normal (non-BCC) Electrum
Post by: pooya87 on August 09, 2017, 02:49:51 AM
the first problem is, electrum (which is working on bitcoin chain) signs transactions differently than electron cash (which is working on bitcoin cash chain). it is the sighash flag they each use. the electron cash one has a sighash of SIGHASH_FORKID (i think appended to the SIGHASH_ALL). that means you need a cash wallet to sign it properly.

the second problem is that electrum is working on bitcoin chain :)
you can not push a bitcoin cash transaction to a bitcoin chain and electrum (the online one) does not connect to the other nodes.


Title: Re: offline signing of BCC transaction using normal (non-BCC) Electrum
Post by: HCP on August 09, 2017, 06:42:13 AM
TLDR: Is it possible for Electrum to sign unsigned transactions created by Electrum Cash?
TLDR: No.


Long Version:
The BCC devs changed the SIGHASH algorithm for BCC to provide 2-way replay protection... so a BCC transaction is not valid on BTC network... and a BTC transaction is not valid on BCC network.

This has already proven "problematic" for peeps with Electrum 2FA wallets, who created ElectronCash 2FA wallets (using the Electrum 2FA seed) and attempted to spend coins. TrustedCoin doesn't support BCC, so they were signing the transaction as a BTC transaction and the BCC network would then reject the transaction (wrong SIGHASH).

This is effectively the same situation that you're describing... attempting to sign a BCC transaction (from Electron Cash) with a BTC sig (from Electrum)


Also, just to help avoid confusion, the BCC wallet that was forked from Electrum is now called "Electron Cash"


Title: Re: offline signing of BCC transaction using normal (non-BCC) Electrum
Post by: coinling on August 09, 2017, 02:49:02 PM

So why not just install electrum cash on your offline device ?

But for me it doesnt work anyway...

It would be great if offline signing on electrum cash works at all :)


Title: Re: offline signing of BCC transaction using normal (non-BCC) Electrum
Post by: HCP on August 09, 2017, 03:16:25 PM
Have you tried cloning the repo and compiling it yourself or running from source?

They've put in a couple of patches since 2.9.2 to fix Offline Signing:
https://github.com/fyookball/electrum/commit/17c34fce7c8de5475a57c3b3d9d3ca0e4d949347
https://github.com/fyookball/electrum/commit/e8e37beeb46de6bba831a814c08187a921c55473

So either clone and compile/run, or wait until next release and it should work. ;)