When doing refactors around CChainParams, @schancel brought up that this code allows for writing code that could cause configuration changes to trigger hardforks. Investigate to see if we can eliminate or at least reduce the surface for hardforks to activate on configuration changes.
Description
Description
Event Timeline
Comment Actions
Some reference diffs for the CChainParams refactors:
https://reviews.bitcoinabc.org/D1010
https://reviews.bitcoinabc.org/D1028
Comment Actions
So, my suggestion would be to do the opposite:
- Expand Consensus::Params to include things like hardfork times.
- Add a way to configure hardfork times at the top level function for block validation.
- Strip Config from all the block validation, and instead only accept Consensus::Params.