Skip to content
  1. May 24, 2023
  2. May 23, 2023
  3. May 22, 2023
  4. May 21, 2023
  5. May 20, 2023
  6. May 19, 2023
  7. May 17, 2023
  8. 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
    • Branislav Kontur's avatar
      [xcm] Foreign global consensus parachain LocationToAccountId converter (#7016) · a5f4c2df
      Branislav Kontur authored
      
      
      * **Foreign** global consensus parachain LocationToAccount converter
      
      * Review fix
      
      * Added `UniversalLocation` + `ensure_is_remote` handling
      
      * Added unique id to encoding
      
      * Update xcm/xcm-builder/src/location_conversion.rs
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      
      * Re-export `ensure_is_remote`
      
      * Test
      
      * fmt
      
      * Update xcm/xcm-builder/src/location_conversion.rs
      
      * Update xcm/xcm-builder/src/universal_exports.rs
      
      Co-authored-by: default avatarGavin Wood <[email protected]>
      
      ---------
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarGavin Wood <[email protected]>
      a5f4c2df
  9. May 15, 2023
  10. May 13, 2023
  11. May 12, 2023
    • dependabot[bot]'s avatar
      Bump reqwest from 0.11.11 to 0.11.17 (#7152) · 339d4a56
      dependabot[bot] authored
      
      
      Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.11 to 0.11.17.
      - [Release notes](https://github.com/seanmonstar/reqwest/releases)
      - [Changelog](https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md)
      - [Commits](https://github.com/seanmonstar/reqwest/compare/v0.11.11...v0.11.17)
      
      ---
      updated-dependencies:
      - dependency-name: reqwest
        dependency-type: direct:production
        update-type: version-update:semver-patch
      ...
      
      Signed-off-by: default avatardependabot[bot] <[email protected]>
      Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
      339d4a56
    • Anton's avatar
      [Substrate Companion] Upgrade to libp2p 0.51.3 (#7000) · 147a8235
      Anton authored
      * upgrade js-sys to 0.3.61
      
      * update wasm-bindgen-futures
      
      * update once_cell
      
      * update either
      
      * update futures
      
      * update pyroscope to 0.5.3
      
      * use the new pyroscope API
      
      * add missing imports
      
      * readme is incorrect
      
      * add shutdown
      
      * fix shutdown
      
      * remove mut
      
      * remove mut 2
      
      * redo updates
      
      * update zeroize
      
      * update lockfile for {"substrate"}
      
      * update lockfile for {"substrate", "cumulus"}
      
      * redo updates
      
      * restart CI
      
      ---------
      
      Co-authored-by: parity-processbot <>
      147a8235
    • 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
    • Arkadiy Paronyan's avatar
      Bump parity-db (#7209) · 3b91d778
      Arkadiy Paronyan authored
      3b91d778
  12. May 11, 2023
  13. May 10, 2023
  14. May 09, 2023