You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typeck: pull satisfaction/dissatisfaction limits into struct
Right now in our ExtData type-checking structure there are four
properties that we measure for satisfactions: maximum witness stack
element count, maximum witness size, maximum scriptsig size, and maximum
number of stack elements during execution.
We measure the same variables for dissatisfaction.
These are always either all present or none present; for some reason we
have consolidated these four values into three separate Option types,
and we debug_assert that either they are all present or none are.
Furthermore, in the one case that we've consolidated stuff, we used a
tuple. So we have a (max witness size, max scriptsig size) pair, and
code comments everywhere explaining which one is .0 and which one is .1.
Pull all these into a struct with named fields, and improve the field
names to be more consistent.
This means that we now have one Option for satisfaction properties, and
one for dissatisfaction properties. No need for debug assertions.
There are two oddities worth highlighting:
1. The `or_d` dissat_data.max_exec_stack_count (line 693) used to have a
+1 in its formula. I think this was a copy/paste error from or_b. I
removed it. No tests break.
2. In `threshold` we sum up the satisfaction and dissatisfaction numbers
for the four variables we're measuring. But for max_exec_stack_count
I think we should be maxing, not summing. I also fixed this, and
again no tests break.
0 commit comments