Current funding-related generators choose channel parameter values uniformly randomly. For several parameters this strategy is extremely unlikely to choose valid parameters that the target will accept.
Example: funding_satoshis
Generators currently choose funding_satoshis uniformly randomly from [0, U64_MAX], but only values in the range [0, 16M] (wumbo limit) are guaranteed to be considered valid by all targets. Thus the odds of randomly selecting a universally valid value is ~1/1,000,000,000,000.
For targets that allow funding_satoshis up to the 21M bitcoin supply, our odds are better (but still low) at ~1/10,000, and even then we can rarely actually fund the channels in that range, which further limits deeper fuzzing.
Suggested fix
Have generators choose expected-valid values for the channel parameters. Rely on mutators to test the invalid cases.
Current funding-related generators choose channel parameter values uniformly randomly. For several parameters this strategy is extremely unlikely to choose valid parameters that the target will accept.
Example:
funding_satoshisGenerators currently choose
funding_satoshisuniformly randomly from[0, U64_MAX], but only values in the range[0, 16M](wumbo limit) are guaranteed to be considered valid by all targets. Thus the odds of randomly selecting a universally valid value is ~1/1,000,000,000,000.For targets that allow
funding_satoshisup to the 21M bitcoin supply, our odds are better (but still low) at ~1/10,000, and even then we can rarely actually fund the channels in that range, which further limits deeper fuzzing.Suggested fix
Have generators choose expected-valid values for the channel parameters. Rely on mutators to test the invalid cases.