mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-10-30 15:39:52 +00:00
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:
1 parent
ab1929d184
commit
4c85a3113d
28 files changed
+34
-31
No files matched your search
@@ -2,11 +2,12 @@
|
||||
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
pub const DEFAULT_HEAP_SIZE: u32 = 64 * 1024;
|
||||
pub const DEFAULT_STACK_SIZE: u32 = 32 * 1024;
|
||||
pub const DEFAULT_HEAP_SIZE: u32 = 128 * 1024;
|
||||
pub const DEFAULT_STACK_SIZE: u32 = 128 * 1024;
|
||||
|
||||
/// The PolkaVM memory configuration.
|
||||
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct MemoryConfig {
|
||||
/// The emulated EVM linear heap memory size in bytes.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
@@ -9,6 +9,7 @@ pub mod memory;
|
||||
|
||||
/// PVM specific compiler settings.
|
||||
#[derive(Clone, Copy, Default, Debug, Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct PolkaVM {
|
||||
/// The PolkaVM target machine memory configuration settings.
|
||||
#[serde(skip_serializing_if = "Option::is_none")]
|
||||
|
||||
Reference in new issue
Block a user