lotus
lotus copied to clipboard
Refactor Actor Upgrade Functions to Reduce Code Duplication
Background
In the network upgrade logic, there is a lot of duplication of code that potentially can be extracted to a function and called for all future upgrades. Some examples that Zen found during the code-review of the nv23 skeleton:
https://github.com/filecoin-project/lotus/blob/d6d4fee4b6fd263e0336c141e119f60a67d5360c/chain/consensus/filcns/upgrades.go#L2173-L2196 https://github.com/filecoin-project/lotus/blob/7f96be69398b4a518ffdb34b1ac6011d94728973/chain/consensus/filcns/upgrades.go#L2526-L2532
We should look into if we can refactor some of this to reduce code duplication, simplify future upgrades and enhance maintainability.