-
Notifications
You must be signed in to change notification settings - Fork 213
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
Failure after quitting a stake pool from API #2009
Comments
Got the same error today,:
The wallet can't sync and spamming node with:
So node even gets desync and can't work normally. Trying understand why this wallet (4ec9262c) is causing it. Just one of ~100 wallets. Others work fine. |
Fortunately I discovered that it's a person I know :) The full log section:
|
@Fell-x27 see #2010, if you feel like building from sources. Samuel confirmed it worked indeed. The issue lied in the calculation of the amount for the transaction Metadata, or more exactly, how we interpret the amount. In the past, the transaction would always be "balanced" and there was an easy equation between inputs, outputs and fees with the nice property that outputs were necessarily smaller than inputs (and even strictly smaller for non null fees). Shelley introduces its set of implicit things, like the key deposit reclaim, which adds an implicit input to the transaction. So in some cases, it may happen that there's more on the output side than the inputs actually spent by the transaction. So it's literally creating money :) So the wallet need to account for this extra dimension and, consider such transactions correctly. |
Yep, I've found, built and tested it about 3hrs ago and can confirm it works. Thanks! My service is online again! |
2010: Yet another fix for reported withdrawals in transactions + underflow in case of key deposit reclaim r=KtorZ a=KtorZ # Issue Number <!-- Put here a reference to the issue this PR relates to and which requirements it tackles --> #2009 + TODO # Overview <!-- Detail in a few bullet points the work accomplished in this PR --> - 5757a55 📍 **highlight reported failure in integration scenarios by adding more assertions** - d5b4335 📍 **report our withdrawals differently from external withdrawals.** We haven't been quite careful here when introducing the reward redemption and the transaction amount are looking weird again. This commit fixes several issues: 1. It only counts withdrawals on the "spent" side of the balance if they are coming from OUR reward account. Indeed, in the case of external withdrawals, the money is coming from elsewhere and not from the wallet itself. 2. Fix an underflow in the amount calculation in the case where we spent less than we receive. This can be the case when: a. We are redeeming from an external account and the reward brings more than the fee. From the redeeming wallet, it'll look like the wallet is receiving money. b. We are reclaiming a key deposit back, and it brings more money than what's actually spent. 3. Discover transactions that are spending our withdrawals without belonging to our wallet. This happens when the reward is redeemed from another wallet. That transaction should still show up in the redeemed wallet, without which rewards would just "vanish" without any trace reported by the wallet. # 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 <matthias.benkort@gmail.com>
Context
I quit a stake pool with intention of getting my deposit back and now my wallet throws this error in the logs:
Steps to Reproduce
Expected behavior
Actual behavior
Resolution
QA
https://github.com/input-output-hk/cardano-wallet/blob/d5b43356e4dbe9267ede9c8e912da6c893bdda85/lib/core/src/Cardano/Wallet.hs#L1735-L1737
https://github.com/input-output-hk/cardano-wallet/blob/d5b43356e4dbe9267ede9c8e912da6c893bdda85/lib/core/src/Cardano/Wallet/Primitive/Model.hs#L409-L413
The text was updated successfully, but these errors were encountered: