Set the default PolkaVM stack and heap size values to 128KB. (#441)

Fixes https://github.com/paritytech/contract-issues/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:
https://github.com/paritytech/revive/commit/878ca91689b99220f7ffd40df760613b7314de86.

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.
This commit is contained in:
Marian Radu authored and GitHub committed 2026-01-07 14:27:17 +01:00
1 parent ab1929d184
commit 4c85a3113d
28 files changed
+34 -31

No files matched your search

+2 -2
View File
@@ -34,7 +34,7 @@ You are incentivized to keep this value as small as possible:
1. Increasing the stack size will increase gas costs due to increased startup costs.
2. The stack size contributes to the total memory size a contract can use, which includes the contract's code size.
Default value: 32768
Default value: 131072
> [!WARNING]
>
@@ -51,7 +51,7 @@ You are incentivized to keep this value as small as possible:
1.Increasing the heap size will increase startup costs.
2.The heap size contributes to the total memory size a contract can use, which includes the contract's code size
Default value: 65536
Default value: 131072
> [!WARNING]
>