Skip to content

Conversation

@marian-radu
Copy link
Contributor

@marian-radu marian-radu commented Jan 6, 2026

Fixes paritytech/contract-issues#149

A few test cases from v2-periphery-polkadot are hitting the PVM stack limit when the contracts are compiled using resolc version 0.5.0. The same tests pass if the contracts are compiled with a resolc version that includes commit: 878ca91.

After a brief discussion with @xermicus, we propose to set the default PolkaVM stack and heap size values to 128KB, since we have already encountered tests that hit the stack size limit and, without real world data, it is difficult to determine the optimal values.

Apply the camelCase serde attribute to the MemoryConfig and PolkaVM structs.
@marian-radu marian-radu marked this pull request as draft January 6, 2026 13:36
@marian-radu marian-radu changed the title Increase DEFAULT_STACK_SIZE and DEFAULT_HEAP_SIZE values Double the default stack and heap size values. Jan 6, 2026
@marian-radu marian-radu marked this pull request as ready for review January 6, 2026 14:08
@marian-radu marian-radu requested a review from xermicus January 6, 2026 14:08
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.

Thanks! Would you mind to quickly add that to the CHANGELOG.md under changed and update the default values here? (just run make book after editing and check in the rendered changes)

@marian-radu marian-radu changed the title Double the default stack and heap size values. Set the default PolkaVM stack and heap size values to 128KB. Jan 7, 2026
@xermicus xermicus merged commit 4c85a31 into main Jan 7, 2026
15 checks passed
@xermicus xermicus deleted the 149-stack-addressing-underflow-in-pvm-execution branch January 7, 2026 13:27
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.

stack addressing underflow in PVM execution

3 participants