-
Notifications
You must be signed in to change notification settings - Fork 1.1k
[pallet-revive] Fix storage deposit refunds in nested contract calls #10920
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
base: master
Are you sure you want to change the base?
Conversation
|
/cmd prdoc --audience runtime_dev --bump patch |
…time_dev --bump patch'
…kadot-sdk into rve/storage-deposits
|
can you capture the example from the issue in the tests? |
|
|
All GitHub workflows were cancelled due to failure one of the required jobs. |
fixes paritytech/contract-issues#213 where storage deposit refunds failed in nested/reentrant calls.
Problem
Storage refunds were calculated incorrectly when a contract allocated storage, then performed a nested call that cleared it. Pending storage changes lived only in the parent FrameMeter, so child frames could not see them and refunds were skipped.
Solution
Apply pending storage deposit changes to a cloned ContractInfo before creating nested frames. This makes the parent’s storage state visible to child frames during refund calculation.
Implementation