`RollingSessionWindow` cleanup (#7204)
* Replace `RollingSessionWindow` with `RuntimeInfo` - initial commit * Fix tests in import * Fix the rest of the tests * Remove dead code * Fix todos * Simplify session caching * Comments for `SessionInfoProvider` * Separate `SessionInfoProvider` from `State` * `cache_session_info_for_head` becomes freestanding function * Remove unneeded `mut` usage * fn session_info -> fn get_session_info() to avoid name clashes. The function also tries to initialize `SessionInfoProvider` * Fix SessionInfo retrieval * Code cleanup * Don't wrap `SessionInfoProvider` in an `Option` * Remove `earliest_session()` * Remove pre-caching -> wip * Fix some tests and code cleanup * Fix all tests * Fixes in tests * Fix comments, variable names and small style changes * Fix a warning * impl From<SessionWindowSize> for NonZeroUsize * Fix logging for `get_session_info` - remove redundant logs and decrease log level to DEBUG * Code review feedback * Storage migration removing `COL_SESSION_WINDOW_DATA` from parachains db * Remove `col_session_data` usages * Storage migration clearing columns w/o removing them * Remove session data column usages from `approval-voting` and `dispute-coordinator` tests * Add some test cases from `RollingSessionWindow` to `dispute-coordinator` tests * Fix formatting in initialized.rs * Fix a corner case in `SessionInfo` caching for `dispute-coordinator` * Remove `RollingSessionWindow` ;( * Revert "Fix formatting in initialized.rs" This reverts commit 0f94664ec9f3a7e3737a30291195990e1e7065fc. * v2 to v3 migration drops `COL_DISPUTE_COORDINATOR_DATA` instead of clearing it * Fix `NUM_COLUMNS` in `approval-voting` * Use `columns::v3::NUM_COLUMNS` when opening db * Update node/service/src/parachains_db/upgrade.rs Co-authored-by:Andrei Sandu <54316454+sandreim@users.noreply.github.com> * Don't write in `COL_DISPUTE_COORDINATOR_DATA` for `test_rocksdb_migrate_2_to_3` * Fix `NUM+COLUMNS` in approval_voting * Fix formatting * Fix columns usage * Clarification comments about the different db versions --------- Co-authored-by:
Andrei Sandu <54316454+sandreim@users.noreply.github.com>
Showing
- polkadot/node/core/approval-voting/src/approval_db/v1/mod.rs 6 additions, 2 deletionspolkadot/node/core/approval-voting/src/approval_db/v1/mod.rs
- polkadot/node/core/approval-voting/src/approval_db/v1/tests.rs 2 additions, 4 deletions...dot/node/core/approval-voting/src/approval_db/v1/tests.rs
- polkadot/node/core/approval-voting/src/import.rs 2 additions, 4 deletionspolkadot/node/core/approval-voting/src/import.rs
- polkadot/node/core/approval-voting/src/lib.rs 3 additions, 10 deletionspolkadot/node/core/approval-voting/src/lib.rs
- polkadot/node/core/approval-voting/src/tests.rs 2 additions, 7 deletionspolkadot/node/core/approval-voting/src/tests.rs
- polkadot/node/core/dispute-coordinator/src/db/v1.rs 7 additions, 3 deletionspolkadot/node/core/dispute-coordinator/src/db/v1.rs
- polkadot/node/core/dispute-coordinator/src/initialized.rs 6 additions, 7 deletionspolkadot/node/core/dispute-coordinator/src/initialized.rs
- polkadot/node/core/dispute-coordinator/src/lib.rs 1 addition, 6 deletionspolkadot/node/core/dispute-coordinator/src/lib.rs
- polkadot/node/core/dispute-coordinator/src/tests.rs 177 additions, 3 deletionspolkadot/node/core/dispute-coordinator/src/tests.rs
- polkadot/node/service/src/lib.rs 0 additions, 3 deletionspolkadot/node/service/src/lib.rs
- polkadot/node/service/src/parachains_db/mod.rs 19 additions, 19 deletionspolkadot/node/service/src/parachains_db/mod.rs
- polkadot/node/service/src/parachains_db/upgrade.rs 114 additions, 9 deletionspolkadot/node/service/src/parachains_db/upgrade.rs
- polkadot/node/subsystem-util/src/lib.rs 0 additions, 2 deletionspolkadot/node/subsystem-util/src/lib.rs
- polkadot/node/subsystem-util/src/rolling_session_window.rs 0 additions, 1532 deletionspolkadot/node/subsystem-util/src/rolling_session_window.rs
Please register or sign in to comment