Skip to content

pallet_revive: Enforce storage deposit limit on plain transfer#9416

Merged
athei merged 3 commits intomasterfrom
at/enforce_limit
Aug 4, 2025
Merged

pallet_revive: Enforce storage deposit limit on plain transfer#9416
athei merged 3 commits intomasterfrom
at/enforce_limit

Conversation

@athei
Copy link
Copy Markdown
Member

@athei athei commented Aug 1, 2025

The existential deposit to create a new account is part of the storage deposit. Hence if the storage deposit limit is too low to create a new account we fail the transaction. However, this limit was not enforced for plain transfers. The reason is that we only enforce the limit at the end of each frame. But for plain transfers (transferring to a non contract) there is no frame.

This PR fixes the situation by enforcing the limit when transferring the existential deposit in order to create a new account.

@athei athei requested review from pgherveou and xermicus August 1, 2025 11:57
@athei athei added the T7-smart_contracts This PR/Issue is related to smart contracts. label Aug 1, 2025
Co-authored-by: PG Herveou <pgherveou@gmail.com>
@athei
Copy link
Copy Markdown
Member Author

athei commented Aug 4, 2025

/cmd prdoc --audience runtime_dev --bump patch

Copy link
Copy Markdown
Contributor

@TorstenStueber TorstenStueber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍.

@athei athei enabled auto-merge August 4, 2025 09:48
@athei athei added this pull request to the merge queue Aug 4, 2025
Merged via the queue into master with commit 6a1aa94 Aug 4, 2025
236 of 239 checks passed
@athei athei deleted the at/enforce_limit branch August 4, 2025 10:57
athei added a commit that referenced this pull request Aug 14, 2025
The existential deposit to create a new account is part of the storage
deposit. Hence if the storage deposit limit is too low to create a new
account we fail the transaction. However, this limit was not enforced
for plain transfers. The reason is that we only enforce the limit at the
end of each frame. But for plain transfers (transferring to a non
contract) there is no frame.

This PR fixes the situation by enforcing the limit when transferring the
existential deposit in order to create a new account.

---------

Co-authored-by: PG Herveou <pgherveou@gmail.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@athei athei mentioned this pull request Aug 14, 2025
athei added a commit that referenced this pull request Aug 15, 2025
- #9112
- #9101
- #9416
- #9357
- #9441
- #9267

Those are all the changes we want to get onto the next Kusama release.
The new gas mapping and EVM backend will not make it.

---------

Co-authored-by: PG Herveou <pgherveou@gmail.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Francisco Aguirre <franciscoaguirreperez@gmail.com>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: sekiseki <22696121+sekisamu@users.noreply.github.com>
Co-authored-by: Michael Müller <mich@elmueller.net>
alvicsam pushed a commit that referenced this pull request Oct 17, 2025
The existential deposit to create a new account is part of the storage
deposit. Hence if the storage deposit limit is too low to create a new
account we fail the transaction. However, this limit was not enforced
for plain transfers. The reason is that we only enforce the limit at the
end of each frame. But for plain transfers (transferring to a non
contract) there is no frame.

This PR fixes the situation by enforcing the limit when transferring the
existential deposit in order to create a new account.

---------

Co-authored-by: PG Herveou <pgherveou@gmail.com>
Co-authored-by: cmd[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T7-smart_contracts This PR/Issue is related to smart contracts.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants