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

Customize schedule with runtime memory limit suitable for development node #187

Merged
merged 2 commits into from
May 29, 2023

Conversation

agryaznov
Copy link
Contributor

@agryaznov agryaznov commented May 27, 2023

In recent PR #182 (comment), the CI step of running cargo test was commented out as a dirty workaround for the pallet contracts integrity test failure. The test checks that the pallet configuration is memory safe.

So to make the test pass, we enlarge the runtime memory limit in the Schedule. We do this because this development node allows larger contract size than it is normally allowed in a production running node. This should be fine for the development node where possible security implications could be neglected for the sake of development convenience. However, please DO NOT do this to your production node config, unless you are sure that the limit you're setting is the real memory limit of your runtime.

@agryaznov agryaznov requested review from a team, cmichi, ascjones, HCastano and athei as code owners May 27, 2023 18:16
@agryaznov agryaznov changed the title Make CI great again Customize schedule with runtime memory limit suitable for development mode May 27, 2023
@agryaznov agryaznov changed the title Customize schedule with runtime memory limit suitable for development mode Customize schedule with runtime memory limit suitable for development node May 27, 2023
@agryaznov agryaznov merged commit 94054cd into main May 29, 2023
@agryaznov agryaznov deleted the ag-memlimit branch May 29, 2023 13:25
hummusonrails pushed a commit to hummusonrails/substrate-contracts-node that referenced this pull request Jun 5, 2023
… node (paritytech#187)

In recent PR
paritytech#182 (comment),
the CI step of running `cargo test` was commented out as a dirty
workaround for the pallet contracts integrity test failure. The test
checks that the pallet configuration is memory safe.

So to make the test pass, we enlarge the runtime memory limit in the
Schedule. We do this because this development node
[allows](https://github.com/paritytech/substrate-contracts-node/blob/8d13ddef3f5c728d1661e79c511a28cef206b298/runtime/src/lib.rs#L367)
larger contract size than it is normally allowed in a production running
node. This should be fine for the development node where possible
security implications could be neglected for the sake of development
convenience. **However, please DO NOT do this to your production node
config, unless you are sure that the limit you're setting is the real
memory limit of your runtime**.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants