Almost all chain params fields are made configurable for regtest and documented in –help for debug. Unlike #8994 this doesn’t allow to create an arbitrary number of regtests with different genesis blocks, but it also doesn’t touch consensus code nor changes all the tests from “regtest” to “regtest2” to make sure the custom genesis blocks work, so it should be much easier to review in comparison.
This is supposed to save people from having to create more set methods on CRegTestParams in the future. This is also supposed to force programmers (that’s us) to maintain a documentation readable with –help for any present or future chainparam and their modifications.
As a simple example, it is tested that regtest can disallow setting -acceptnonstdtxn=1, which is something, for example, signets may want some times. If someone doesn’t like the example chainparam field I picked for the test for whatever reason, anybody’s welcomed to suggest some other field or set of fields to test in a new test.py file. I’m happy to code it myself or take someone else’s test as a replacement.
A long time ago, we talked about loading the chainparams from a file. Well, combined with the existing section (by chain) feature for loading the config file, this provides that feature.