[go: up one dir, main page]

DAL/Kernel: implement an alternative echo kernel for bandwidth tests

What

Implements alternative DAL echo kernel for bandwith tests.

Why

For effective bandwidth (i.e. a rollup fetching the slots) tests, we aim to have the simplest rollup that is bound by computations or IOs (as such the EVM kernel is a bad candidate). This alternative DAL echo kernel writes the slots data on disk, we reduce it further by writing only the size of the slots read. And it could be use as a base for specific improvements related to bandwidth tests.

How

Since the kernel is derivated from the original echo kernel, there are two solutions:

  1. instrument the code with a feature flag, and select the right code with macros.
  2. simply copy the code and modify it.

To be honest I did (1), but I find it easier to read with (2), and also simpler to modify if we need changes for the bandwidth scenario.

The change is then simple:

  • Read the slots from the storage, which is basically a bit vector written into a bytes. This allows setting the slots through a configuration file of the kernel.
  • After reading all the pages, simply write the number of bytes read.

A manual tezt test shows how we can read the data (for metrics for example).

Manually testing the MR

Build the kernel:

make -f kernels.mk dal_echo_kernel_bandwidth.wasm

then run the test:

dune exec tezt/tests/main.exe -- --file dal.ml ci_disabled --match "bandwidth"

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

Merge request reports

Loading