Closed vmx closed 1 year ago
I thought about this again. Would it help that we make it clear in the README that you're on your own if you set the FIL_PROOFS_T_AUX_IMPLICIT_FALLBACK
env variable? When you use the code in the current stack and there is a t_aux
, nothing changes, it will also error if there is none.
If you don't have a t_aux
and set FIL_PROOFS_T_AUX_IMPLICIT_FALLBACK
, then it uses the default value, which is either the hard-coded one, or the one you can set dynamically via FIL_PROOFS_ROWS_TO_DISCARD
. So even in case someone has set FIL_PROOFS_ROWS_TO_DISCARD
to a custom value, I'd expect it to be set all the time. This means that even if then t_aux
would be deleted FIL_PROOFS_T_AUX_IMPLICIT_FALLBACK
would be set, it would still return the correct result.
The only information from the
t_aux
file that is used during Commitphase 1 (C1) is the number of rows that are discarded from TreeC. If that value is either the default, or set viaFIL_PROOFS_ROWS_TO_DISCARD
accordingly, then all other parts oft_aux
can be inferred from the function call.When
FIL_PROOFS_T_AUX_IMPLICIT_FALLBACK=1
is set, then those inferred values will be used, in case thet_aux
file cannot be read or doesn't exist.