Author

Topic: Signing Transaction Failed ( 0,5 btc reward for fixing answer) (Read 3163 times)

legendary
Activity: 1512
Merit: 1036
The error comes from wallet.cpp:
Code:
                // Sign
                int nIn = 0;
                BOOST_FOREACH(const PAIRTYPE(const CWalletTx*,unsigned int)& coin, setCoins)
                    if (!SignSignature(*this, *coin.first, wtxNew, nIn++))
                    {
                        strFailReason = _("Signing transaction failed");
                        return false;
                    }

SignSignature is two functions, the former is called, and the False status is returned by the final VerifyScript call.

Code:
bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CTransaction& txTo, unsigned int nIn, int nHashType)
{
    assert(nIn < txTo.vin.size());
    CTxIn& txin = txTo.vin[nIn];

    // Leave out the signature from the hash, since a signature can't sign itself.
    // The checksig op will also drop the signatures from its hash.
    uint256 hash = SignatureHash(fromPubKey, txTo, nIn, nHashType);

    txnouttype whichType;
    if (!Solver(keystore, fromPubKey, hash, nHashType, txin.scriptSig, whichType))
        return false;

    if (whichType == TX_SCRIPTHASH)
    {
        // Solver returns the subscript that need to be evaluated;
        // the final scriptSig is the signatures from that
        // and then the serialized subscript:
        CScript subscript = txin.scriptSig;

        // Recompute txn hash using subscript in place of scriptPubKey:
        uint256 hash2 = SignatureHash(subscript, txTo, nIn, nHashType);

        txnouttype subType;
        bool fSolved =
            Solver(keystore, subscript, hash2, nHashType, txin.scriptSig, subType) && subType != TX_SCRIPTHASH;
        // Append serialized subscript whether or not it is completely signed:
        txin.scriptSig << static_cast(subscript);
        if (!fSolved) return false;
    }

    // Test solution
    return VerifyScript(txin.scriptSig, fromPubKey, txTo, nIn, SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC, 0);
}

bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CTransaction& txTo, unsigned int nIn, int nHashType)
{
    assert(nIn < txTo.vin.size());
    CTxIn& txin = txTo.vin[nIn];
    assert(txin.prevout.n < txFrom.vout.size());
    const CTxOut& txout = txFrom.vout[txin.prevout.n];

    return SignSignature(keystore, txout.scriptPubKey, txTo, nIn, nHashType);
}

That's all fun, but I think the problem here is there is garbage bytes written over the wallet.dat, or the berkeleydb store is corrupted, such as pointing to the wrong disk area for information. Time to rename this wallet and restore your wallet.dat backup, easy.

Oh, no backup... Well, make a backup now: copy the wallet.dat you've got to a backup filename. Then restart bitcoin with the -salvagewallet option to scrape wallet information into a new database.
legendary
Activity: 1367
Merit: 1000

I went to bitadress.org put in private key in wallet details.

It says in private key wif all zero's
Is your private key 5HpHagT65TZzG1PH3CSu63k8DbpvD8s5ip4nEB3kEsreAbuatmU ? lol
hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
...

Iv done all this before, i can dumpprivkey and i get the code but i cannot import that into another wallet or blockchain wallet. I get an error.

Have you tried removing the passphrase and importing the unencrypted wallet into blockchain.info? I've never imported a wallet.dat there, so I don't know how it handles them.

The only other things I can think of that could be the problem is that either you copied the key wrong and it's missing a character (I've done that before), you're using the public address instead of the private key (unlikely, private key starts with a 5, bitaddress.org can give you an example and it's pretty obvious) or that all your coins are in a change address and blockchain.info won't sweep an empty key (bitaddress.org would have worked, though, so it's probably not that).

Have you tried telling bitcoin-qt to rescan the blockchain yet? If so, did it give any errors, and how long did it take?

Also, can you post the public address here? DON'T post the private key, just the address you use to receive funds for that wallet (e.g. 1M8oUcBnkRDEhWWgV8ZXLTB6p1mgnejVbX).
member
Activity: 112
Merit: 10
...

