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

mempool utxo set is incorrect #618

Closed
jrick opened this issue Mar 15, 2017 · 0 comments · Fixed by #1471
Closed

mempool utxo set is incorrect #618

jrick opened this issue Mar 15, 2017 · 0 comments · Fixed by #1471
Labels

Comments

@jrick
Copy link
Member

jrick commented Mar 15, 2017

The mempool utxo set handling is wrong as it does not consider any unspent outputs in the latest block to be part of the utxo set. This causes issues with clients such as wallets that spend very new outputs that just got mined in the last block.

What's even more baffling here is not the missing outputs of the latest block, but that mempool outputs themselves are still allowed to be spent.

The reason for this bug is that there is confusion over what dcrd's block validation is for. Rather than thinking about blocks as invalid until they are confirmed, all blocks should be considered valid unless the next block in the main chain has invalidated them (I fixed this in wallet a while ago, and this is why with minconf=0 or 1 it still does choose to spend these outputs).

Thankfully this is NOT an issue for block processing, so fixing this does not involve a hard fork.

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

Successfully merging a pull request may close this issue.

2 participants