-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly handle genesis in actors tests. Fast-forward upgrading to actors v13 doesn't work because there needs to be at least a day between v0 genesis and v13 (due to differences in miner cron).
- Loading branch information
Showing
19 changed files
with
132 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package kit | ||
|
||
import ( | ||
"github.com/filecoin-project/go-state-types/abi" | ||
"github.com/filecoin-project/go-state-types/network" | ||
"github.com/filecoin-project/lotus/chain/stmgr" | ||
) | ||
|
||
func UpgradeSchedule(upgrades ...stmgr.Upgrade) EnsembleOpt { | ||
return func(opts *ensembleOpts) error { | ||
opts.upgradeSchedule = upgrades | ||
return opts.upgradeSchedule.Validate() | ||
} | ||
} | ||
|
||
// GenesisNetworkVersion sets the network version of genesis. | ||
func GenesisNetworkVersion(nv network.Version) EnsembleOpt { | ||
return UpgradeSchedule(stmgr.Upgrade{ | ||
Network: nv, | ||
Height: -1, | ||
}) | ||
} | ||
|
||
func SDRUpgradeAt(calico, persian abi.ChainEpoch) EnsembleOpt { | ||
return UpgradeSchedule(stmgr.Upgrade{ | ||
Network: network.Version6, | ||
Height: -1, | ||
}, stmgr.Upgrade{ | ||
Network: network.Version7, | ||
Height: calico, | ||
Migration: stmgr.UpgradeCalico, | ||
}, stmgr.Upgrade{ | ||
Network: network.Version8, | ||
Height: persian, | ||
}) | ||
} | ||
|
||
func LatestActorsAt(upgradeHeight abi.ChainEpoch) EnsembleOpt { | ||
return UpgradeSchedule(stmgr.Upgrade{ | ||
Network: network.Version12, | ||
Height: -1, | ||
}, stmgr.Upgrade{ | ||
Network: network.Version13, | ||
Height: upgradeHeight, | ||
Migration: stmgr.UpgradeActorsV5, | ||
}) | ||
} | ||
|
||
func TurboUpgradeAt(upgradeHeight abi.ChainEpoch) EnsembleOpt { | ||
return UpgradeSchedule(stmgr.Upgrade{ | ||
Network: network.Version11, | ||
Height: -1, | ||
}, stmgr.Upgrade{ | ||
Network: network.Version12, | ||
Height: upgradeHeight, | ||
Migration: stmgr.UpgradeActorsV4, | ||
}) | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.