Is your wallet encrypted? If so, try this:
Quote
launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase 600
type: dumpprivkey [your public key here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock
Typing "walletpassphrase 600" doesn't work if your passphrase isn't "600". Try the above, but replace the red text with your actual passphrase.

If your wallet's not encrypted, you can skip the "walletpassphrase" and "walletlock" steps.

If that still doesn't work, I'd suggest a rescan of the blockchain (close bitcoin-qt and run "bitcoin-qt --rescan" on the command line, it'll take a while to start). Try rebooting your computer too, that can solve a lot of problems.

I cannot use walletpassphrase yourpasshere without the 600 i get an error then :

walletpassphrase
Stores the wallet decryption key in memory for seconds. (code -1)
Sorry, I forgot about the timeout. The command you want is "walletpassphrase 600". Bitcoin-qt should show a lock icon in the lower right corner of the main window, it will show as an open lock once when wallet is successfully locked. It will automatically lock again after 10 minutes or when you use the "walletlock" command, whichever is first.

Iv done all this before, i can dumpprivkey and i get the code but i cannot import that into another wallet or blockchain wallet. I get an error.
hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
...

Is your wallet encrypted? If so, try this:
Quote
launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase 600
type: dumpprivkey [your public key here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock
Typing "walletpassphrase 600" doesn't work if your passphrase isn't "600". Try the above, but replace the red text with your actual passphrase.

If your wallet's not encrypted, you can skip the "walletpassphrase" and "walletlock" steps.

If that still doesn't work, I'd suggest a rescan of the blockchain (close bitcoin-qt and run "bitcoin-qt --rescan" on the command line, it'll take a while to start). Try rebooting your computer too, that can solve a lot of problems.

I cannot use walletpassphrase yourpasshere without the 600 i get an error then :

walletpassphrase
Stores the wallet decryption key in memory for seconds. (code -1)
Sorry, I forgot about the timeout. The command you want is "walletpassphrase 600". Bitcoin-qt should show a lock icon in the lower right corner of the main window, it will show as an open lock once when wallet is successfully locked. It will automatically lock again after 10 minutes or when you use the "walletlock" command, whichever is first.
member
Activity: 112
Merit: 10
The private key has been imported into my wallet, but after this i cannot send my coins anymore.

Also i cannot dumpprivkey and import into other wallet because that gives an error.

So basicly my coins are in my current wallet but somehow i cant send them, and i cannot import the private key into an other wallet anymore.

Is your wallet encrypted? If so, try this:
Quote
launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase
type: dumpprivkey [your public key here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock
Typing "walletpassphrase 600" doesn't work if your passphrase isn't "600". Try the above, but replace the red text with your actual passphrase.

If your wallet's not encrypted, you can skip the "walletpassphrase" and "walletlock" steps.

If that still doesn't work, I'd suggest a rescan of the blockchain (close bitcoin-qt and run "bitcoin-qt --rescan" on the command line, it'll take a while to start). Try rebooting your computer too, that can solve a lot of problems.

I cannot use walletpassphrase yourpasshere without the 600 i get an error then :

walletpassphrase
Stores the wallet decryption key in memory for seconds. (code -1)
hero member
Activity: 508
Merit: 500
Techwolf on #bitcoin and Reddit
The private key has been imported into my wallet, but after this i cannot send my coins anymore.

Also i cannot dumpprivkey and import into other wallet because that gives an error.

So basicly my coins are in my current wallet but somehow i cant send them, and i cannot import the private key into an other wallet anymore.

Is your wallet encrypted? If so, try this:
Quote
launch your bitcoin client as usual and wait for it to load the blockchain and start up
click on 'help' in the menu bar (top right)
click on 'debug window'
select the 'console' tab
type: walletpassphrase 600
type: dumpprivkey [your public key here]
this will return the private key, you can copy it now; ensure you clear your clipboard/history afterwards
type: walletlock
Typing "walletpassphrase 600" doesn't work if your passphrase isn't "600". Try the above, but replace the red text with your actual passphrase.

If your wallet's not encrypted, you can skip the "walletpassphrase" and "walletlock" steps.

If that still doesn't work, I'd suggest a rescan of the blockchain (close bitcoin-qt and run "bitcoin-qt --rescan" on the command line, it'll take a while to start). Try rebooting your computer too, that can solve a lot of problems.

EDIT: Forgot the wallet timeout Tongue
member
Activity: 112
Merit: 10
This is one interesting case. An exported private key that cannot be imported and a wallet that doesn't sign, that does sound like a corrupted wallet. Going to follow this.


The private key has been imported into my wallet, but after this i cannot send my coins anymore.

Also i cannot dumpprivkey and import into other wallet because that gives an error.

So basicly my coins are in my current wallet but somehow i cant send them, and i cannot import the private key into an other wallet anymore.
copper member
Activity: 3948
Merit: 2201
Verified awesomeness ✔
This is one interesting case. An exported private key that cannot be imported and a wallet that doesn't sign, that does sound like a corrupted wallet. Going to follow this.
sr. member
Activity: 336
Merit: 250
Cuddling, censored, unicorn-shaped troll.
I sent a pm to jackjack pointing to this thread, hopefully he can help with NPW.
I'm not sure he'll have time or be willing, though, so don't expect too much.

legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Nobody ?

I think you are at the stage of needing to grep through the source to work out where that error comes from.

Possibly you might be looking at a corrupted wallet but you might want to check it out a little further before giving up.
member
Activity: 112
Merit: 10
Nobody ?

Guess 2.08 bitcoins waisted then..
member
Activity: 112
Merit: 10
Then I think there was some error while exporting that private key.

You should double check steps described by: Kouye
https://bitcointalksearch.org/topic/m.3810656

Or try running this command before those described by him:
walletpassphrase "your walletpassphrase here" 600



I used walletpassphrase 600 before dumping the key.
legendary
Activity: 1876
Merit: 1475
Then I think there was some error while exporting that private key.

You should double check steps described by: Kouye
https://bitcointalksearch.org/topic/m.3810656

Or try running this command before those described by him:
walletpassphrase "your walletpassphrase here" 600

member
Activity: 112
Merit: 10
How does that private key look like?

Does it begin with 5 and have ~51 characters?

I recommend you to go to https://www.bitaddress.org/ choose tab "Wallet Details" and enter the private key you have.

Check if you can decode it there. If you can, try importing to a blockchain.info wallet what you get under "Private Key WIF".

If it still fails, let us know in what step and with what output.


Yes it start with a 5 an has 51 or 52 characters.

I went to bitadress.org put in private key in wallet details.

It says in private key wif all zero's
legendary
Activity: 1876
Merit: 1475
How does that private key look like?

Does it begin with 5 and have ~51 characters?

I recommend you to go to https://www.bitaddress.org/ choose tab "Wallet Details" and enter the private key you have.

Check if you can decode it there. If you can, try importing to a blockchain.info wallet what you get under "Private Key WIF".

If it still fails, let us know in what step and with what output.
sr. member
Activity: 336
Merit: 250
Cuddling, censored, unicorn-shaped troll.
Error importing private key: TypeError: this.x is null
I'm sorry, I've never seen this error before, maybe piuk can give some insight about possible causes, try to pm him, maybe.
https://bitcointalksearch.org/user/piuk-17928
member
Activity: 112
Merit: 10
Electrum might not be the best choice, seedless wallets did not allow importing, last time I checked.
Do you get the same error on a blockchain.info wallet?


Error importing private key: TypeError: this.x is null
sr. member
Activity: 336
Merit: 250
Cuddling, censored, unicorn-shaped troll.
Electrum might not be the best choice, seedless wallets did not allow importing, last time I checked.
Do you get the same error on a blockchain.info wallet?
member
Activity: 112
Merit: 10
Go to help=>Debuging Window=>Console and type
Code:
listunspent
Find one with an "amout" value big enough for your needs, copy the corresponding txid.
Go to blockchain.info, and paste the "txid"
Check the public address of yours that received the funds, copy it.
Back in the console of QT (you may need to use walletpassphrase before if you encrypted the wallet):
Code:
dumpprivkey your_address
Copy the result (do not share this with anyone, don't post it here, for example)
Back to blockchain.info
If you already have a wallet there, just import the private key using the import feature (and pasting the result of the dumpprivkey command). If not, create a wallet before importing.
From the blockchain wallet, send the coins to wherever you want.
Once the unspent output is clear, you can remove the private key from blockchain wallet (you need to archive it first, I think).

If that fails, please specify at which step it did, please.

Hello,

Ive done all, when i get my private key i try to import this in a new wallet for example electrum then i get the error : The following inputs could not be imported "under this is show the private key"
sr. member
Activity: 336
Merit: 250
Cuddling, censored, unicorn-shaped troll.
Go to help=>Debuging Window=>Console and type
Code:
listunspent
Find one with an "amout" value big enough for your needs, copy the corresponding txid.
Go to blockchain.info, and paste the "txid"
Check the public address of yours that received the funds, copy it.
Back in the console of QT (you may need to use walletpassphrase before if you encrypted the wallet):
Code:
dumpprivkey your_address
Copy the result (do not share this with anyone, don't post it here, for example)
Back to blockchain.info
If you already have a wallet there, just import the private key using the import feature (and pasting the result of the dumpprivkey command). If not, create a wallet before importing.
From the blockchain wallet, send the coins to wherever you want.
Once the unspent output is clear, you can remove the private key from blockchain wallet (you need to archive it first, I think).

If that fails, please specify at which step it did, please.
member
Activity: 112
Merit: 10
if anyone else has some ideas now would be about the right time to chime in.

You could try a -rescan, though I doubt that will do anything.
You could try Armory, which will give you more details.
You could try extracting the keys and importing them in another wallet.
You could try importing the wallet.dat in blockchain.info (https://blockchain.info/wallet/import-wallet)

Nope still not working, got 2.08 btc stuck in my wallet.

Who can help me fix the problem will get 0,5 btc !
full member
Activity: 168
Merit: 100
if anyone else has some ideas now would be about the right time to chime in.

You could try a -rescan, though I doubt that will do anything.
You could try Armory, which will give you more details.
You could try extracting the keys and importing them in another wallet.
You could try importing the wallet.dat in blockchain.info (https://blockchain.info/wallet/import-wallet)
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
I have tried sending 1 btc with 0.05 fee and it gives met the same errors. The amount send to this adress where aprox 0.16 per transaction.

In that case I think there must be something else wrong with your wallet (which I haven't heard of before) - if anyone else has some ideas now would be about the right time to chime in.
member
Activity: 112
Merit: 10
Small amounts.

Well depending upon "how small" it may be possible that you don't have enough to pay a tx fee (although 0.08 BTC would seem quite a lot even if you have a *lot* of small amounts).

Perhaps try a smaller amount (say 1.0 BTC) first to make sure that this isn't the case.


I have tried sending 1 btc with 0.05 fee and it gives met the same errors. The amount send to this adress where aprox 0.16 per transaction.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Small amounts.

Well depending upon "how small" it may be possible that you don't have enough to pay a tx fee (although 0.08 BTC would seem quite a lot even if you have a *lot* of small amounts).

Perhaps try a smaller amount (say 1.0 BTC) first to make sure that this isn't the case.
member
Activity: 112
Merit: 10
That is unusual then - if you don't mind me asking were the BTC you received in just a few txs or were there many small ones (this could affect things although hard to believe by that much)?


Small amounts.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
That is unusual then - if you don't mind me asking were the BTC you received in just a few txs or were there many small ones (this could affect things although hard to believe by that much)?
member
Activity: 112
Merit: 10
Its not sending at all i have 2.08 btc in my wallet i wanne send 2 btc to other adress and when i putt in pasword i get this error.

Okay - I haven't heard of this exact problem before - but just to make sure - are the 2.08 BTC funds you have already confirmed?


Balance: 2.08153629 BTC

Unconfirmed: 0.00 BTC
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
Its not sending at all i have 2.08 btc in my wallet i wanne send 2 btc to other adress and when i putt in pasword i get this error.

Okay - I haven't heard of this exact problem before - but just to make sure - are the 2.08 BTC funds you have already confirmed?
member
Activity: 112
Merit: 10
bitcion-qt v0.8.5-beta Wallet on my pc

And are the funds you are wanting to send already confirmed?


Its not sending at all i have 2.08 btc in my wallet i wanne send 2 btc to other adress and when i putt in pasword i get this error.
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
bitcion-qt v0.8.5-beta Wallet on my pc

And are the funds you are wanting to send already confirmed?
member
Activity: 112
Merit: 10
You'll need to provide a bit more information to get help with this - for a start what client or web wallet are you using?


bitcion-qt v0.8.5-beta Wallet on my pc
legendary
Activity: 1890
Merit: 1086
Ian Knowles - CIYAM Lead Developer
You'll need to provide a bit more information to get help with this - for a start what client or web wallet are you using?
member
Activity: 112
Merit: 10
Hello, Im trying to transfer my btc but first i get the error Signing Transaction failed, when i press ok i get another error saying transaction creation failed.
Jump to: