Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

pallet-contract: Exempted contract doesn't upgrade their last rent payed #4742

Closed
gui1117 opened this issue Jan 27, 2020 · 0 comments · Fixed by #8418
Closed

pallet-contract: Exempted contract doesn't upgrade their last rent payed #4742

gui1117 opened this issue Jan 27, 2020 · 0 comments · Fixed by #8418
Labels
I3-bug The node fails to follow expected behavior.

Comments

@gui1117
Copy link
Contributor

gui1117 commented Jan 27, 2020

Currently if a contract is exempted from rent (because it holds enough funds for instance) then the last deduct_block (block where it payed rent for the last time) is not updated: https://github.com/paritytech/substrate/blob/master/frame/contracts/src/rent.rs#L181

Thus if a contract has enough funds to pay for 10MB and then it reaches 11MB or just lost some funds, the rent will be from the last time the contract had payed rent because deduct block would be the last time it has been charged.

@pepyakin pepyakin added this to the 3.0 milestone Jan 28, 2020
@athei athei added I2-security The client fails to follow expected, security-sensitive, behaviour. I3-bug The node fails to follow expected behavior. and removed I2-security The client fails to follow expected, security-sensitive, behaviour. labels Jun 16, 2020
@athei athei removed this from the Polkadot milestone Jul 23, 2020
@ghost ghost closed this as completed in #8418 Mar 23, 2021
@athei athei moved this to Done in Smart Contracts Jul 27, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
I3-bug The node fails to follow expected behavior.
Projects
Status: No status
Development

Successfully merging a pull request may close this issue.

3 participants