-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Incorrect Deposit value displayed - Parathread registration #10668
Comments
This is the current code that calculates the "reserve deposit": const reservedDeposit = useMemo(
() => (api.consts.registrar.paraDeposit as BalanceOf)
.add((api.consts.registrar.dataDepositPerByte as BalanceOf).muln(wasm ? wasm.length : 0))
.iadd((api.consts.registrar.dataDepositPerByte as BalanceOf).muln(genesisState ? genesisState.length : 0)),
[api, wasm, genesisState]
); Also can be seen here. So If I am understand this correctly, we can replace all this logic with just MAX_CODE_SIZE? |
That is correct. |
Okay, cool thanks for the input, will get this adjusted! |
On a closer look, the MAX_CODE_SIZE applies only to wasm. The genesis state length can vary. https://github.com/paritytech/polkadot-sdk/blob/ae0b3bf6733e7b9e18badb16128a6b25bef1923b/polkadot/runtime/common/src/paras_registrar/mod.rs#L682 |
Ahh okay so we're just replacing the wasm.length! Thanks |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
Due to the issue discussed here paritytech/polkadot-sdk#2372 the deposit needed defaults to MAX_CODE_SIZE paritytech/polkadot-sdk#3020
The fee for this transaction is hefty, with around 5 KSM and 40 DOT simply lost because the UI shows a lower value. More info here https://substrate.stackexchange.com/questions/11588/how-to-calculate-required-reserved-deposit-to-register-a-parachain-on-kusama-w
The text was updated successfully, but these errors were encountered: