Author

Topic: Error: mandatory-script-verify-flag-failed (Signature is found in scriptCode) (Read 105 times)

newbie
Activity: 22
Merit: 10
also therse two


'ckey':02545d2c25b98ec8827f2d9bee22b7a9fb98091b2008bc45b3b806d44624dc038c -> 527ff070371320bb53f57b2d470bd897c7a09ae4b77f1f463d9fc1d5ce9a01d46a6d08dee559a9b bbc9d993bc4c287c4
'mkey':00 -> 30cec646179a7f947349a0aa99ec7122b01f72bf18ffa4fdc760635d8c13109da196d3dc802d5aa bb23fa6c6aaba9a1dbb0804436c19f8b3699f00000000caa0000000
newbie
Activity: 22
Merit: 10
Thank you Pooya ,
i got the raw transaction from playing around with the core console ,
im curious to know what this means :

  ],
    "minversion": 60000,
    "mkey": {
        "crypted_key": "e53dc0c24dfa4532c885c9fe385f738dcace7ac50d843272b6e9ec834ac9a85bf1fa71176423ec7 80848d099d5856746",
        "nDerivationMethod": 0,
        "nDeriveIterations": 127854,
        "nID": 1,
        "salt": "f61f668243cb1ca5",
        "vchOtherDerivationParameters": ""
    },
    "orderposnext": "unsupported",
    "settings": {
        "addrIncoming": "0.0.0.0:0"
    },
    "tx": "unsupported",
    "version": 190001
}
legendary
Activity: 3444
Merit: 10558
This is from a wallet.dat file from a friend who is probably worse than me
i loaded the file into bitcoin core , the password to unlock the wallet works
I don't mean to jump to conclusions but these are usually signs of having a fake wallet file, specially since it contains a popular transaction the scammers use in these fake files.
You should make sure your friend has actually created this wallet himself and hasn't bought it.

Quote
but sending from the core interface gives a transaction signing error
How did you come up with the signed transaction you posted above?

Quote
i tried dumpprivkey function and i get private key not known for the address
Technically the output you are trying to spend doesn't have any address since it is a P2PK output. So you should check if the private key you get produces the same public key
Code:
04f51f8d0c4dc4a5338bef745098e6f6364f8936fee6aa5a9d4ab0c214e7cdd727f094f442779b37d9046e53ea3f0b988aefaa6e0adb0662155cd763229e8519aa
newbie
Activity: 22
Merit: 10
thank you , How do i fix it ?
Do you actually have the private key to the 340 bitcoins in that output from 11 years ago or are you trying to fake it?
If it is the later then don't waste your time or other's since it is not possible, if it were bitcoin wouldn't have lived past 2009.

If it is the former then you can use the bitcoin core's signrawtransactionwithkey command to sign the transaction you posted here with the actual private key (you probably should remove the signature from it first). You can do it offline without syncing bitcoin core (if you haven't synced already) then broadcast it through a block explorer or an SPV client like Electrum if privacy is not a concern.
Docs: https://bitcoincore.org/en/doc/0.21.0/rpc/rawtransactions/signrawtransactionwithkey/

Obviously i dont know what i am doing , This is from a wallet.dat file from a friend who is probably worse than me , i loaded the file into bitcoin core , the password to unlock the wallet works , but sending from the core interface gives a transaction signing error , when i try to send from the console it says insufficient balance ,( probably because the wallet wasnt synced then )  then this error reported in this post , i tried dumpprivkey function and i get private key not known for the address , validate address gives true and gives correct public key ,
legendary
Activity: 3444
Merit: 10558
thank you , How do i fix it ?
Do you actually have the private key to the 340 bitcoins in that output from 11 years ago or are you trying to fake it?
If it is the later then don't waste your time or other's since it is not possible, if it were bitcoin wouldn't have lived past 2009.

If it is the former then you can use the bitcoin core's signrawtransactionwithkey command to sign the transaction you posted here with the actual private key (you probably should remove the signature from it first). You can do it offline without syncing bitcoin core (if you haven't synced already) then broadcast it through a block explorer or an SPV client like Electrum if privacy is not a concern.
Docs: https://bitcoincore.org/en/doc/0.21.0/rpc/rawtransactions/signrawtransactionwithkey/
newbie
Activity: 22
Merit: 10
Thank you pooya ,
here is the raw transaction :

