Skip to content

WASM: Parameterize `stack_size_limit` instead of hardcoding it to 300

Thomas Letan requested to merge lthms@wasm-parameterize-stack-size-limit into master

Context

The callstack in the lib_webassembly interpreter is limited to 300,
where 300 is hardcoded at the creation of the config parameter driving
the execution of a webassembly code.

With this patch, we turn this into a parameter that the caller can
modify.

The value chosen by the PVM remains 300 for now, for backward
compatibility reasons. Once the notion of WASM PVM revision is merged,
it will become possible to modify this parameter and makes it more
permissive.

Manually testing the MR

This MR is expected to be a pure refactoring, with 0 impact on the behavior of the modified code.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Thomas Letan

Merge request reports