Add AtStake legacy migrations#1448
Conversation
… calculations - Updated logging in `relay_timestamp.rs` to improve readability of warning messages regarding missing TIMESTAMP_NOW. - Modified `migrate_old_collator_snapshot` function in `pallet_parachain_staking.rs` to accept a parameter for item count, adjusting weight calculations accordingly. - Added new features for legacy migration in `Cargo.toml` of the zeitgeist runtime. - Included migration functionality in the zeitgeist runtime library.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
- Removed the `migrate_old_collator_snapshot` function from the parachain staking weights file. - Updated `Cargo.toml` to include `pallet-migrations` in the Zeitgeist runtime. - Modified the Zeitgeist runtime to integrate migration logic and defined `MultiBlockMigrations`. - Enhanced benchmark configuration to include `pallet_migrations`. - Created `legacy_keys.rs` and `mod.rs` for runtime migrations in both battery-station and zeitgeist runtimes. - Implemented legacy migration structures for both battery-station and zeitgeist, allowing for the migration of legacy staking data.
runtime/common/src/lib.rs
Outdated
| type MigrationStatusHandler = (); | ||
| type FailedMigrationHandler = frame_support::migrations::FreezeChainOnFailedMigration; | ||
| type MaxServiceWeight = MigrationsMaxServiceWeight; | ||
| type WeightInfo = pallet_migrations::weights::SubstrateWeight<Runtime>; |
There was a problem hiding this comment.
Use calculated weights of our own benchmark machine here!
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## chralt98-add-async-backing #1448 +/- ##
===========================================================
Coverage 93.32% 93.32%
===========================================================
Files 181 181
Lines 34769 34769
===========================================================
Hits 32448 32448
Misses 2321 2321
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
* Add pallet-async-backing and update block time parameters to 6000ms * Refactor constants and improve formatting in relay timestamp module * Add sp-timestamp dependency and update runtime versions to 62 and transaction version to 35 * Update pallet-parachain-staking source reference and remove old collator snapshot weight function * feat: Update download script for Polkadot binaries and improve error handling - Added a function to determine the Polkadot release version, allowing for overrides. - Enhanced the binary download process with improved logging and error handling. - Updated the script to ensure binaries are executable after download. - Changed the copyright year in the script to 2025. - Removed hardcoded Polkadot release version and replaced it with dynamic determination. fix(tests): Adjust XCM fee upper limit for forked networks - Increased the upper limit for XCM fees in common tests to accommodate forked networks. test: Add logging to runtime upgrade tests for better traceability - Introduced logging hooks in the runtime upgrade tests to capture key steps and state changes during execution. chore: Update zombienet configuration for RPC ports - Modified the produce-blocks.toml file to specify unique RPC ports for relaychain nodes. * refactor: Update try-runtime dependencies and improve log message formatting in relay timestamp module * fix: Remove extra newline in copyright section of relay timestamp module * feat: Enhance relay timestamp handling and adjust block processing velocity for std builds * feat: Update block time assumptions and adjust related parameters for improved accuracy * feat: Enhance Polkadot SDK download script for macOS support and improve source retrieval - Added functionality to build Polkadot binaries from source on macOS. - Refactored the logic to retrieve the Polkadot source line and commit from Cargo.lock. - Updated the download script to conditionally build from source or download binaries based on the OS. - Adjusted the handling of binary downloads to ensure proper permissions and existence checks. refactor: Update constants for block processing velocity - Removed conditional compilation for BLOCK_PROCESSING_VELOCITY in std builds, setting it to a constant value of 1 for all builds. chore: Add `once_cell` dependency to battery-station and zeitgeist runtimes - Included `once_cell` version 1.20.2 in the dev-dependencies for both runtimes. test: Refactor integration tests to use new test net reset and execution functions - Introduced `reset_test_net` and `with_battery_station`/`with_zeitgeist` functions to streamline test setup. - Updated all relevant tests to utilize the new functions for better readability and maintainability. fix: Correct copyright notices and comments in various files - Updated copyright years and fixed typos in comments across multiple files to ensure accuracy and clarity. * refactor: Remove unused imports and adjust AdjustmentVariable for better fee management * feat: Add async backing configuration and improve zombienet deployment script for macOS architecture support * feat: Remove use-noop-message-processor flag for improved benchmarking and update related scripts * Add `AtStake` legacy migrations (#1448) * Refactor relay timestamp logging and enhance parachain staking weight calculations - Updated logging in `relay_timestamp.rs` to improve readability of warning messages regarding missing TIMESTAMP_NOW. - Modified `migrate_old_collator_snapshot` function in `pallet_parachain_staking.rs` to accept a parameter for item count, adjusting weight calculations accordingly. - Added new features for legacy migration in `Cargo.toml` of the zeitgeist runtime. - Included migration functionality in the zeitgeist runtime library. * Remove legacy migration features and streamline parachain migration handling * Refactor parachain staking weights and add migration support - Removed the `migrate_old_collator_snapshot` function from the parachain staking weights file. - Updated `Cargo.toml` to include `pallet-migrations` in the Zeitgeist runtime. - Modified the Zeitgeist runtime to integrate migration logic and defined `MultiBlockMigrations`. - Enhanced benchmark configuration to include `pallet_migrations`. - Created `legacy_keys.rs` and `mod.rs` for runtime migrations in both battery-station and zeitgeist runtimes. - Implemented legacy migration structures for both battery-station and zeitgeist, allowing for the migration of legacy staking data. * Remove parachain feature flag from runtime migrations * feat: Add pallet_migrations support and update runtime configurations for benchmarks * Correct copyrights (#1449) Update copyright years in source files to include 2025 - Updated copyright notices in multiple Rust source files across the project to reflect the new year 2025. - Ensured consistency in copyright formatting, changing from "2023-2024" to "2023-2025" where applicable. - This change affects files in the `liquidity_tree`, `orderbook`, `parimutuel`, `prediction-markets`, `swaps`, and `styx` modules. * Update copyright notices in migration files
What does it do?
AtStakestorage itemLook for the adjustments in moonbeam here.
What important points should reviewers know?
try-runtime-zeitgeist-output.txt
try-runtime-battery-station-output.txt
The above file is the
try-runtimeoutput of the migration for zeitgeist mainnet and battery station testnet.Is there something left for follow-up PRs?
What alternative implementations were considered?
Are there relevant PRs or issues?
References