Skip to content
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

[pallet_contracts] Increase the weight of the deposit_event host function to limit the memory used by events. #4973

Merged
merged 13 commits into from
Aug 6, 2024

Conversation

smiasojed
Copy link
Contributor

@smiasojed smiasojed commented Jul 8, 2024

This PR updates the weight of the deposit_event host function by adding
a fixed ref_time of 60,000 picoseconds per byte. Given a block time of 2 seconds
and this specified ref_time, the total allocation size is 32MB.

@smiasojed smiasojed added the T7-smart_contracts This PR/Issue is related to smart contracts. label Jul 8, 2024
@smiasojed smiasojed marked this pull request as ready for review July 9, 2024 11:01
@smiasojed smiasojed requested a review from athei as a code owner July 9, 2024 11:01
@smiasojed smiasojed requested a review from pgherveou July 19, 2024 15:20
@smiasojed smiasojed changed the title Limit the memory used by events [pallet_contracts] Increase the weight of the deposit_event host function to limit the memory used by events. Jul 19, 2024
@paritytech paritytech deleted a comment from smiasojed Jul 26, 2024
substrate/frame/contracts/src/lib.rs Outdated Show resolved Hide resolved
substrate/frame/contracts/src/lib.rs Outdated Show resolved Hide resolved
@athei
Copy link
Member

athei commented Aug 5, 2024

It is a major bump now because of the changes to the public Schedule type.

@paritytech-cicd-pr
Copy link

The CI pipeline was cancelled due to failure one of the required jobs.
Job name: test-linux-stable 1/3
Logs: https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6899461

Copy link
Member

@xermicus xermicus left a comment

Choose a reason for hiding this comment

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

LGTM

@smiasojed smiasojed added this pull request to the merge queue Aug 5, 2024
github-merge-queue bot pushed a commit that referenced this pull request Aug 5, 2024
…tion to limit the memory used by events. (#4973)

This PR updates the weight of the `deposit_event` host function by
adding
a fixed ref_time of 60,000 picoseconds per byte. Given a block time of 2
seconds
and this specified ref_time, the total allocation size is 32MB.

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.com>
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 5, 2024
@smiasojed smiasojed added this pull request to the merge queue Aug 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 5, 2024
@athei athei added this pull request to the merge queue Aug 6, 2024
Merged via the queue into master with commit 11fdff1 Aug 6, 2024
159 of 161 checks passed
@athei athei deleted the sm/event_weight branch August 6, 2024 15:46
dharjeezy pushed a commit to dharjeezy/polkadot-sdk that referenced this pull request Aug 28, 2024
…tion to limit the memory used by events. (paritytech#4973)

This PR updates the weight of the `deposit_event` host function by
adding
a fixed ref_time of 60,000 picoseconds per byte. Given a block time of 2
seconds
and this specified ref_time, the total allocation size is 32MB.

---------

Co-authored-by: Alexander Theißen <alex.theissen@me.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
None yet
Development

Successfully merging this pull request may close these issues.

5 participants