Page MenuHomePhabricator

Create plan for refactoring validation in terms of rules
Open, Needs TriagePublic


Currently, the validation engine is ad-hoc code. I'm proposing that we impose a structure on that code specifically to look like this:

   Check Validation Block
   Jump to rules for a specific block version/height/time:
   For rule in rules:
      if not rule(block):
            return false
    return true

With possibly some post-validation step that ensures all the rules that are required ran.

This opens up to better hardfork coding practices, and validation of hardforks in the future.