Introduce nv21 skeleton for local testing:
- Use local go-state-types with actor_version_checklist changes: https://github.com/filecoin-project/go-state-types/blob/master/actors_version_checklist.md
- Imports mock v12-actors bundle
- Define upgrade heights
- Generate adapters
- Add upgrade schedule and migration
- Add actorstype to the NewActorRegistry in /chain/consensus/computestate.go
- Add upgrade field to api/types.go/ForkUpgradeParams
- Add upgrade to node/impl/full/state.go
- Add network version to chain/state/statetree.go
- make jen
- make docsgen-cli
This commit includes the following updates:
- Added a new 'pprof' flag to the command-line arguments in main.go. This flag allows the user to specify a file name for writing CPU profile information, enabling performance analysis.
- Implemented functionality to start CPU profiling in the 'Before' function. If a file name is provided via the 'pprof' flag, the function creates the specified file and begins CPU profiling.
- Added an 'After' function to stop CPU profiling once the program execution is finished.
These changes provide a way to analyze the CPU usage of the 'lotus-shed' application, which can be valuable for performance tuning and optimization.
This commit includes the following updates:
- Imported v12 of the filecoin state types in migrations.go. This allows the system to interpret and operate on the latest structure of filecoin state information, ensuring compatibility with the latest version of the Filecoin network.
- Updated the 'getMigrationFuncsForNetwork' function to include a case for network.Version21, enabling the use of the UpgradeActorsV12 and PreUpgradeActorsV12 functions for network migration. These changes ensure the system correctly handles migrations when the network upgrades to version 21.
- Implemented a new 'checkNv21Invariants' function to check the invariants for version 21 of the Filecoin network. This function:
1. Loads the new state root from the actor store.
2. Retrieves the actor code IDs for the current state version (v12).
3. Loads the actor tree from the state root and checks state invariants using the actor code IDs.
4. Logs any error messages generated during the invariant check.
5. Finally, prints a message with the time taken to complete the checks.
By checking these invariants, we can ensure the system's state is consistent and valid after migrating to network version 21.