[go: up one dir, main page]

SCORU: Wasm: Add tezt test using test kernel (computation only)

This MR adds end-to-end tests for the Wasm PVM using the compute test kernel.

It also adds tests for non-parsing kernels. These should be refined to detect stuck state in a future MR, see #3729.

Fixes #3554 (closed)

Pre-merge

  • Load computation kernel from file + add padding
  • Restore original tests, add new one for "test with computation kernel"
  • Unify with /relate to wasm_incomplete_kernel_boot_sector
  • Can we simplify by importing lib_scoru_wasm in tezt?
  • Revert logging (replace with L2 events?)
  • Revert encoding change in src/proto_alpha/lib_protocol/sc_rollup_tick_repr.ml
  • Open new issue: Test that parser error causes a stuck PVM. Can use the no_parse*.wasm files added in the MR. #3729
  • Open new UX issue: Good error message if the passed string is not a valid Gather_floppies encoding (instead of dumping a large string of unprintables to the test runner terminal). Can be solved by not printing the boot sector in L1 origination output for the Wasm PVM.
  • Preserve demo: !6214 (closed)

Context

Manually testing the MR

Pre-existing tests (refactored but not changed)

dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: wasm_2_0_0 - node advances PVM state with messages"
dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: arith - node advances PVM state with messages"
dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: wasm_2_0_0 - node advances PVM state with internal messages"
dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: arith - node advances PVM state with internal messages"

New tests

dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: wasm_2_0_0 - runs with kernel - computation"
dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: wasm_2_0_0 - runs with kernel - no_parse_random"
dune exec tezt/tests/main.exe -- --file sc_rollup.ml --title="Alpha: wasm_2_0_0 - runs with kernel - no_parse_bad_fingerprint"

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 Hans Hoglund

Merge request reports

Loading