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

Wallet not deleted properly (corrupted seq.*.sqlite file -> StatementAlreadyFinalized "BEGIN" in the log) #1071

Closed
1 task done
piotr-iohk opened this issue Nov 27, 2019 · 1 comment
Assignees

Comments

@piotr-iohk
Copy link
Contributor

piotr-iohk commented Nov 27, 2019

Context

Information -
Version cardano-wallet-jormungandr.exe version => 2019.11.18
Platform Windows
Installation (Daedalus: https://buildkite.com/input-output-hk/daedalus/builds/9145)

Issue encountered (only once now) in Daedlus by @alan-mcnicholas. Steps to reproduce:

  1. Restore two wallets
  2. Try and delete one -> strange behavior observed here (i.e. Daedalus was stuck on the delete pop-up)
  3. Close Daedalus
  4. Try and reimport wallet -> Daedalus says wallet exists

in the log (node.log-20191126140040, logs-2019-11-26T140733.0183Z.zip) there are 8 subsequent requests:

[DELETE] /v2/wallets/43e9ccb4004771b124c32bee39840de067a882f6

1st one => 200
the other 7 => 404

After deletion there are also some failures on [GET] /v2/wallets i.e.:

[GET] /v2/wallets
StatementAlreadyFinalized "BEGIN"

Also the corresponding seq.43e9ccb4004771b124c32bee39840de067a882f6.zip file has NOT been deleted as a result of the DELETE action

Steps to Reproduce

There are no repeatable steps to reproduce. The issue was encountered while using Daedalus on Windows. There was also a poor internet connection.

Expected behavior

Wallet is deleted. There are no further issues.

Actual behavior

The wallet seq.*.sqlite file was not deleted, although the DELETE action seems to return 200.
The file also got broken somehow in the process. I am able to browse it using https://sqlitebrowser.org/, but when I put it inside my own wallets dir in my local cardano-wallet I cannot get any wallets listed. Getting:

$ cardano-wallet-jormungandr wallet list
Something went wrong

In the log there is:

[GET] /v2/wallets
StatementAlreadyFinalized "BEGIN"

Logs: logs-2019-11-26T140733.0183Z.zip - node.log-20191126140040 contains DELETE /v2/wallet/43e9ccb4004771b124c32bee39840de067a882f6 entries

Sqlite file: seq.43e9ccb4004771b124c32bee39840de067a882f6.zip


Resolution


QA

@piotr-iohk piotr-iohk changed the title After deleting a wallet there is a StatementAlreadyFinalized "BEGIN" in the log on subsequent GET /v2/wallets and wallet cannot be re-imported Wallet not deleted properly (corrupted seq.*.sqlite file -> StatementAlreadyFinalized "BEGIN" in the log) Nov 27, 2019
@piotr-iohk
Copy link
Contributor Author

The problem seems to be also experienced by some Daedalus users.

iohk-bors bot added a commit that referenced this issue Dec 9, 2019
1116: Estimate fees for joining a stake pool r=KtorZ a=Anviking

# Issue Number

WB-32: #1094 #1096 (Found it easier to tackle both at once)

# Overview

Also see commit history, but main points:

- [x] Added API endpoint *GET /stake-pools/{stake-pool}/wallets/{wallet}/fee*
- [x] Added `feeBalance :: CoinSelection -> Word64`. I re-use `selectCoinsForDelegation` together with `feeBalance` to implement the `joinStakePoolFee` handler.
- [x] Integration tests:
    - STAKE_POOLS_ESTIMATE_FEE_01 - fee matches eventual cost
    - STAKE_POOLS_ESTIMATE_FEE_02 - empty wallet cannot estimate fee
    - STAKE_POOLS_ESTIMATE_FEE_03 - can't use byron wallets
    - STAKE_POOLS_ESTIMATE_FEE_04 - invalid pool and wallet ids

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


1149: bump versions to v2019.12.9 r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

N/A

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have bumped versions to v2019.12.9

# Comments

<!-- Additional comments or screenshots to attach if any -->

Known issues for the upcoming release:

- #1115
- #1071
- #961

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: Johannes Lund <[email protected]>
Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 9, 2019
1149: bump versions to v2019.12.9 r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

N/A

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have bumped versions to v2019.12.9

# Comments

<!-- Additional comments or screenshots to attach if any -->

Known issues for the upcoming release:

- #1115
- #1071
- #961

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1192: make sure to close and destroy the database before removing files from disk r=KtorZ a=KtorZ

# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [x] I have made sure to close and destroy the database before removing files from disk

# Comments

<!-- Additional comments or screenshots to attach if any -->

<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
@KtorZ KtorZ self-assigned this Dec 16, 2019
@KtorZ KtorZ closed this as completed Dec 16, 2019
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1193: re-use 'deleteWallet' function to avoid logic duplication r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have re-used 'deleteWallet' function to implement byron delete to avoid logic duplication And seemingly, share fixes when they are done..... !


# Comments

<!-- Additional comments or screenshots to attach if any -->



<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1193: re-use 'deleteWallet' function to avoid logic duplication r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have re-used 'deleteWallet' function to implement byron delete to avoid logic duplication And seemingly, share fixes when they are done..... !


# Comments

<!-- Additional comments or screenshots to attach if any -->



<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1193: re-use 'deleteWallet' function to avoid logic duplication r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have re-used 'deleteWallet' function to implement byron delete to avoid logic duplication And seemingly, share fixes when they are done..... !


# Comments

<!-- Additional comments or screenshots to attach if any -->



<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1193: re-use 'deleteWallet' function to avoid logic duplication r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have re-used 'deleteWallet' function to implement byron delete to avoid logic duplication And seemingly, share fixes when they are done..... !


# Comments

<!-- Additional comments or screenshots to attach if any -->



<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
iohk-bors bot added a commit that referenced this issue Dec 16, 2019
1193: re-use 'deleteWallet' function to avoid logic duplication r=KtorZ a=KtorZ



# Issue Number

<!-- Put here a reference to the issue this PR relates to and which requirements it tackles -->

#1071 

# Overview

<!-- Detail in a few bullet points the work accomplished in this PR -->

- [ ] I have re-used 'deleteWallet' function to implement byron delete to avoid logic duplication And seemingly, share fixes when they are done..... !


# Comments

<!-- Additional comments or screenshots to attach if any -->



<!-- 
Don't forget to:

 ✓ Self-review your changes to make sure nothing unexpected slipped through
 ✓ Assign yourself to the PR
 ✓ Assign one or several reviewer(s)
 ✓ Once created, link this PR to its corresponding ticket
 ✓ Assign the PR to a corresponding milestone
 ✓ Acknowledge any changes required to the Wiki
-->


Co-authored-by: KtorZ <[email protected]>
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