Put the formula for calculating proof length in the flavor to avoid random constants and add tests that check that the length is correct.