Bitcoin Forum

Bitcoin => Electrum => Topic started by: witke on June 04, 2017, 07:10:45 AM



Title: Error during offline transaction broadcast
Post by: witke on June 04, 2017, 07:10:45 AM
Hi,
trying to broadcast offline signed transaction, but got this error "The transaction was rejected by network rules. (16: mandatory-script-verify-flag-failed (Script failed an OP_WQUALVERIFY operation))". Electrum 2.8.3

Thanks


Title: Re: Error during offline transaction broadcast
Post by: ranochigo on June 04, 2017, 08:10:27 AM
Weird. How did you create the raw unsigned transaction and which client did you used to sign? If you used Electrum for both, could you tell us the version of it?

Paste the raw transaction here or alternatively you can PM me the signed raw transaction if you want privacy.


Title: Re: Error during offline transaction broadcast
Post by: witke on June 04, 2017, 01:37:14 PM
Thanks for replay.
It was both Electrum version 2.8.3. Tranaction was created on Windows 10 and signed on Linux (RPI) and then tried to broadcast it again on Windows 10. PM-ed content of both files.


Title: Re: Error during offline transaction broadcast
Post by: HCP on June 04, 2017, 02:34:08 PM
trying to broadcast offline signed transaction, but got this error "The transaction was rejected by network rules. (16: mandatory-script-verify-flag-failed (Script failed an OP_WQUALVERIFY operation))". Electrum 2.8.3
Did you copy and paste that error? or type it in manually... because it should be OP_EQUALVERIFY.... not OP_WQUALVERIFY ???

If it was copy/paste... Did you accidentally modify one of the transaction files while you were moving things around?


Title: Re: Error during offline transaction broadcast
Post by: HI-TEC99 on June 04, 2017, 03:57:36 PM
Are you using electrum version 2.8.3 on both windows and linux, or is the linux electrum version older than 2.8.3?


Title: Re: Error during offline transaction broadcast
Post by: witke on June 04, 2017, 04:23:20 PM
On Windows and Linux it's the same version 2.8.3


Title: Re: Error during offline transaction broadcast
Post by: witke on June 04, 2017, 04:52:14 PM
trying to broadcast offline signed transaction, but got this error "The transaction was rejected by network rules. (16: mandatory-script-verify-flag-failed (Script failed an OP_WQUALVERIFY operation))". Electrum 2.8.3
Did you copy and paste that error? or type it in manually... because it should be OP_EQUALVERIFY.... not OP_WQUALVERIFY ???

If it was copy/paste... Did you accidentally modify one of the transaction files while you were moving things around?

It was typed manually and should be "E" instead of "W" - can't directly copy/paste this Windows error message. Can't imagine any possibility when the transaction file could be modified. It was saved on pendrive directly from Electrum wallet (not by copy/paste).


Title: Re: Error during offline transaction broadcast
Post by: HCP on June 05, 2017, 01:05:30 AM
I figured as much... but it pays to be methodical in cases like this... plus, hardly anyone ever types out such long error messages! haha

As I understand it, OP_EQUALVERIFY enforces that the pubkey hash in the UTXO and the pubkey hash provided for new transaction must be equal. This proves you have 'ownership' of the private key. This OP will fail if you have used the wrong key or no key when signing the transaction. (Reference: https://bitcoin.org/en/developer-guide#p2pkh-script-validation)

Is it possible that your offline machine hasn't got the private key for the 'address' (aka pubkey) that was referenced in the UTXO attempting to be used? Are you spending from an HD wallet or an "old style" wallet comprised of a collection of unrelated private keys (or from a wallet with imported private keys)?


Title: Re: Error during offline transaction broadcast
Post by: witke on June 05, 2017, 05:34:57 AM
I'm using wallet with imported single private key. For testing purposes, connected my Linux 'cold' wallet to the internet and it was the same error (so it excludes suspicious diffirent versions of Python libraries). When the transaction file is created by standard wallet (with imported private key), everyfing goes fine. This error occures only in case of creating transaction file by online "watch only" wallet.