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

Unable to bond extra #6984

Open
xlc opened this issue Dec 23, 2024 · 2 comments
Open

Unable to bond extra #6984

xlc opened this issue Dec 23, 2024 · 2 comments

Comments

@xlc
Copy link
Contributor

xlc commented Dec 23, 2024

Address: 14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP
This tx failed: https://polkadot.subscan.io/extrinsic/23965894-2
It is trying to bond extra 1 dot and I have 30+ transferable DOT and the bond failed
And I am able to transfer 1 DOT out of this account: https://polkadot.subscan.io/extrinsic/23966216-2

@xlc
Copy link
Contributor Author

xlc commented Dec 23, 2024

It is this line failed

asset::stakeable_balance::<T>(stash)
.checked_sub(&ledger.total)
.ok_or(ArithmeticError::Overflow)?,

Relevant state at block 23965893

staking.ledger: Option<PalletStakingStakingLedger>
{
  stash: 14DsLzVyTUTDMm2eP3czwPbH53KgqnQRp3CJJZS9GR7yxGDP
  total: 12,929,164,149,143
  active: 12,929,164,149,143
  unlocking: []
  legacyClaimedRewards: []
}

system.account: FrameSystemAccountInfo
{
  nonce: 515
  consumers: 2
  providers: 1
  sufficients: 0
  data: {
    free: 11,929,004,994,238
    reserved: 1,302,990,000,000
    frozen: 12,929,164,149,143
    flags: 170,141,183,460,469,231,731,687,309,715,884,105,728
  }
}

So it failed because free is less than ledger.total
But the transferable amount suppose to be frozen - (free + reserved) and I see no reason to not use it for max staking amount calculation?

@bkchr
Copy link
Member

bkchr commented Dec 23, 2024

CC @Ank4n @kianenigma

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