1

I'm trying to push the following transaction but keep getting OP_EQUALVERIFY: non-equal data

Here's the transaction

010000000122b2853f3145d35a56fc52cacda7d5ffe7e8f76b9fc2aecd312c899f5e41671a000000008c493046022100e484f5550ced311af2efb111237a54d0d93e68ac03ed5d084c669ae69afc36c902210087e69ce39c91936a4ec6fd66fb3b98d920a5ce4c3660a5519f9aa802787b09bb0141047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080ffffffff0101000000000000001976a914221382696ab041ff0bce2aceeea15132d9336fd488ac00000000

And here it is decoded

{
   "lock_time":0,
   "size":225,
   "inputs":[
      {
         "prev_out":{
            "index":0,
            "hash":"1a67415e9f892c31cdaec29f6bf7e8e7ffd5a7cdca52fc565ad345313f85b222"
         },
         "script":"493046022100e484f5550ced311af2efb111237a54d0d93e68ac03ed5d084c669ae69afc36c902210087e69ce39c91936a4ec6fd66fb3b98d920a5ce4c3660a5519f9aa802787b09bb0141047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080"
      }
   ],
   "version":1,
   "vin_sz":1,
   "hash":"fff4294e225832d1649f244b1a93651126b1f92b3f5eaf03500ea38bb9a6127b",
   "vout_sz":1,
   "out":[
      {
         "script_string":"OP_DUP OP_HASH160 221382696ab041ff0bce2aceeea15132d9336fd4 OP_EQUALVERIFY OP_CHECKSIG",
         "address":"147BM4WmH17PPxhiH1kyNppWuyCAwn3Jm4",
         "value":1,
         "script":"76a914221382696ab041ff0bce2aceeea15132d9336fd488ac"
      }
   ]
}
  • 1
    Your value is also incorrect, this transaction if valid would destroy your money into fees. Use the testnet for experimenting with Bitcoin or you have a very high risk of losing your money. – Anonymous Jun 17 '15 at 18:09
3

This particular error message on bc.i means that the transaction is invalid due to OP_EQUALVERIFY operation failed

scriptSig is:

493046022100e484f5550ced311af2efb111237a54d0d93e68ac03ed5d084c669ae69afc36c902210087e69ce39c91936a4ec6fd66fb3b98d920a5ce4c3660a5519f9aa802787b09bb01
41047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080

So the public key is:

047920bd57b7b0dbf7ac242879ee1f1c4b87cbe30a1c31baa4d111850865042415d84f0a433174b3b17f41e280bfef85ff885dd8a1f25bf0823cfd77ec81bfc080

This is uncompressed public key and its address is 1Lj3WeRAmyN98jyiWE6AtnMKfzUzrPUL9z

But 1a67415e9f892c31cdaec29f6bf7e8e7ffd5a7cdca52fc565ad345313f85b222:0 sends bitcoins to the another address: 1LCrg6DSqbcK5vh7XRAGEQA4jBpNigjwyV

Are you sure that you use uncompressed public key instead of compressed one?

  • So I'm using bitcoinlib-js to build the transactions for me. I don't actually set the public key, they derive it from my public key. I'll look into this though. – Aakil Fernandes Jun 17 '15 at 17:46
  • Can I ask how you derived the public key from the scriptSig please- i cannot find a way how to do it – Peter PitLock Aug 17 '16 at 12:35
  • Peter, scriptSig for p2pkh-outputs has very simple structure: two push operations. First push is signature+hashtype. Second push is pubkey. – amaclin Aug 17 '16 at 18:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.