-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/nv21 migrations optimized tree diff algorithm #11149
Merged
arajasek
merged 6 commits into
feat/nv21-skeleton
from
feat/nv21-migrations-optimized-tree
Aug 14, 2023
Merged
Feat/nv21 migrations optimized tree diff algorithm #11149
arajasek
merged 6 commits into
feat/nv21-skeleton
from
feat/nv21-migrations-optimized-tree
Aug 14, 2023
Conversation
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 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.
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.
…to test and validate it
arajasek
approved these changes
Aug 14, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM -- there's a couple more checks I'd like to add, happy to push a commit to this branch or have that be a separate PR.
Thank you!
Hey! It'd be a lot simpler for me if we could land this PR then create your check as additional work in a new PR |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issues
#11071
Proposed Changes
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.
Include latest version of go-state-types module which includes optimizations for AMT diffing, allowing this migration to happen swiftly
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.
includes skeleton nv21 migration kit which need to be filled out by @ZenGround0 and @arajasek
Additional Info
This has been benchmarked and the optimization for AMT diffing has been verified to be correct via correct stateroot cids.
below without optimizations in go-state-type version:
Checklist
Before you mark the PR ready for review, please make sure that:
<PR type>: <area>: <change being made>
fix: mempool: Introduce a cache for valid signatures
PR type
: fix, feat, build, chore, ci, docs, perf, refactor, revert, style, testarea
, e.g. api, chain, state, market, mempool, multisig, networking, paych, proving, sealing, wallet, deps