Skip to content

Filter out overflowing operations when forging blocks

Context

This MR refactor the baker's operation selection to prevent the baker from validating a manager operation that would always fail as the operation would too costly, in terms of gas, compared to the remaining available gas. This results in a significant performance improvement, as shown below, as the baker doesn't try to validate all overflowing operations which is especially costly when there is a lot of operations to consider.

Here are two reports with and without this patch. The one without the patch is not safe under 7s block time.

Without baker optimisation: report-without-baker-profiling

With baker optimisation: report-with-baker-profiling

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 Albin Coquereau

Merge request reports

Loading