1. Aug 04, 2023
  2. Aug 01, 2023
    • eskimor's avatar
      Take into account size as well in weight limiting. (#7369) · 367098ba
      eskimor authored
      
      
      * Take into account size as well in weight limiting.
      
      * Fix logging.
      
      * More logs.
      
      * Remove randomized selection in provisioner
      
      No longer supported by runtime.
      
      * Fix and simplify weight calculation.
      
      Random filtering of remote disputes got dropped.
      
      * Make existing tests pass.
      
      * Tests for size limiting.
      
      * Fix provisioner.
      
      * Remove rand dependency.
      
      * Better default block length for tests.
      
      * ".git/.scripts/commands/bench/bench.sh" runtime kusama runtime_parachains::paras_inherent
      
      * ".git/.scripts/commands/bench/bench.sh" runtime polkadot runtime_parachains::paras_inherent
      
      * ".git/.scripts/commands/bench/bench.sh" runtime westend runtime_parachains::paras_inherent
      
      * Update runtime/parachains/src/paras_inherent/mod.rs
      
      Co-authored-by: default avatarTsvetomir Dimitrov <[email protected]>
      
      * Update runtime/parachains/src/paras_inherent/mod.rs
      
      Co-authored-by: default avatarChris Sosnin <[email protected]>
      
      * Add back missing line.
      
      * Fix test.
      
      * fmt fix.
      
      * Add missing test annotation
      
      ---------
      
      Co-authored-by: default avatareskimor <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarTsvetomir Dimitrov <[email protected]>
      Co-authored-by: default avatarChris Sosnin <[email protected]>
      367098ba
  3. Jul 31, 2023
    • Marcin S.'s avatar
      98.6% OF DEVELOPERS CANNOT REVIEW THIS PR! [read more...] (#7337) · 85b06f18
      Marcin S. authored
      
      
      * [WIP] PVF: Split out worker binaries
      
      * Address compilation problems and re-design a bit
      
      * Reorganize once more, fix tests
      
      * Reformat with new nightly to make `cargo fmt` test happy
      
      * Address `clippy` warnings
      
      * Add temporary trace to debug zombienet tests
      
      * Fix zombienet node upgrade test
      
      * Fix malus and its CI
      
      * Fix building worker binaries with malus
      
      * More fixes for malus
      
      * Remove unneeded cli subcommands
      
      * Support placing auxiliary binaries to `/usr/libexec`
      
      * Fix spelling
      
      * Spelling
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * Implement review comments (mostly nits)
      
      * Fix worker node version flag
      
      * Rework getting the worker paths
      
      * Address a couple of review comments
      
      * Minor restructuring
      
      * Fix CI error
      
      * Add tests for worker binaries detection
      
      * Improve tests; try to fix CI
      
      * Move workers module into separate file
      
      * Try to fix failing test and workers not printing latest version
      
      - Tests were not finding the worker binaries
      - Workers were not being rebuilt when the version changed
      - Made some errors easier to read
      
      * Make a bunch of fixes
      
      * Rebuild nodes on version change
      
      * Fix more issues
      
      * Fix tests
      
      * Pass node version from node into dependencies to avoid recompiles
      
      - [X] get version in CLI
      - [X] pass it in to service
      - [X] pass version along to PVF
      - [X] remove rerun from service
      - [X] add rerun to CLI
      
      - [X] don’t rerun pvf/worker’s (these should be built by nodes which have rerun enabled)
      
      * Some more improvements for smoother tests
      
      - [X] Fix tests
      - [X] Make puppet workers pass None for version and remove rerun
      - [X] Make test collators self-contained
      
      * Add back rerun to PVF workers
      
      * Move worker binaries into files in cli crate
      
      As a final optimization I've separated out each worker binary from its own crate
      into the CLI crate. Before, the worker bin shared a crate with the worker lib,
      so when the binaries got recompiled so did the libs and everything transitively
      depending on the libs. This commit fixes this regression that was causing
      recompiles after every commit.
      
      * Fix bug (was passing worker version for node version)
      
      * Move workers out of cli into root src/bin/ dir
      
      - [X] Pass in node version from top-level (polkadot)
      - [X] Add build.rs with rerun-git-head to root dir
      
      * Add some sanity checks for workers to dockerfiles
      
      * Update malus
      
        + [X] Make it self-contained
        + [X] Undo multiple binary changes
      
      * Try to fix clippy errors
      
      * Address `cargo run` issue
      
      - [X] Add default-run for polkadot
      - [X] Add note about installation to error
      
      * Update readme (installation instructions)
      
      * Allow disabling external workers for local/testing setups
      
        + [X] cli flag to enable single-binary mode
        + [X] Add message to error
      
      * Revert unnecessary Cargo.lock changes
      
      * Remove unnecessary build scripts from collators
      
      * Add back missing malus commands (should fix failing ZN job)
      
      * Some minor fixes
      
      * Update Cargo.lock
      
      * Fix some build errors
      
      * Undo self-contained binaries; cli flag to disable version check
      
        + [X] Remove --dont-run-external-workers
        + [X] Add --disable-worker-version-check
        + [X] Remove PVF subcommands
        + [X] Redo malus changes
      
      * Try to fix failing job and add some docs for local tests
      
      ---------
      
      Co-authored-by: default avatarDmitry Sinyavin <[email protected]>
      Co-authored-by: default avatars0me0ne-unkn0wn <[email protected]>
      Co-authored-by: parity-processbot <>
      85b06f18
  4. Jul 25, 2023
    • Anton's avatar
      [Substrate companion] update libp2p to 0.52.0 (#7472) · 7a1d96e1
      Anton authored
      * update tinyvec to 1.6.0
      
      * update once_cell to 1.18.0
      
      * update data-encoding to 2.4.0
      
      * update libc
      
      * update js-sys
      
      * update wasm-bindgen-futures
      
      * update pin-project
      
      * update tokio
      
      * update syn
      
      * p2p protocol now contains `PeerId`
      
      not multihash
      
      * update arrayvec to 0.7.4
      
      * update sha2
      
      * update smallvec
      
      * updates to Cargo.lock after merge
      
      * redo dep updates
      
      * update lru
      
      in attempt to compile polkadot
      
      * update lockfile for {"substrate"}
      
      ---------
      
      Co-authored-by: parity-processbot <>
      7a1d96e1
  5. Jul 22, 2023
    • jserrat's avatar
      add tests to worker common thread (#7372) · 3f8c3454
      jserrat authored
      
      
      * add tests to worker common thread
      
      * fix formatting
      
      * move worker commons unit test from integration tests to worker file and do some improvements
      
      * fix import on it/worker_common
      
      * move worker commons unit test to test module
      
      * cargo fmt
      
      * move cpu_time_monitor_loop to test outside of thread module
      
      * change worker thread unit test to use assert_eq
      
      * fix formatting
      
      * adding new methods to WaitOucome, fix pvf worker unit test
      
      * fix formatting
      
      * remove is_finished and is_timeout methods from WaitOutcome
      
      * fix wait_for_threads_with_timeout_returns_outcome test
      
      * ".git/.scripts/commands/fmt/fmt.sh"
      
      * add common worker cond_notify_on_done_should_update_wait_outcome_when_panic test
      
      ---------
      
      Co-authored-by: default avatarMarcin S <[email protected]>
      Co-authored-by: command-bot <>
      3f8c3454
  6. Jul 20, 2023
  7. Jul 19, 2023
    • Francisco Aguirre's avatar
      Change Fixed to WeightInfoBounds for Polkadot (#7077) · cc9f8129
      Francisco Aguirre authored
      
      
      * Add polkadot XCM benchmarks
      
      * Add temp
      
      * ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm polkadot pallet_xcm_benchmarks::generic
      
      * Add weights to XCM on Polkadot
      
      * Make CI fail on old files
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Update template
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Add reserve_asset_deposited benchmark
      
      * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::generic
      
      * Update weights
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Change initiate_reserve_deposit in runtime weights
      
      * Update weights
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      
      * Remove trusted reserves from runtimes
      
      * Fix pallet-xcm-benchmarks mock
      
      * Fix test
      
      * Change pallet xcm weigher in kusama
      
      * Fix
      
      * Remove merge conflict artifact
      
      * Remove initiate_reserve_withdraw from generic benchmarks
      
      * Add missing implementation to XCM benchmark
      
      * Fix failing karura test
      
      * Remove dbg!
      
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      
      * Fix fmt
      
      * Revert "Fix fmt"
      
      This reverts commit 676f2d8db07d7427750c79f95494d4988d06fda5.
      
      * Fix fmt
      
      * Remove duplicated template code
      
      * Add back part of the template
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible
      
      * Don't skip reserve asset deposited benchmark
      
      * Remove call to non-generated benchmark yet
      
      * Underscore unused parameter
      
      * Skip not supported benchmarks and hardcode value
      
      * Remove ReserveAssetDeposited benchmark
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible
      
      * Add back ReserveAssetDeposited
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm polkadot pallet_xcm_benchmarks::fungible
      
      * Use default benchmark for ReserveAssetDeposited
      
      * Add missing parameter
      
      * Revert reserve asset deposited benchmark
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm kusama pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench-vm/bench-vm.sh" xcm westend pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible
      
      * Add 'real' benchmarks
      
      * Add TrustedReserve to actual XcmConfig
      
      * Add TrustedReserve to actual XcmConfig (fix)
      
      * Whitelist from benchmarking XCM storage keys read each block (#6871)
      
      * Whitelist from benchmarking XCM storage keys read each block
      
      * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm
      
      * Remove XcmPallet SupportedVersion from the benchmark whitelist
      
      * ".git/.scripts/commands/bench/bench.sh" runtime polkadot pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime kusama pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime westend pallet_xcm
      
      * ".git/.scripts/commands/bench/bench.sh" runtime rococo pallet_xcm
      
      * WIP
      
      * Add necessary traits, remove unnecessary whitelisted keys
      
      * Fix tests
      
      * Remove unused file
      
      * Remove unused import
      
      ---------
      
      Co-authored-by: command-bot <>
      
      * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm kusama pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm rococo pallet_xcm_benchmarks::fungible
      
      * ".git/.scripts/commands/bench/bench.sh" xcm westend pallet_xcm_benchmarks::fungible
      
      * Fix spellchecker issues
      
      * Remove unused migration code
      
      ---------
      
      Signed-off-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: command-bot <>
      Co-authored-by: default avatarOliver Tale-Yazdi <[email protected]>
      Co-authored-by: default avatarKeith Yeung <[email protected]>
      cc9f8129
  8. Jul 11, 2023
  9. Jul 07, 2023
  10. Jul 06, 2023
  11. Jul 05, 2023
  12. Jul 04, 2023
  13. Jun 23, 2023
  14. Jun 21, 2023
  15. Jun 14, 2023
  16. Jun 12, 2023
  17. Jun 08, 2023
  18. Jun 05, 2023
    • ordian's avatar
      dispute-coordinator: past session dispute slashing (#6811) · 01a19b45
      ordian authored
      
      
      * runtime/vstaging: unapplied_slashes runtime API
      
      * runtime/vstaging: key_ownership_proof runtime API
      
      * runtime/ParachainHost: submit_report_dispute_lost
      
      * fix key_ownership_proof API
      
      * runtime: submit_report_dispute_lost runtime API
      
      * nits
      
      * Update node/subsystem-types/src/messages.rs
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * revert unrelated fmt changes
      
      * dispute-coordinator: past session dispute slashing
      
      * encapsule runtime api call for submitting report
      
      * prettify: extract into a function
      
      * do not exit on runtime api error
      
      * fix tests
      
      * try initial zombienet test
      
      * try something
      
      * fix a typo
      
      * try cumulus-based collator
      
      * fix clippy
      
      * build polkadot-debug images with fast-runtime enabled
      
      * wip
      
      * runtime/inclusion: fix availability_threshold
      
      * fix wip
      
      * fix wip II
      
      * revert native provider
      
      * propagate tx submission error
      
      * DEBUG: sync=trace
      
      * print key ownership proof len
      
      * panic repro
      
      * log validator index in panic message
      
      * post merge fixes
      
      * replace debug assertion with a log
      
      * fix compilation
      
      * Let's log the dispatch info in validate block.
      
      * fix double encoding
      
      * Revert "Let's log the dispatch info in validate block."
      
      This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4.
      
      * Revert "Let's log the dispatch info in validate block."
      
      This reverts commit a70fbc51b464d7f4355dbada5e16cd83cf71eab4.
      
      * fix compilation
      
      * update to latest zombienet and fix test
      
      * lower finality lag to 11
      
      * bump zombienet again
      
      * add a workaround, but still does not work
      
      * Update .gitlab-ci.yml
      
      bump zombienet.
      
      * add a comment and search logs on all nodes
      
      ---------
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarJavier Viola <[email protected]>
      01a19b45
  19. Jun 02, 2023
    • Marcin S.'s avatar
      PVF: Instantiate wasm in pre-checking (#7246) · 5bbb87c4
      Marcin S. authored
      * PVF: Instantiate wasm in pre-checking
      
      * Move `runtime_construction_check` to prepare thread, use bytes
      
      * [minor] Update comment
      
      * Fix compile error
      
      * Update Cargo.lock
      
      * Update docs
      
      * Add some missing docs!
      5bbb87c4
  20. May 30, 2023
    • Tsvetomir Dimitrov's avatar
      `RollingSessionWindow` cleanup (#7204) · eb1ed63b
      Tsvetomir Dimitrov authored
      
      
      * 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: default avatarAndrei Sandu <[email protected]>
      
      * 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: default avatarAndrei Sandu <[email protected]>
      eb1ed63b
  21. May 26, 2023
    • ordian's avatar
      runtime: past session slashing runtime API (#6667) · 9bc4f62e
      ordian authored
      
      
      * runtime/vstaging: unapplied_slashes runtime API
      
      * runtime/vstaging: key_ownership_proof runtime API
      
      * runtime/ParachainHost: submit_report_dispute_lost
      
      * fix key_ownership_proof API
      
      * runtime: submit_report_dispute_lost runtime API
      
      * nits
      
      * Update node/subsystem-types/src/messages.rs
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      
      * revert unrelated fmt changes
      
      * post merge fixes
      
      * fix compilation
      
      ---------
      
      Co-authored-by: default avatarMarcin S. <[email protected]>
      9bc4f62e
  22. May 25, 2023
    • Marcin S.'s avatar
      PVF: Refactor workers into separate crates, remove host dependency (#7253) · 8782dde4
      Marcin S. authored
      * PVF: Refactor workers into separate crates, remove host dependency
      
      * Fix compile error
      
      * Remove some leftover code
      
      * Fix compile errors
      
      * Update Cargo.lock
      
      * Remove worker main.rs files
      
      I accidentally copied these from the other PR. This PR isn't intended to
      introduce standalone workers yet.
      
      * Address review comments
      
      * cargo fmt
      
      * Update a couple of comments
      
      * Update log targets
      8782dde4
  23. May 24, 2023
  24. May 23, 2023
  25. May 17, 2023
    • Tsvetomir Dimitrov's avatar
      Revert chain if at least f+1 validators voted against a candidate (#7151) · 0759495c
      Tsvetomir Dimitrov authored
      * Make `issue_explicit_statement_with_index` regular function
      
      * Make `issue_backing_statement_with_index` regular function
      
      * Issue `RevertBlocks` as soon as a dispute has `byzantine threshold + 1` invalid votes.
      
      * Remove a comment
      
      * Fix `has_fresh_byzantine_threshold_against()`
      
      * Extend `informs_chain_selection_when_dispute_concluded_against` test
      0759495c
  26. May 16, 2023
    • Marcin S.'s avatar
      PVF: Vote invalid on panics in execution thread (after a retry) (#7155) · 82e4dbcc
      Marcin S. authored
      * PVF: Remove `rayon` and some uses of `tokio`
      
      1. We were using `rayon` to spawn a superfluous thread to do execution, so it was removed.
      
      2. We were using `rayon` to set a threadpool-specific thread stack size, and AFAIK we couldn't do that with `tokio` (it's possible [per-runtime](https://docs.rs/tokio/latest/tokio/runtime/struct.Builder.html#method.thread_stack_size) but not per-thread). Since we want to remove `tokio` from the workers [anyway](https://github.com/paritytech/polkadot/issues/7117), I changed it to spawn threads with the `std::thread` API instead of `tokio`.[^1]
      
      [^1]: NOTE: This PR does not totally remove the `tokio` dependency just yet.
      
      3. Since `std::thread` API is not async, we could no longer `select!` on the threads as futures, so the `select!` was changed to a naive loop.
      
      4. The order of thread selection was flipped to make (3) sound (see note in code).
      
      I left some TODO's related to panics which I'm going to address soon as part of https://github.com/paritytech/polkadot/issues/7045.
      
      * PVF: Vote invalid on panics in execution thread (after a retry)
      
      Also make sure we kill the worker process on panic errors and internal errors to
      potentially clear any error states independent of the candidate.
      
      * Address a couple of TODOs
      
      Addresses a couple of follow-up TODOs from
      https://github.com/paritytech/polkadot/pull/7153
      
      .
      
      * Add some documentation to implementer's guide
      
      * Fix compile error
      
      * Fix compile errors
      
      * Fix compile error
      
      * Update roadmap/implementers-guide/src/node/utility/candidate-validation.md
      
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      
      * Address comments + couple other changes (see message)
      
      - Measure the CPU time in the prepare thread, so the observed time is not
        affected by any delays in joining on the thread.
      
      - Measure the full CPU time in the execute thread.
      
      * Implement proper thread synchronization
      
      Use condvars i.e. `Arc::new((Mutex::new(true), Condvar::new()))` as per the std
      docs.
      
      Considered also using a condvar to signal the CPU thread to end, in place of an
      mpsc channel. This was not done because `Condvar::wait_timeout_while` is
      documented as being imprecise, and `mpsc::Receiver::recv_timeout` is not
      documented as such. Also, we would need a separate condvar, to avoid this case:
      the worker thread finishes its job, notifies the condvar, the CPU thread returns
      first, and we join on it and not the worker thread. So it was simpler to leave
      this part as is.
      
      * Catch panics in threads so we always notify condvar
      
      * Use `WaitOutcome` enum instead of bool condition variable
      
      * Fix retry timeouts to depend on exec timeout kind
      
      * Address review comments
      
      * Make the API for condvars in workers nicer
      
      * Add a doc
      
      * Use condvar for memory stats thread
      
      * Small refactor
      
      * Enumerate internal validation errors in an enum
      
      * Fix comment
      
      * Add a log
      
      * Fix test
      
      * Update variant naming
      
      * Address a missed TODO
      
      ---------
      
      Co-authored-by: default avatarAndrei Sandu <[email protected]>
      82e4dbcc
    • Marcin S.'s avatar
      b75b137b
  27. May 12, 2023
    • Tsvetomir Dimitrov's avatar
      Replace `RollingSessionWindow` in approval-voting with `RuntimeInfo` (#7123) · 12dd9277
      Tsvetomir Dimitrov authored
      * 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
      12dd9277
  28. May 05, 2023
  29. May 04, 2023
  30. Apr 25, 2023
  31. Apr 24, 2023
    • Tsvetomir Dimitrov's avatar
      Rework `dispute-coordinator` to use `RuntimeInfo` for obtaining session... · 3f4ce632
      Tsvetomir Dimitrov authored
      
      Rework `dispute-coordinator` to use `RuntimeInfo` for obtaining session information instead of `RollingSessionWindow` (#6968)
      
      * Pass `SessionInfo` directly to `CandidateEnvironment::new` otherwise it should be an async function
      
      * Replace calls to `RollingSessionWindow` with `RuntimeInfo`
      
      Adjust `dispute-coordinator` initialization to use `RuntimeInfo`
      
      * Modify `dispute-coordinator` initialization
      
      * Pass `Hash` to `process_on_chain_votes` so that `RuntimeInfo` calls can be made
      
      Remove some fixmes
      
      * Pass `Hash` to `handle_import_statements` to perform `RuntimeInfo` calls
      
      * remove todo comments
      
      * Remove `error` from `Initialized`
      
      Rework new session handling code
      
      * Remove db code which is no longer used
      
      * Update stale comment and remove unneeded type specification
      
      * Cache SessionInfo on startup
      
      * Use `DISPUTE_WINDOW` from primitives
      
      * Fix caching in `process_active_leaves_update`
      
      * handle_import_statements: leaf_hash -> block_hash
      
      * Restore `ensure_available_session_info`
      
      * Don't interrupt `process_on_chain_votes` if SessionInfo can't be fetched
      
      * Small style improvements in logging
      
      * process_on_chain_votes: leaf_hash -> block_hash
      
      * Restore `note_earliest_session` - it is required to prune disputes and votes
      
      * Cache new sessions only when there is an actual session change
      
      * Fix tests
      
      * `CandidateEnvironment::new` gets `session_idx` and fetches SessionInfo by itself to avoid the invariant where the input SessionIndex and SessionInfo parameters don't match
      
      * Fix handling of missing session info
      
      * Move sessions caching in `handle_startup` and fix tests
      
      * Load `relay_parent` from db in `handle_import_statements` instead of passing it as a parameter via two functions
      
      * Don't do two db reads
      
      * Fix the twisted logic in `handle_import_statements`
      
      * fixup
      
      * Small style fix
      
      * Decrease log levels for caching errors to debug and fix a typo
      
      * Update outdated comment
      
      * Remove `ensure_available_session_info`
      
      * Load relay parent from db in `process_on_chain_votes`
      
      * Revert "Load relay parent from db in `process_on_chain_votes`"
      
      This reverts commit 978ad4f223d517faa7a7fbad96e3f8de4fa17501.
      
      * Keep track of highest seen session and last session cached without gaps.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarordian <[email protected]>
      
      * Handle session caching failure on startup correctly
      
      * Update node/core/dispute-coordinator/src/initialized.rs
      
      Co-authored-by: default avatarordian <[email protected]>
      
      * Simplify session caching retries
      
      * Update stale comment
      
      * Fix lower bound calculation for session caching
      
      ---------
      
      Co-authored-by: default avatarordian <[email protected]>
      3f4ce632
  32. Apr 21, 2023
    • Marcin S.'s avatar
      PVF: Move PVF workers into separate crate (#7101) · e277f95b
      Marcin S. authored
      * Move PVF workers into separate crate
      
      * Fix indentation
      
      * Fix compilation errors
      
      * Fix more compilation errors
      
      * Rename `worker.rs` files, make host interface to worker more clear
      
      * Fix more compilation errors
      
      * Fix more compilation errors
      
      * Add link to issue
      
      * Address review comments
      
      * Update comment
      e277f95b
  33. Apr 20, 2023
    • Marcin S.'s avatar
      PVF: Don't dispute on missing artifact (#7011) · 0940cdd1
      Marcin S. authored
      * PVF: Don't dispute on missing artifact
      
      A dispute should never be raised if the local cache doesn't provide a certain
      artifact. You can not dispute based on this reason, as it is a local hardware
      issue and not related to the candidate to check.
      
      Design:
      
      Currently we assume that if we prepared an artifact, it remains there on-disk
      until we prune it, i.e. we never check again if it's still there.
      
      We can change it so that instead of artifact-not-found triggering a dispute, we
      retry once (like we do for AmbiguousWorkerDeath, except we don't dispute if it
      still doesn't work). And when enqueuing an execute job, we check for the
      artifact on-disk, and start preparation if not found.
      
      Changes:
      
      - [x] Integration test (should fail without the following changes)
      - [x] Check if artifact exists when executing, prepare if not
      - [x] Return an internal error when file is missing
      - [x] Retry once on internal errors
      - [x] Document design (update impl guide)
      
      * Add some context to wasm error message (it is quite long)
      
      * Fix impl guide
      
      * Add check for missing/inaccessible file
      
      * Add comment referencing Substrate issue
      
      * Add test for retrying internal errors
      
      ---------
      
      Co-authored-by: parity-processbot <>
      0940cdd1
  34. Apr 19, 2023
    • Marcin S.'s avatar
      pvf: Update docs for PVF artifacts (#6551) · b3e2153f
      Marcin S. authored
      * pvf: Update docs for PVF artifacts
      
      * pvf: Clarify doc re. node start-up
      b3e2153f
    • Davide Galassi's avatar
      Companion for Substrate #13889 (#7063) · 83fb51a2
      Davide Galassi authored
      * Companion for substrate #13889
      
      * Remove leftover
      
      * Remove removed dependency
      
      * Remove sp-consensus-vrf from lock
      
      * Revert "Remove sp-consensus-vrf from lock"
      
      This reverts commit 2269ca1e32df89272e8fd4544292204db387f436.
      
      * Fix after substrate modifications
      
      * Fix tests to use new VRF Signature type
      
      * Don't rely of Deref trait
      
      * Fix test
      
      * Further code simplification
      
      * Reuse garbage_vrf_signature
      
      * update lockfile for {"substrate"}
      
      ---------
      
      Co-authored-by: parity-processbot <>
      83fb51a2
  35. Apr 17, 2023
  36. Apr 11, 2023
    • Mira Ressel's avatar
      apply clippy 1.68 suggestions · 0e9b0a64
      Mira Ressel authored
      * Simplify &(ref foo, _) tuple pattern matches
      * Drop unneccessary .clone() calls
      * Replace .position(cond).is_some() by .any(cond)
      * Drop unneccessary lifetime specs
      0e9b0a64
  37. Apr 08, 2023