0100000001df67f74f0ddc3266f2d75429fd2e52977c1de2b179c7bdfa861b89698acfa73900000 00048473044022063e08ee9a2e4cd962ef4066cba03cffda20648f8287adec44f101d85505efdca 022020539a24229f910091926674cc082bf7ed4a7e40d3c24446f6b20e3b8921ef8d01ffffffff0 1803df6e9070000001976a9144462fabfb656875bdbe57b37c9a3051b2bea082b88ac00000000
Did you get the initial error message (Signature is found in scriptCode) on this transaction? Because that makes no sense for that, however the second error message could be thrown for this tx if I'm not mistaken.

In any case this transaction is invalid simply because the signature you provided in it's signature script is invalid. So after evaluation, the OP_CHECKSIG would push false to the stack and the last step would require true to be the last item on the stack which it is not so it is rejected.
thank you , How do i fix it ?
legendary
Activity: 3444
Merit: 10558
Thank you pooya ,
here is the raw transaction :

0100000001df67f74f0ddc3266f2d75429fd2e52977c1de2b179c7bdfa861b89698acfa73900000 00048473044022063e08ee9a2e4cd962ef4066cba03cffda20648f8287adec44f101d85505efdca 022020539a24229f910091926674cc082bf7ed4a7e40d3c24446f6b20e3b8921ef8d01ffffffff0 1803df6e9070000001976a9144462fabfb656875bdbe57b37c9a3051b2bea082b88ac00000000
Did you get the initial error message (Signature is found in scriptCode) on this transaction? Because that makes no sense for that, however the second error message could be thrown for this tx if I'm not mistaken.

In any case this transaction is invalid simply because the signature you provided in it's signature script is invalid. So after evaluation, the OP_CHECKSIG would push false to the stack and the last step would require true to be the last item on the stack which it is not so it is rejected.
newbie
Activity: 22
Merit: 10
You should share the raw transaction you are broadcasting here because sometimes these error messages can happen for a couple of reasons.
The first error message seems to happen when your scriptCode contains a signature (a non-standard problem): https://github.com/bitcoin/bitcoin/blob/623745ca74cf3f54b474dac106f5802b7929503f/src/script/interpreter.cpp#L355
The second error I've seen happening for unrelated cases that has nothing to do with CHECK(MULTI)SIG.
Thank you pooya ,
here is the raw transaction :

0100000001df67f74f0ddc3266f2d75429fd2e52977c1de2b179c7bdfa861b89698acfa73900000 00048473044022063e08ee9a2e4cd962ef4066cba03cffda20648f8287adec44f101d85505efdca 022020539a24229f910091926674cc082bf7ed4a7e40d3c24446f6b20e3b8921ef8d01ffffffff0 1803df6e9070000001976a9144462fabfb656875bdbe57b37c9a3051b2bea082b88ac00000000
legendary
Activity: 3444
Merit: 10558
You should share the raw transaction you are broadcasting here because sometimes these error messages can happen for a couple of reasons.
The first error message seems to happen when your scriptCode contains a signature (a non-standard problem): https://github.com/bitcoin/bitcoin/blob/623745ca74cf3f54b474dac106f5802b7929503f/src/script/interpreter.cpp#L355
The second error I've seen happening for unrelated cases that has nothing to do with CHECK(MULTI)SIG.
newbie
Activity: 22
Merit: 10
Greetings and happy new year to all ,
i am a log time lurker , but the time has come to post something ,
I need help figuring out where the error when trying to send this raw transaction , when i try to broadcast  i get this error
Code: -26, Error: mandatory-script-verify-flag-failed (Signature is found in scriptCode)
the same error comes up using Bitocoin core , electrum or any other online push transaction service ,




After a few attemps , now i am getting this error :

Code: -26, Error: mandatory-script-verify-flag-failed (Signature must be zero for failed CHECK(MULTI)SIG operation)
newbie
Activity: 22
Merit: 10
Greetings and happy new year to all ,
i am a log time lurker , but the time has come to post something ,
I need help figuring out where the error when trying to send this raw transaction , when i try to broadcast  i get this error
Code: -26, Error: mandatory-script-verify-flag-failed (Signature is found in scriptCode)
the same error comes up using Bitocoin core , electrum or any other online push transaction service ,


Jump to: