Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction not spendable #1740

Open
jholdstock opened this issue May 13, 2020 · 1 comment
Open

Transaction not spendable #1740

jholdstock opened this issue May 13, 2020 · 1 comment
Assignees

Comments

@jholdstock
Copy link
Member

jholdstock commented May 13, 2020

I own the address TsiYnTiBdVshdDTMi4P88v4WrHUUDv3Updx which I have used for mining on testnet. Occasionally I will receive transactions which I am then unable to spend.

For example, dc98c495538d5c2b412da8265a83134746c74529db553ab7f78e8df1440b4360 pays to my address, and I see a dcrwallet log line indicating so:

2020-05-12 14:54:30.126 [DBG] WLLT: Marking transaction dc98c495538d5c2b412da8265a83134746c74529db553ab7f78e8df1440b4360 output 2 (1.93182412 DCR) spendable

However, upon an attempt to spend the output ~20 minutes later I get:

2020-05-12 15:16:05.152 [ERR] GRPC: Unary method /walletrpc.WalletService/SignTransaction invoked by 127.0.0.1:33952 errored: rpc error: code = Unknown desc = wallet.SignTransaction: dc98c495538d5c2b412da8265a83134746c74529db553ab7f78e8df1440b4360:2 not found

The wallet was running non-stop throughout this period. The outputs received in transactions immediately before this one, and immediately after this one, are both spendable.

Providing the full log for this time period here: https://pastebin.com/TxZTNJ8b. It may be note-worthy that the log line indicating the output is spendable actually appeared twice, apparently due to a re-org.

Transaction is not returned when querying the wallet with dcrctl:

$ dcrctl --wallet gettransaction dc98c495538d5c2b412da8265a83134746c74529db553ab7f78e8df1440b4360
-5: no information for transaction

The above behaviour was seen on dcrwallet release 1.5.1, built from source locally. The issue is resolved by a wallet rescan - the transaction can be retrieved using gettransaction and the output becomes spendable.

@jrick
Copy link
Member

jrick commented Apr 22, 2021

This is an issue with our reorg handling under the rpc syncer (the syncers themselves are responsible with providing the relevant txs for blocks they are trying to attach). When a block is reorged out of the main chain, and a later reorg adds it back in, the relevant txs from this block are not recorded in the wallet any longer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants