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

Implement MempoolStore #2188

Closed
wants to merge 36 commits into from

Conversation

@nopara73
Copy link
Collaborator

commented Aug 28, 2019

Closes #1609

This PR makes mempool transactions wallet independent. So if one user sends money from one wallet to another one, then the transaction will not be lost. This moves us towards to multi-wallet monitoring.

ToDo:

  • Add serialization (IndexStore like) - Can we just append tx to a file every time a new transaction arrives. And if multiple processes using the same file, then whatever, we make sure to get unique elements at every startup and rewrite the whole file.
  • Add backwards compatibility (so unconfirmed txs don't get lost at first start.)
  • Address @yahiheb's review
  • Fix failed tests.
  • Test if I lose unconfirmed transactions.
  • Test if I lose consequent unconfirmed transactions.
  • Test if sending from one wallet to another loses unconfirmed transaction or not.
  • Test backwards compatibility: if unconfirmed transactions are retained through version change.
nopara73 added 8 commits Aug 28, 2019
WalletWasabi.Tests/P2pTests.cs Outdated Show resolved Hide resolved
WalletWasabi.Tests/RegTests.cs Outdated Show resolved Hide resolved
@nopara73 nopara73 referenced this pull request Aug 29, 2019
nopara73 added 13 commits Aug 29, 2019
@nopara73

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 29, 2019

Ready for review.

WalletWasabi/Models/SmartTransaction.cs Outdated Show resolved Hide resolved
WalletWasabi/Models/SmartTransaction.cs Show resolved Hide resolved
WalletWasabi/Models/SmartTransaction.cs Show resolved Hide resolved
WalletWasabi/Io/IoManager.cs Outdated Show resolved Hide resolved
WalletWasabi/Io/IoManager.cs Show resolved Hide resolved
@molnard

This comment has been minimized.

Copy link
Collaborator

commented Aug 30, 2019

On regtest with very intensive CJ testing I could get many spent coins. Shall I investigate more? On the other hand it is working.

nopara73 added 3 commits Aug 30, 2019
@nopara73

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 30, 2019

On regtest with very intensive CJ testing I could get many spent coins. Shall I investigate more? On the other hand it is working.

Is that due to this branch or it's something else?

@nopara73

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 30, 2019

On regtest with very intensive CJ testing I could get many spent coins. Shall I investigate more? On the other hand it is working.

Oh no, I figured what's the issue, that's not specific to this branch. On the RegTest we always delete unconfirmed transactions, not exactly sure why, but I don't want to touch that logic.

@nopara73

This comment has been minimized.

Copy link
Collaborator Author

commented Aug 31, 2019

I will break this PR down to be better reviewable.

Copy link
Collaborator

left a comment

Looks good.

@nopara73 nopara73 removed this from In Progress in v1.1.7 Sep 5, 2019
@molnard molnard dismissed their stale review Sep 13, 2019

this PR was broken down to smaller parts.

@nopara73 nopara73 referenced this pull request Oct 7, 2019
2 of 2 tasks complete
@nopara73 nopara73 deleted the nopara73:mempoolstore4 branch Oct 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.