From 944f675d95b3c335bd9a33bb1742998e3426ddc2 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 14 Jun 2024 13:14:41 -0700 Subject: [PATCH 1/3] Simplify specification and use of the various memory configurations Several changes to make memory allocation cleaner: 1) enable build-time configuration of the memory configuration for the eservice enclave (the pservice enclave does not have dynamic memory requirements so they remain fixed). 2) a single variable now controls the allocation for enclave and interpreter memory; PDO_MEMORY_CONFIG may be set to SMALL, MEDIUM, or LARGE. this replaces the old WASM_MEM_CONFIG which was used for interpreter memory configuration. The SMALL configuration sets up the enclave and the interpreter for 4MB, MEDIUM is for 8MB and LARGE is for 16MB. 3) remove the stack and heap configuration from the contract build scripts; this appears to be unnecessary though further testing is warranted. Signed-off-by: Mic Bowman --- build/cmake/ProjectVariables.cmake | 14 ++++++ build/cmake/SGX.cmake | 32 +++++++++++-- build/common-config.sh | 16 +++---- build/tests/wawaka/memory-test.json | 10 ++-- common/interpreter/wawaka_wasm/CMakeLists.txt | 46 ++++++++++--------- contracts/wawaka/contract-build.cmake | 33 ------------- contracts/wawaka/memory-test/test-small.json | 18 -------- .../libpdo_enclave/pdo_enclave.config.xml.in | 7 +-- 8 files changed, 84 insertions(+), 92 deletions(-) diff --git a/build/cmake/ProjectVariables.cmake b/build/cmake/ProjectVariables.cmake index 5b393839..b12f5ef1 100644 --- a/build/cmake/ProjectVariables.cmake +++ b/build/cmake/ProjectVariables.cmake @@ -66,6 +66,20 @@ IF (NOT DEFINED ENV{PDO_SOURCE_ROOT}) ENDIF() SET(PDO_SOURCE_ROOT $ENV{PDO_SOURCE_ROOT}) +# The memory size option configures enclave and interpreter memory +# size values. The variable may have the value of "SMALL", "MEDIUM" or +# "LARGE". This is a project variable because the configurations +# depend on one another (the interpreter heap size must fit into the +# enclave heap, for example). +SET(PDO_MEMORY_CONFIG "MEDIUM" CACHE STRING "Set memory size parameters for enclave and interpreter") +IF (DEFINED ENV{PDO_MEMORY_CONFIG}) + SET(PDO_MEMORY_CONFIG $ENV{PDO_MEMORY_CONFIG}) +ENDIF() +SET(MEMORY_SIZE_OPTIONS "SMALL" "MEDIUM" "LARGE") +IF (NOT ${PDO_MEMORY_CONFIG} IN_LIST MEMORY_SIZE_OPTIONS) + MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}") +ENDIF() + # Get the current version using the get_version # utility; note that this will provide 0.0.0 as # the version if something goes wrong (like running diff --git a/build/cmake/SGX.cmake b/build/cmake/SGX.cmake index 74bc3967..73447aae 100644 --- a/build/cmake/SGX.cmake +++ b/build/cmake/SGX.cmake @@ -21,16 +21,41 @@ IF (NOT DEFINED ENV{PDO_SGX_KEY_ROOT}) ENDIF() SET(PDO_SGX_KEY_ROOT "$ENV{PDO_SGX_KEY_ROOT}") -IF (NOT DEFINED ENV{SGX_MODE}) - MESSAGE(FATAL_ERROR "SGX_MODE not defined") +# Memory size should be set in ProjectVariables.cmake which must be included +# before this file. There are three values for memory size: SMALL, MEDIUM +# and LARGE. Each provides defaults for memory allocation. See the note +# about memory size in ProjectVariables.cmake regarding dependencies between +# memory settings here and in other parts of PDO. +IF (NOT DEFINED PDO_MEMORY_CONFIG) + MESSAGE(FATAL_ERROR "PDO_MEMORY_CONFIG not defined") +ENDIF() + +IF (${PDO_MEMORY_CONFIG} STREQUAL "SMALL") + MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024") + MATH(EXPR ENCLAVE_HEAP_SIZE "32 * 1024 * 1024") + MATH(EXPR ENCLAVE_RESERVED_SIZE "1 * 1024 * 1024") +ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "MEDIUM") + MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024") + MATH(EXPR ENCLAVE_HEAP_SIZE "64 * 1024 * 1024") + MATH(EXPR ENCLAVE_RESERVED_SIZE "2 * 1024 * 1024") +ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "LARGE") + MATH(EXPR ENCLAVE_STACK_SIZE "2 * 1024 * 1024") + MATH(EXPR ENCLAVE_HEAP_SIZE "128 * 1024 * 1024") + MATH(EXPR ENCLAVE_RESERVED_SIZE "4 * 1024 * 1024") +ELSE() + MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}") ENDIF() -SET(SGX_MODE $ENV{SGX_MODE}) # There are effectively three build modes for SGX: # 1) SIM mode with PDO_DEBUG_BUILD enabled # 2) HW mode with PDO_DEBUG_BUILD enabled # 3) HW mode with PDO_DEBUG_BUILD disabled (release mode) # For now we just check the consistency of the variables (SGX_MODE, PDO_DEBUG_BUILD and CMAKE_BUIDL_TYPE) +IF (NOT DEFINED ENV{SGX_MODE}) + MESSAGE(FATAL_ERROR "SGX_MODE not defined") +ENDIF() +SET(SGX_MODE $ENV{SGX_MODE}) + IF (${SGX_MODE} STREQUAL "SIM") IF (NOT ${PDO_DEBUG_BUILD}) MESSAGE(FATAL_ERROR "SGX_MODE=SIM does not accept PDO_DEBUG_BUILD=0") @@ -47,6 +72,7 @@ ELSE() SET(SGX_USE_SIMULATOR FALSE) ENDIF() +# These environment variables are generally set through the SGX SDK IF (NOT DEFINED ENV{SGX_SDK}) MESSAGE(FATAL_ERROR "SGX_SDK not defined") ENDIF() diff --git a/build/common-config.sh b/build/common-config.sh index eeddb520..5c8873cd 100755 --- a/build/common-config.sh +++ b/build/common-config.sh @@ -34,19 +34,19 @@ var_set() { " env_key_sort[$i]="WASM_SRC"; i=$i+1; export WASM_SRC=${env_val[WASM_SRC]}; - env_val[WASM_MEM_CONFIG]="${WASM_MEM_CONFIG:-MEDIUM}" - env_desc[WASM_MEM_CONFIG]=" - WASM_MEM_CONFIG indicates the memory configuration for the - WASM runtime: the runtime's global memory pool size, + env_val[PDO_MEMORY_CONFIG]="${PDO_MEMORY_CONFIG:-MEDIUM}" + env_desc[PDO_MEMORY_CONFIG]=" + PDO_MEMORY_CONFIG indicates the memory configuration for the + enclave and WASM runtime: the runtime's global memory pool size, and a module's operand stack and heap size. When the variable is set to 'SMALL', the runtime's memory pool - size is set to 1MB. If the variable is set to 'MEDIUM', the - runtime's memory pool size is set to 2MB. + size is set to 4MB. If the variable is set to 'MEDIUM', the + runtime's memory pool size is set to 8MB. When the variable is set to 'LARGE', the runtime's - memory pool size is set to 4MB. See + memory pool size is set to 16MB. See common/interpreter/wawaka_wasm/README.md for further details. " - env_key_sort[$i]="WASM_MEM_CONFIG"; i=$i+1; export WASM_MEM_CONFIG=${env_val[WASM_MEM_CONFIG]}; + env_key_sort[$i]="PDO_MEMORY_CONFIG"; i=$i+1; export PDO_MEMORY_CONFIG=${env_val[PDO_MEMORY_CONFIG]}; env_val[PDO_INTERPRETER]="${PDO_INTERPRETER:-wawaka}" env_desc[PDO_INTERPRETER]=" diff --git a/build/tests/wawaka/memory-test.json b/build/tests/wawaka/memory-test.json index 4c885a6f..86ac26db 100644 --- a/build/tests/wawaka/memory-test.json +++ b/build/tests/wawaka/memory-test.json @@ -140,13 +140,12 @@ "expected": "1500000" }, { - "description" : "big value test 2 MB should {invert} with WAMR \"out of memory\" exception", + "description" : "big value test 2 MB", "MethodName": "big_value_test", "KeywordParameters": { "num_chars" : 2000000 }, - "invert": "fail", - "expected": "internal pdo error" + "expected": "2000000" }, { "description" : "deep recursion test {KeywordParameters}", @@ -197,13 +196,12 @@ "expected": "64000" }, { - "description" : "big key test 1 MB should {invert} with WAMR \"out of memory\" exception", + "description" : "big key test 1 MB", "MethodName": "big_key_test", "KeywordParameters": { "num_chars" : 1000000 }, - "invert": "fail", - "expected":"internal pdo error" + "expected":"1000000" }, { "description" : "deep recursion test {KeywordParameters}", diff --git a/common/interpreter/wawaka_wasm/CMakeLists.txt b/common/interpreter/wawaka_wasm/CMakeLists.txt index b4fc3e4d..1b847638 100644 --- a/common/interpreter/wawaka_wasm/CMakeLists.txt +++ b/common/interpreter/wawaka_wasm/CMakeLists.txt @@ -31,11 +31,6 @@ IF (SUBMOD_CONTENTS EQUAL 0) MESSAGE(FATAL_ERROR "WAMR git submodule has not been cloned. Please run `git submodule update --init` first.") ENDIF() -IF (NOT DEFINED ENV{WASM_MEM_CONFIG}) - MESSAGE(FATAL_ERROR "WASM_MEM_CONFIG environment variable not defined!") -ENDIF() -SET(WASM_MEM_CONFIG "$ENV{WASM_MEM_CONFIG}") - # Reset default linker flags SET (CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") SET (CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "") @@ -164,22 +159,31 @@ SGX_PREPARE_TRUSTED(${WAWAKA_STATIC_NAME}) # HEAP_SIZE: Size of the runtime's heap for dynamic allocations by a WASM module. # STACK_SIZE: Size of the runtime's stack for executing a WASM module # Layout: RUNTIME_MEM_POOL_SIZE > HEAP_SIZE + STACK_SIZE + padding -IF (WASM_MEM_CONFIG STREQUAL "SMALL") - MESSAGE(STATUS "Using SMALL memory configuration") - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=1*1024*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=512*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=64*1024) -ELSEIF (WASM_MEM_CONFIG STREQUAL "LARGE") - MESSAGE(STATUS "Using LARGE memory configuration") - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=4*1024*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=3*1024*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=256*1024) -ELSE () - MESSAGE(STATUS "Using MEDIUM memory configuration") - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=2*1024*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=1536*1024) - TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=128*1024) -ENDIF () +# The numbers below were chosen to set RUNTIME_MEM_POOL_SIZE to be about +# 1/8 of the size of the enclave heap size defined in the SGX.cmake file. +IF (NOT DEFINED PDO_MEMORY_CONFIG) + MESSAGE(FATAL_ERROR "PDO_MEMORY_CONFIG not defined") +ENDIF() + +IF (${PDO_MEMORY_CONFIG} STREQUAL "SMALL") + MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "4 * 1024 * 1024") + MATH(EXPR WW_STACK_SIZE "512 * 1024") + MATH(EXPR WW_HEAP_SIZE "3 * 1024 * 1024") +ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "MEDIUM") + MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "8 * 1024 * 1024") + MATH(EXPR WW_STACK_SIZE "512 * 1024") + MATH(EXPR WW_HEAP_SIZE "7 * 1024 * 1024") +ELSEIF (${PDO_MEMORY_CONFIG} STREQUAL "LARGE") + MATH(EXPR WW_RUNTIME_MEM_POOL_SIZE "16 * 1024 * 1024") + MATH(EXPR WW_STACK_SIZE "512 * 1024") + MATH(EXPR WW_HEAP_SIZE "15 * 1024 * 1024") +ELSE() + MESSAGE(FATAL_ERROR "Invalid memory size; ${PDO_MEMORY_CONFIG}") +ENDIF() + +TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE RUNTIME_MEM_POOL_SIZE=${WW_RUNTIME_MEM_POOL_SIZE}) +TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE HEAP_SIZE=${WW_HEAP_SIZE}) +TARGET_COMPILE_DEFINITIONS(${WAWAKA_STATIC_NAME} PRIVATE STACK_SIZE=${WW_STACK_SIZE}) TARGET_INCLUDE_DIRECTORIES(${WAWAKA_STATIC_NAME} PRIVATE ${INTERPRETER_INCLUDE_DIRS}) TARGET_INCLUDE_DIRECTORIES(${WAWAKA_STATIC_NAME} PRIVATE ${IWASM_DIR}/include) diff --git a/contracts/wawaka/contract-build.cmake b/contracts/wawaka/contract-build.cmake index 2f96d13f..843bd48d 100644 --- a/contracts/wawaka/contract-build.cmake +++ b/contracts/wawaka/contract-build.cmake @@ -28,40 +28,11 @@ IF (NOT DEFINED ENV{WASM_SRC}) ENDIF() SET(WASM_SRC "$ENV{WASM_SRC}") -IF (NOT DEFINED ENV{WASM_MEM_CONFIG}) - MESSAGE(FATAL_ERROR "WASM_MEM_CONFIG environment variable not defined!") -ENDIF() -SET(WASM_MEM_CONFIG "$ENV{WASM_MEM_CONFIG}") - # this should be set by the WAMR toolchain file IF (NOT DEFINED WASI_SDK_DIR) MESSAGE(FATAL_ERROR "WASM_SDK_DIR was not defined, check toolchain defines") ENDIF() -# --------------------------------------------- -# Set up the memory configuration -# --------------------------------------------- - -# LINEAR_MEMORY: Maximum size for a WASM module's linear memory (module's -# internal stack + static globals + padding); needs to be multiple of 64KB - -# INTERNAL_STACK_SIZE: Size of a WASM module's internal data stack -# (part of LINEAR_MEMORY) - -IF (WASM_MEM_CONFIG STREQUAL "SMALL") - SET(INTERNAL_STACK_SIZE 24576) - SET(LINEAR_MEMORY 65536) - message(STATUS "Building contracts for SMALL memory configuration") -ELSEIF (WASM_MEM_CONFIG STREQUAL "LARGE") - SET(INTERNAL_STACK_SIZE 98304) - SET(LINEAR_MEMORY 262144) - message(STATUS "Building contracts for LARGE memory configuration") -ELSE() - SET(INTERNAL_STACK_SIZE 49152) - SET(LINEAR_MEMORY 131072) - message(STATUS "Building contracts for MEDIUM memory configuration") -ENDIF () - # --------------------------------------------- # Set up the compiler configuration # --------------------------------------------- @@ -80,11 +51,7 @@ LIST(APPEND WASM_BUILD_OPTIONS "-std=c++11") LIST(APPEND WASM_BUILD_OPTIONS "-DUSE_WASI_SDK=1") SET(WASM_LINK_OPTIONS) -LIST(APPEND WASM_LINK_OPTIONS "-Wl,--initial-memory=${LINEAR_MEMORY}") -LIST(APPEND WASM_LINK_OPTIONS "-Wl,--max-memory=${LINEAR_MEMORY}") -LIST(APPEND WASM_LINK_OPTIONS "-z stack-size=${INTERNAL_STACK_SIZE}") LIST(APPEND WASM_LINK_OPTIONS "-Wl,--allow-undefined") - LIST(APPEND WASM_LINK_OPTIONS "-Wl,--export=ww_dispatch") LIST(APPEND WASM_LINK_OPTIONS "-Wl,--export=ww_initialize") diff --git a/contracts/wawaka/memory-test/test-small.json b/contracts/wawaka/memory-test/test-small.json index 460d4fb8..57844008 100644 --- a/contracts/wawaka/memory-test/test-small.json +++ b/contracts/wawaka/memory-test/test-small.json @@ -31,15 +31,6 @@ }, "expected": "512000" }, - { - "description" : "big value test 521 KB should {invert} with WAMR \"out of memory\" exception", - "MethodName": "big_value_test", - "KeywordParameters": { - "num_chars" : 521000 - }, - "invert": "fail", - "expected": "internal pdo error" - }, { "description" : "deep recursion test {KeywordParameters}", "MethodName": "deep_recursion_test", @@ -64,15 +55,6 @@ }, "expected": "256000" }, - { - "description" : "big key test 300 KB should {invert} with WAMR \"out of memory\" exception", - "MethodName": "big_key_test", - "KeywordParameters": { - "num_chars" : 300000 - }, - "invert": "fail", - "expected": "internal pdo error" - }, { "description" : "deep recursion test {KeywordParameters}", "MethodName": "deep_recursion_test", diff --git a/eservice/lib/libpdo_enclave/pdo_enclave.config.xml.in b/eservice/lib/libpdo_enclave/pdo_enclave.config.xml.in index 335927b8..2bdac3f1 100644 --- a/eservice/lib/libpdo_enclave/pdo_enclave.config.xml.in +++ b/eservice/lib/libpdo_enclave/pdo_enclave.config.xml.in @@ -17,9 +17,10 @@ limitations under the License. 0x90E7 1 - 0x80000 - 0x2000000 - 0x100000 + ${ENCLAVE_STACK_SIZE} + ${ENCLAVE_HEAP_SIZE} + ${ENCLAVE_RESERVED_SIZE} + ${ENCLAVE_RESERVED_SIZE} 1 2 1 From b96fd9905c5ce4be4503fc3d06be45adeb96650a Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 14 Jun 2024 13:19:48 -0700 Subject: [PATCH 2/3] Update documentation for the change to PDO_MEMORY_CONFIG environment/build variable Signed-off-by: Mic Bowman --- common/interpreter/wawaka_wasm/README.md | 10 +++++----- docs/environment.md | 19 ++++++++----------- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/common/interpreter/wawaka_wasm/README.md b/common/interpreter/wawaka_wasm/README.md index 91855386..52afb220 100644 --- a/common/interpreter/wawaka_wasm/README.md +++ b/common/interpreter/wawaka_wasm/README.md @@ -82,17 +82,17 @@ be adjusted depending on the requirements for a WASM contract: To facilitate configuring wawaka's memory, we provide three pre-defined memory configurations that meet most contract requirements: -- `SMALL`: 1MB WASM runtime memory pool (64KB stack, 768KB heap) -- `MEDIUM`: 2MB WASM runtime memory pool (256KB stack, 1.5MB heap) -- `LARGE`: 4MB WASM runtime memory pool (512KB stack, 3MB heap) +- `SMALL`: 4MB WASM runtime memory pool (512KB stack, 3MB heap) +- `MEDIUM`: 8MB WASM runtime memory pool (512KB stack, 7MB heap) +- `LARGE`: 16MB WASM runtime memory pool (512KB stack, 15MB heap) To use a specific memory configuration, set -the environment variable `WASM_MEM_CONFIG` (the default is the `MEDIUM` +the environment variable `PDO_MEMORY_CONFIG` (the default is the `MEDIUM` configuration) to build the wawaka interpreter with those memory settings: ```bash -export WASM_MEM_CONFIG=MEDIUM +export PDO_MEMORY_CONFIG=MEDIUM ``` Here are some tips for choosing the right wawaka memory configuration diff --git a/docs/environment.md b/docs/environment.md index 2625f1d6..abea80ed 100644 --- a/docs/environment.md +++ b/docs/environment.md @@ -107,19 +107,16 @@ The git submodule points to the latest tagged commit of [WAMR](https://github.co `WAMR-1.1.2`. -### `WASM_MEM_CONFIG` +### `PDO_MEMORY_CONFIG` (default: `MEDIUM`) -`WASM_MEM_CONFIG` indicates the memory configuration for the -WASM runtime: the runtime's global memory pool size, -the WASM module's heap size, and the size of module's -operand stack. -When the variable is set to `SMALL`, the runtime's global memory -pool size is set to 1MB. -If the variable is set to `MEDIUM`, the runtime's memory pool -size is set to 2MB. -When the variable is set to `LARGE`, the runtime's memory -pool size is set to 4MB. +`PDO_MEMORY_CONFIG` indicates the memory configuration for the enclave +and WASM runtime: the runtime's global memory pool size, the WASM +module's heap size, and the size of module's operand stack. When the +variable is set to `SMALL`, the runtime's global memory pool size is +set to 4MB. If the variable is set to `MEDIUM`, the runtime's memory +pool size is set to 8MB. When the variable is set to `LARGE`, the +runtime's memory pool size is set to 16MB. From b70702a3e6e78aa94345b4bf63ae749fd370e7c8 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 14 Jun 2024 13:25:09 -0700 Subject: [PATCH 3/3] replace WASM_MEM_CONFIG with PDO_MEMORY_CONFIG in docker tools Signed-off-by: Mic Bowman --- docker/pdo_client.dockerfile | 3 --- docker/pdo_services.dockerfile | 4 ++-- docker/tools/environment.sh | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/docker/pdo_client.dockerfile b/docker/pdo_client.dockerfile index 9e697440..1f70a2b7 100644 --- a/docker/pdo_client.dockerfile +++ b/docker/pdo_client.dockerfile @@ -51,9 +51,6 @@ ENV PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE} ARG PDO_INTERPRETER=wawaka ENV PDO_INTERPRETER=${PDO_INTERPRETER} -ARG WASM_MEM_CONFIG=MEDIUM -ENV WASM_MEM_CONFIG=${WASM_MEM_CONFIG} - ARG PDO_LOG_LEVEL=info ENV PDO_LOG_LEVEL=${PDO_LOG_LEVEL} diff --git a/docker/pdo_services.dockerfile b/docker/pdo_services.dockerfile index f8c8c05e..f1b1889a 100644 --- a/docker/pdo_services.dockerfile +++ b/docker/pdo_services.dockerfile @@ -39,8 +39,8 @@ ENV PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE} ARG PDO_INTERPRETER=wawaka ENV PDO_INTERPRETER=${PDO_INTERPRETER} -ARG WASM_MEM_CONFIG=MEDIUM -ENV WASM_MEM_CONFIG=${WASM_MEM_CONFIG} +ARG PDO_MEMORY_CONFIG=MEDIUM +ENV PDO_MEMORY_CONFIG=${PDO_MEMORY_CONFIG} ARG PDO_LOG_LEVEL=info ENV PDO_LOG_LEVEL=${PDO_LOG_LEVEL} diff --git a/docker/tools/environment.sh b/docker/tools/environment.sh index da47bb95..41c83e86 100755 --- a/docker/tools/environment.sh +++ b/docker/tools/environment.sh @@ -24,7 +24,7 @@ export SGX_MODE=${SGX_MODE:-SIM} export PDO_LEDGER_TYPE=${PDO_LEDGER_TYPE:-ccf} export PDO_INTERPRETER=${PDO_INTERPRETER:-wawaka} -export WASM_MEM_CONFIG=${WASM_MEM_CONFIG:-MEDIUM} +export PDO_MEMORY_CONFIG=${PDO_MEMORY_CONFIG:-MEDIUM} export PDO_DEBUG_BUILD=${PDO_DEBUG_BUILD:-1} # these variables are internal to the layout of the container and immutable