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

After fast sync wallet is not in the same state as after pruning #896

Open
2 tasks
kostyantyn opened this issue Apr 4, 2019 · 3 comments
Open
2 tasks
Labels
feature New functionality p2p wallet
Milestone

Comments

@kostyantyn
Copy link
Member

Is your feature request related to a problem? Please describe

  1. After the fast sync, wallet transactions don't have inputs (as they are not part of UTXO) and wallet doesn't know about all spent transactions. Because of this, we can't see the full log of wallet transactions.
  2. CMerkleTx has a field nIndex which contains the position of the transaction in the block. We also don't have this field and it's set to 0.

Describe the solution you'd like
A node can recover missing inputs by asking peers for its full transactions.
To recover the position, we can either request the full block (too slow) or create a new p2p message that returns the needed leaves to reconstruct the merkle root and the position of our transaction.

@kostyantyn kostyantyn added feature New functionality wallet p2p labels Apr 4, 2019
@thothd thothd added this to the 1.0 milestone Apr 4, 2019
@kostyantyn kostyantyn changed the title After the fast sync wallet is not in the same sate as after the pruning After the fast sync wallet is not in the same state as after the pruning Apr 4, 2019
@scravy
Copy link
Member

scravy commented Apr 4, 2019

Since this is tagged 1.0, I wonder if #885 is that urgent.

I would prefer not to rush this for a perceived quick win. Especially the wallet (pruning, fast sync, SPV/light, merging with bitcoin 0.17, 0.18) will require some serious thinking.

@kostyantyn
Copy link
Member Author

@scravy #883 seems not related much to this. Do you mean #885 ?

@scravy scravy changed the title After the fast sync wallet is not in the same state as after the pruning After fast sync wallet is not in the same state as after pruning Apr 5, 2019
@scravy
Copy link
Member

scravy commented Apr 5, 2019

I do. Edited.

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

No branches or pull requests

3 participants