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

uint8 in staking precompile is too small? #1422

Closed
hackfisher opened this issue Mar 1, 2024 · 3 comments · Fixed by #1425
Closed

uint8 in staking precompile is too small? #1422

hackfisher opened this issue Mar 1, 2024 · 3 comments · Fixed by #1425
Assignees
Labels
B-Runtime [Bug] Some mistakes with the runtime logic P-High [Priority] High S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited

Comments

@hackfisher
Copy link
Contributor

@hackfisher hackfisher added B-Runtime [Bug] Some mistakes with the runtime logic P-High [Priority] High S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited labels Mar 1, 2024
@hackfisher hackfisher changed the title uint8 in staking precompile is too small uint8 in staking precompile is too small? Mar 1, 2024
@AurevoirXavier
Copy link
Member

type MaxDeposits = ConstU32<512>;

@hackfisher
Copy link
Contributor Author

Becareful about the vec

pub type Deposits<T: Config> =
		StorageMap<_, Blake2_128Concat, T::AccountId, BoundedVec<Deposit, T::MaxDeposits>>;

Does it need migration if change the size?

@hackfisher
Copy link
Contributor Author

hackfisher commented Mar 1, 2024

type MaxDeposits = ConstU32<512>;

This do not need change for this time, the type in the stake precompile need to be changed to a larger one, uint16

@boundless-forest boundless-forest linked a pull request Mar 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-Runtime [Bug] Some mistakes with the runtime logic P-High [Priority] High S-Need Audit PR contains changes to fund-managing logic that should be properly reviewed and externally audited
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants