AstarNetwork / astar-frame

Core frame modules for Astar & Shiden network.
Other
58 stars 38 forks source link

The condition of occuring "TooManyEraStakeValues" Error #166

Closed johnnyji-dev closed 1 year ago

johnnyji-dev commented 1 year ago

On shibuya Testnet, I staked some amount for a long time, and than I made about 4 SBY reward on FreeBalance(rewardDestination).

I tried to unstake all staked amount, but my unstaking transaction failed with "TooManyEraStakeValues" Error.

Can I get some condition of occuring "TooManyEraStakeValues" error? like below. For example, It will occur to try unstaking transaction on over 30era or 1 SBY.

https://shibuya.subscan.io/extrinsic/0xab7dd945baa40159ae062ed19eea8374f5da24663429842c5e21825c2a07ca0f

johnnyji-dev commented 1 year ago

I share my test result on that.

Network : Shibuya Testnet. dApp Staking : only 1 dapp Accumlated Era(Need to Claim Era) : 58 Era

Staking and Unstaking Fail(No Tip). https://shibuya.subscan.io/account/WKFTYBxLbcG1N5fS7s31U9WRJEZgxEoLCTYHyCq6v867HBb

6 7 8

Please check these out and feed back me the condition occuring "TooManyEraStakeValues" Error. I guess that the Error occurs when a account remains over 58Era to claim.

Thanks~

Dinonard commented 1 year ago

This is how internal storage works - we cannot keep indefinite history of how much you had staked/locked in each era. It's expected behavior.

To fix this, you should claim rewards to free balance until you've cleaned the storage enough for it to allow to create new entries. You can refer to THIS to learn more.