1

in attempting to answer Bitcoin-qt multiple wallets and transferring between?, and teach myself in the process, I created a new wallet.dat file and saved it to group_wallet.dat after generating an address. I then restored my_wallet.dat to be wallet.dat, and sent an AmericanCoin to that address. almost a full day later, the funds don't show up. the transaction is in the blockchain, but they never made it to the wallet. I've switched wallets back and forth a few times since then; the one from which I sent the money is fine, and shows the -1.0 transaction.

jcomeau@aspire:~/.americancoin$ americancoind getaddressesbyaccount ''
[
    "AzpvNNAUFYjW79uCS1Q9ALNSVhABqrUC1U",
    "Argr7YW2enzC7TkFp4cJiVDJ1wSYPkh5ox"
]
jcomeau@aspire:~/.americancoin$ americancoind getreceivedbyaddress AzpvNNAUFYjW79uCS1Q9ALNSVhABqrUC1U
0.00000000
jcomeau@aspire:~/.americancoin$ americancoind decoderawtransaction $(americancoind getrawtransaction 9982de4dc77eab126d2ad4837db477577bbeee733ef381c1889576cfbd328473)
{
    "txid" : "9982de4dc77eab126d2ad4837db477577bbeee733ef381c1889576cfbd328473",
    "version" : 1,
    "locktime" : 0,
    "vin" : [
        {
            "txid" : "45614d6a67973f9d4728a2724547f3b7e9274218df28599d63f50f112cfa1d8b",
            "vout" : 1,
            "scriptSig" : {
                "asm" : "304602210088aacfccfe71532a5bbfc3145bbff8c1f3470e228b35e879146b30ec4b3526b8022100f566b0aa825ee6786af3619f1e73d89d2b3902468c4a15082af0e15324fc37c201 02047541ccbfea550183dcd9cc21b11af6975339f61c5908f13b8f8d6d2c42fbdb",
                "hex" : "49304602210088aacfccfe71532a5bbfc3145bbff8c1f3470e228b35e879146b30ec4b3526b8022100f566b0aa825ee6786af3619f1e73d89d2b3902468c4a15082af0e15324fc37c2012102047541ccbfea550183dcd9cc21b11af6975339f61c5908f13b8f8d6d2c42fbdb"
            },
            "sequence" : 4294967295
        }
    ],
    "vout" : [
        {
            "value" : 25.74101000,
            "n" : 0,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 a1ddfc061b9f000cb647f3cd1c08e6fdeacf72ec OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914a1ddfc061b9f000cb647f3cd1c08e6fdeacf72ec88ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "AusMMF3ETMkzvhfTUp61NoWBcCDoHcn9rQ"
                ]
            }
        },
        {
            "value" : 1.00000000,
            "n" : 1,
            "scriptPubKey" : {
                "asm" : "OP_DUP OP_HASH160 d840edbda2020b44b9fa4ad8ff912e79eb3cc000 OP_EQUALVERIFY OP_CHECKSIG",
                "hex" : "76a914d840edbda2020b44b9fa4ad8ff912e79eb3cc00088ac",
                "reqSigs" : 1,
                "type" : "pubkeyhash",
                "addresses" : [
                    "AzpvNNAUFYjW79uCS1Q9ALNSVhABqrUC1U"
                ]
            }
        }
    ]
}

there may be multiple ways to find out what block it's in, but I stumbled upon one yesterday by attempting to resend the raw transaction:

jcomeau@aspire:~/.americancoin$ americancoind sendrawtransaction $(americancoind getrawtransaction 9982de4dc77eab126d2ad4837db477577bbeee733ef381c1889576cfbd328473)
error: {"code":-5,"message":"transaction already in block 29ddf391af012069f02a6e120348d5206548d50f818cad4d5182f28540d842fd"}
jcomeau@aspire:~/.americancoin$ americancoind getblock 29ddf391af012069f02a6e120348d5206548d50f818cad4d5182f28540d842fd | grep confirm
    "confirmations" : 167,

I'm well aware that one needs to get 120 confirmations on a block to get the block reward, but transactions, as I understand, are considered valid after 6. but this has surpassed even the 120. so where is the coin? I'm assuming someone else generated the same address with a different private key. if they instead stole my wallet (by cracking my netbook) it should still show up in the transaction list.

but is that the most likely possibility? there almost has to be something I'm overlooking.

2

bitcoind (and hence presumably also americancoind) keeps a separate database of "relevant" transactions so that it does not have to search the entire blockchain all the time. Since you added a new address by copying wallet.dat, the daemon may never have figured out that transactions involving that address are relevant.

Try rebuilding this database with americancoind -rescan. You can also try americancoind -reindex to rebuild all databases (this may take a long time depending on the size of the blockchain).

It's extremely unlikely that someone else managed to generate a private key with the same address. If this were at all feasible, the currency would be useless. Moreover, even if this had happened, what you should see would be your transaction sending one coin to Azpv... and then another transaction created by the attacker, sending the coin to an address controlled by him.

  • okay thanks! yes that makes sense. I'll delete my bad answer on the other question then! – jcomeau_ictx Jan 7 '14 at 18:49

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.