-
Notifications
You must be signed in to change notification settings - Fork 788
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
Contracts: Remove ED from base deposit #3536
Conversation
@athei, I just reviewed this code, I wonder if we should use max here instead of adding ED polkadot-sdk/substrate/frame/contracts/src/storage.rs Lines 222 to 225 in 6508866
|
I think this is a left over when we had a separate account for deposits. Then the deposit was free and could keep the deposit account alive. Hence we needed to make sure that it is high enough. Now we have the deposits on the main account which has always gets the polkadot-sdk/substrate/frame/contracts/src/storage/meter.rs Lines 453 to 454 in 6508866
AFAIK we neither need |
Yep that make sense, will amend the PR |
well actually, never mind this is correct, we just take into account the ED in the base and don't charge for it twice. |
Yes it seems correct but it seems to be redundant to add it just to remove it again. The deposit also can be smaller than the |
bot bench substrate-pallet --pallet=pallet_contracts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Yes the deposit has to add up to the reserved amount.
One note: Even with the migration the reserved amount might have a mismatch with the recorded deposit. Reason is that we probably refunded a tiny bit too much when refunding. Because we assumed that we had more deposit than we actually had. But I am not sure about that.
Co-authored-by: Cyrill Leutwiler <cyrill@parity.io>
5ea5888
to
0014dff
Compare
bot bench substrate-pallet --pallet=pallet_contracts |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5869709 was started for your command Comment |
The CI pipeline was cancelled due to failure one of the required jobs. |
bot bench substrate-pallet --pallet=pallet_contracts |
@pgherveou https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/5872017 was started for your command Comment |
@pgherveou Command |
…=dev --target_dir=substrate --pallet=pallet_contracts
@pgherveou Command |
bot help |
Here's a link to docs |
This reverts commit 643aa2b.
Before:
After: