EVM/Kernel: benchmark FA deposits and withdrawals
What
This MR adds benchmarking scripts for FA bridge.
Why
We need a better tick (and gas) model for FA bridge to prevent spam attacks.
How
For deposits:
- Several scenarios added to see how ticket content size and amount affect parsing and execution
- Benchmark runner is adjusted to output a specific tick measurement to the stdout
For withdrawals:
- Several scenarios added to see how ticket content size and amount affect FA precompile execution
Manually testing the MR
Install necessary deps
cd etherlink/kernel_evm/benchmarks
npm i
In the repo root
make
make -f etherlink.mk EVM_KERNEL_FEATURES=benchmark evm_benchmark_kernel.wasm
node etherlink/kernel_evm/benchmarks/scripts/run_benchmarks.js -o /tmp/ --keep-temp --include bench_fa_deposit
node etherlink/kernel_evm/benchmarks/scripts/run_benchmarks.js -o /tmp/ --keep-temp --include bench_fa_withdrawal
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.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR