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

Configurable max memory pages #1128

Merged
merged 1 commit into from
May 25, 2023
Merged

Conversation

kvinwang
Copy link
Contributor

This PR adds and command line argument --max-memory-pages to cargo contract build.

Background

Contracts on Phala Networks are allowed to use up to 4MB of memory. cargo-contract did enforce the wasm to set max pages to 16. That would cause a build error when our contracts use larger memory:

 [3/5] Optimizing wasm file
[wasm-validator error in module] unexpected true: memory max >= initial, on 
memory
ERROR: Failed to validate wasm: error validating input

@ascjones ascjones merged commit 096e440 into use-ink:master May 25, 2023
This was referenced Jul 26, 2023
@smiasojed smiasojed mentioned this pull request Mar 4, 2024
kvinwang added a commit to kvinwang/cargo-contract that referenced this pull request Mar 12, 2024
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