Commit Graph

635 Commits

Author SHA1 Message Date
Marcin S 8782dde411 PVF: Refactor workers into separate crates, remove host dependency (#7253)
* 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
2023-05-25 20:29:13 +00:00
Bastian Köcher 28de4f1337 Companion: Substrate#13869 (#7119)
* Companion: Substrate#13869

https://github.com/paritytech/substrate/pull/13869

* update lockfile for {"substrate"}

* ".git/.scripts/commands/fmt/fmt.sh"

---------

Co-authored-by: parity-processbot <>
2023-05-24 22:36:56 +00:00
Marcin S d219260cac PVF: instantiate runtime from bytes (#7270)
* PVF: instantiate runtime from bytes

* Update naming
2023-05-23 18:56:02 +00:00
Tsvetomir Dimitrov 0759495cec Revert chain if at least f+1 validators voted against a candidate (#7151)
* 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
2023-05-17 18:29:09 +00:00
Marcin S 82e4dbcc2d PVF: Vote invalid on panics in execution thread (after a retry) (#7155)
* 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: Andrei Sandu <54316454+sandreim@users.noreply.github.com>

* 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: Andrei Sandu <54316454+sandreim@users.noreply.github.com>
2023-05-16 21:01:02 +00:00
Marcin S b75b137b0f PVF: Remove rayon and some uses of tokio (#7153) 2023-05-16 14:34:58 -04:00
Tsvetomir Dimitrov 12dd927798 Replace RollingSessionWindow in approval-voting with RuntimeInfo (#7123)
* 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
2023-05-12 15:11:10 +02:00
Andrei Sandu 2ca3750f0f Prefer fetching small PoVs from backing group (#7173)
* impl QueryChunkSize

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* QueryChunkSize message

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* enable fetching from backing group for small pov

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* review feedback

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* Refactor `bypass_availability_store`

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

* review feedback

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>

---------

Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
2023-05-05 09:56:54 +00:00
Davide Galassi f6a743dadc Companion for substrate #14036 (#7145)
* Companion for substrate #14036

* Rollback of some trivial renamings

* update lockfile
2023-05-04 16:46:43 +02:00
eskimor 33dd2584df Fix stalling dispute coordinator. (#7125)
* Fix stalling dispute coordinator.

* Initialization.

---------

Co-authored-by: eskimor <eskimor@no-such-url.com>
2023-04-25 16:42:45 +02:00
Tsvetomir Dimitrov 3f4ce6326f 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: ordian <write@reusable.software>

* Handle session caching failure on startup correctly

* Update node/core/dispute-coordinator/src/initialized.rs

Co-authored-by: ordian <write@reusable.software>

* Simplify session caching retries

* Update stale comment

* Fix lower bound calculation for session caching

---------

Co-authored-by: ordian <write@reusable.software>
2023-04-24 12:27:44 +00:00
Marcin S e277f95b3b PVF: Move PVF workers into separate crate (#7101)
* 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
2023-04-21 10:40:09 +00:00
Marcin S 0940cdd1d7 PVF: Don't dispute on missing artifact (#7011)
* 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 <>
2023-04-20 13:38:31 +00:00
Marcin S b3e2153f2f pvf: Update docs for PVF artifacts (#6551)
* pvf: Update docs for PVF artifacts

* pvf: Clarify doc re. node start-up
2023-04-19 16:08:01 +00:00
Davide Galassi 83fb51a21c Companion for Substrate #13889 (#7063)
* 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 <>
2023-04-19 09:43:42 +00:00
dependabot[bot] aa93b50120 Bump hex-literal from 0.3.4 to 0.4.1 (#7071)
Bumps [hex-literal](https://github.com/RustCrypto/utils) from 0.3.4 to 0.4.1.
- [Release notes](https://github.com/RustCrypto/utils/releases)
- [Commits](https://github.com/RustCrypto/utils/compare/hex-literal-v0.3.4...hex-literal-v0.4.1)

---
updated-dependencies:
- dependency-name: hex-literal
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-17 18:48:35 +02:00
Koute 59054bd466 Use MaybeUninit when calling getrusage (musl compatibility) (#7086) 2023-04-17 06:44:08 +00:00
Mira Ressel 0e9b0a6421 apply clippy 1.68 suggestions
* Simplify &(ref foo, _) tuple pattern matches
* Drop unneccessary .clone() calls
* Replace .position(cond).is_some() by .any(cond)
* Drop unneccessary lifetime specs
2023-04-11 15:36:21 +02:00
s0me0ne-unkn0wn 64660ee8d2 Remove years from copyright notes (#7034)
* Happy New Year!

* Remove year entierly

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Remove years from copyright notice in the entire repo

---------

Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-04-08 20:38:35 +00:00
Tsvetomir Dimitrov 63a805baba Onchain scraper in dispute-coordinator will scrape SCRAPED_FINALIZED_BLOCKS_COUNT blocks before finality (#7013)
* Onchain scraper in `dispute-coordinator` will scrape `SCRAPED_FINALIZED_BLOCKS_COUNT` blocks before finality

The purpose is to make the availability of a `CandidateReceipt` for finalized candidates more likely.

For details see:  https://github.com/paritytech/polkadot/issues/7009

* Fix off by one error

* Replace `SCRAPED_FINALIZED_BLOCKS_COUNT` with `DISPUTE_CANDIDATE_LIFETIME_AFTER_FINALIZATION`
2023-04-07 20:34:09 +00:00
Marcin S 5889119fc9 PVF: Minor refactor in workers code (#7012)
* Move version check to `worker_event_loop`

* More minor refactors

- More consistent use of `format_invalid` and `format_internal`.
- Fix a doc error.
- Fix some poorly-named local variables.
2023-04-07 10:14:53 +00:00
s0me0ne-unkn0wn 8fd05b62bc Expose WASM bulk memory extension in execution environment parameters (#7008) 2023-04-05 22:01:31 +00:00
s0me0ne-unkn0wn b47d5ee23b Companion for paritytech/substrate#13811 (#6998)
* Companion for paritytech/substrate#13811

* Add comment

* update lockfile for {"substrate"}

* Update Substrate

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

* Fix pallet weight warnings

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: parity-processbot <>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
2023-04-04 18:53:13 +00:00
Bastian Köcher 2354161f57 Substrate companion: Remove deprecated batch verification (#6999)
* Substrate companion: Remove deprecated batch verification

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-04-04 10:33:07 +00:00
Mattia L.V. Bradascio 713f6625fa Consolidate subsystem spans so they are all children of the leaf-activated root span (#6458)
* Pass the PerLeafSpan as mutable reference to handle_new_head function

* cargo +nightly fmt --all

* Add mock span for test

* cargo +nightly fmt --all

* add new-blocks-hashes to span

* ref span in match statement, set span to disabled if not passed

* remove second match clause, make handle_new_head_span mutable

* cargo +nightly fmt --all

* improve tag on error and warning

* add imported blocks and info span

* cargo +nightly fmt --all

* Improve error for imported_blocks_and_info trace

* format tags on get_header_span

* add lost-to-finality tag

* add missing bracket

* - Add bitfield child span
- Add block db insertion span

* - fix update-bitfield span tag

* - Fix type conversion to u64
- Add missing argument

* - Cargo fmt

* - Test add_follows_from

* - Revert as  relationship between spans not working correctly

* - use drop to test if parent-child relationship can be re-established

* - remove bitfield span, check if parent-child relationship can be reestablished

* - Remove dangling bitfield span which is not used, to see if parent-child relationship can be re-established

* Another dangling bitfield span

* cargo fmt

* - add imported blocks and info span
- add candidate span per candidate

* add tags before moving block_header to push scope

* - Add db-insertion span

* cargo fmt

* fix types

* * Pass mutable reference to span in handle_new_head
* Change get-header-span tags in handle_new_head
* Create cache-session-info span in handle_new_head
* Create optional argument in determine_new_blocks
* Pass mutable reference to handle_new_head_span in determine_new_blocks in handle_new_head function
* Add candidate-hash, candidate-number, lost-to-finality tags to candidate_span in handle_new_head function
* Manually drop db_insertion_span and remove superfluous tags  to it, only keeping approved-bitfields tag
* Add ApprovalVoting stage in jaeger

* * Pass mutable reference to jaeger::Span in stead of PerLeafSpan
* Add block-import span

* *Pass optional_span (optional argument) to determine_new_blocks util function

* * Add num-candidates int tag to block_import_span

* * Add head tag to cache_session_span

* * Create PerLeafSpan in handle_from_overseer (this is required to establish parent-child relationship between approval-voting span, and leaf-activated root span)

* * Add candidate-import-span as child of block-import-span
* Add candidate-hash and num-approval tags to candidate-import-span

* * Fix num-candidate tag to bitvec-len tag in candidate-import-span

* *Fix imported_blocKs_and_info span to create new-block-span as not dealing with candidates

* Consider the future::select! block

* Use HashMap<Hash, jaeger::PerLeafSpan>

* Remove Stage 9

* Add missing spans

* cargo +nightly fmt --all

* Remove optional span argument for determine_new_blocks

* * Remove no-longer needed default PerLeafSpan implementation
* Remove no-longer necessary mock span given re-factoring of handle_new_head() no longer neeing mutable span
* Split validation-result and request-data (availability and validation code) spans into two by dropping request_validation_data_spans
* Remove drop statements for cache_session_info_span
*

* Remove unnecessary span

* Remove another excessively spammy span

* Add missing spans from State in import tests

* Use functional approach to get spans

* - Add functional approach for the approval-voting span
- Add doc on block_numbers given labelling ambiguity
- Add span pruning logic
- Use .add_para_id on validation_result_span

* Replace for hash_set in hash_set_iter with map closure

* cargo +nightly fmt --all

* Change from unconsumed `map` to `.for_each`

* cargo +nightly fmt --all

* Refactor add_para_id to validation_result_span

* cargo +nightly fmt --all

* Remove duplicate tag

* Add missing tag to handle-approved-ancestor span

* Refactor span pruning to only invoke retain once

* Typo in span name

* - Replace unwrap_or with unwrap_or_else due to lazy evaluation of trace-identifier in polkadot_node_jaeger
- Remove some redundant spans

* Add approval-distribution spans

* - Add unwrap_or_else on note-approved-in-chain-selection
- Use child_with_trace_id to add traceID string tag on span (note this does not change the traceID, but just adds a tag)

* cargo +nightly fmt --all

* - Add traceID tags were necessary in approval-voting and availability-distribution
- Always use block-hash tag in stead of relay-parent tag in approval-distribution

* Remove schedule-wakeup span as it will duplicate spans on existing wakeups (which should be a no-op)

* Remove a couple of warnings related to mutability

* Fix failing tests in availability distribution

* Add traceID tag to launch-approval and validation-result

* Reshuffle the validation and validation result spans to where more appropriate and add block-hash tag

* - Add tranche and should-trigger tag to process-wakeup span
- Add candidate-hash and traceID to check-and-import-approval span

* cargo fmt

* - Adjustments after PR comments

* Move span pruning after other pruning logic

* Remove DerefMut - no longer needed

* Relabel request-chunk spans

* - Fix typo in span label
- Add docs for drops

* Add new approval-voting span pruning logic

* Undo removal of !

* cargo fmt
2023-03-31 15:54:19 +00:00
Bradley Olson f7bd3a95a0 Drop timers for new requests of active participations (#6974)
* First pass adding logs

* fmt

* Adjustments

* Get rid of extra timers for running participations

* fmt

* Handling timer discards more elegantly
2023-03-30 20:33:25 +00:00
s0me0ne-unkn0wn a946ca2daf Use SIGTERM instead of SIGKILL on PVF worker version mismatch (#6981) 2023-03-30 21:41:54 +02:00
s0me0ne-unkn0wn 55b4aceb99 Check spawned worker version vs node version before PVF preparation (#6861)
* Check spawned worker version vs node version before PVF preparation

* Address discussions

* Propagate errors and shutdown preparation and execution pipelines properly

* Add logs; Fix execution worker checks

* Revert "Propagate errors and shutdown preparation and execution pipelines properly"

This reverts commit b96cc3160ff58db5ff001d8ca0bfea9bd4bdd0f2.

* Don't try to shut down; report the condition and exit worker

* Get rid of `VersionMismatch` preparation error

* Merge master

* Add docs; Fix tests

* Update Cargo.lock

* Kill again, but only the main node process

* Move unsafe code to a common safe function

* Fix libc dependency error on MacOS

* pvf spawning: Add some logging, add a small integration test

* Minor fixes

* Restart CI

---------

Co-authored-by: Marcin S <marcin@realemail.net>
2023-03-29 22:48:41 +00:00
Davide Galassi 260d073658 Companion for #13683 (#6944)
* Companion for #13683

* Wraps trait is not required

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-03-24 14:43:21 +00:00
Tsvetomir Dimitrov 95f0ca271e Bump parity-scale-codec to v 3.4.0 (#6945) 2023-03-23 15:15:03 +00:00
Bastian Köcher c7b3352b79 Ensure candidate-backing and provisioner exit on missing Overseer (#6939)
This ensures that both subsystems exit when the Overseer has exited
because of some error.
2023-03-23 10:07:40 +01:00
Bradley Olson b26cf3b7d0 Handling timers for repeat dispute participation requests (#6901)
* Added participation and queue sizes metrics

* First draft of all metric code

* Tests pass

* Changed Metrics to field on participation + queues

* fmt

* Improving naming

* Refactor, placing timer in ParticipationRequest

* fmt

* Final cleanup

* Revert "Final cleanup"

This reverts commit 02e5608df64b2e0f7810905e4508673b2037d351.

* Changing metric names

* Implementing Eq only for unit tests

* fmt

* Removing Clone trait from ParticipationRequest

* fmt

* Moved clone functionality to tests helper

* fmt

* Fixing dropped timers on repeat requests

* Keep older best effort timers

* Removing comment redundency and explaining better

* Updating queue() to use single mem read

* fmt
2023-03-21 00:55:35 +00:00
Mira Ressel 058082fcb0 tweak some pattern matches to address a new clippy warning 2023-03-20 16:36:06 +01:00
Vsevolod Stakhov 6d902ce073 Revert "Update orchestra to the recent version (#6854)" (#6916)
This reverts commit 5565bb9dbc.
2023-03-20 15:08:05 +00:00
Davide Galassi 46c36e5a4f [Companion #13615] Keystore overhaul (#6892)
* Remove not required async calls

* Fixed missing renaming

* make_keystore can be sync

* More fixes

* Trivial nitpicks

* Cherry pick test fix from master

* Fixes after master merge

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-03-17 12:09:15 +00:00
Davide Galassi 163d892d8c Fix approval voting test (#6898) 2023-03-17 08:33:50 +01:00
Bradley Olson 8d92debd44 Testing Reversion Speed on Dispute Concluded Against (#6880)
* First pass adding logs

* fmt

* Adjustments
2023-03-16 18:56:38 +00:00
Bradley Olson 200e9dfa29 Issue 4393: Correcting Unnecessary Use of Arc (#6882)
* Added participation and queue sizes metrics

* First draft of all metric code

* Tests pass

* Changed Metrics to field on participation + queues

* fmt

* Improving naming

* Refactor, placing timer in ParticipationRequest

* fmt

* Final cleanup

* Revert "Final cleanup"

This reverts commit 02e5608df64b2e0f7810905e4508673b2037d351.

* Changing metric names

* Implementing Eq only for unit tests

* fmt

* Removing Clone trait from ParticipationRequest

* fmt

* Moved clone functionality to tests helper
2023-03-16 10:00:56 +01:00
s0me0ne-unkn0wn 27c9124411 Release parachain host API v4 (#6885) 2023-03-15 17:06:18 +00:00
Marcin S ba29d06334 PVF: Document that preparation cannot lead to disputes (#6873)
* PVF: Document that preparation cannot lead to disputes

* Add warning for deterministic errors

* Fix warning
2023-03-15 01:35:38 +01:00
Vsevolod Stakhov 5565bb9dbc Update orchestra to the recent version (#6854)
* Test the recent orchestra changes

* Update orchestra and metered-channel
2023-03-14 09:29:57 +00:00
Bradley Olson c99362e56c Adding Dispute Participation Metrics (#6838)
* Added participation and queue sizes metrics

* First draft of all metric code

* Tests pass

* Changed Metrics to field on participation + queues

* fmt

* Improving naming

* Refactor, placing timer in ParticipationRequest

* fmt

* Final cleanup

* Revert "Final cleanup"

This reverts commit 02e5608df64b2e0f7810905e4508673b2037d351.

* Changing metric names

* Implementing Eq only for unit tests

* fmt
2023-03-11 00:38:24 +00:00
s0me0ne-unkn0wn 03d4af104f Move PVF timeouts to executor environment parameters (#6823)
* Move PVF timeouts to executor environment parameters

* Typo

Co-authored-by: Marcin S. <marcin@realemail.net>

* Fix comments

* Change handle_import_statements to FatalResult (#6820)

* Changing dispute db errors to fatal

* fmt

* Change node-key for bootnodes (#6772)

* Additional tracing in `provisioner`, `vote_selection` and `dispute-coordinator` (#6775)

* Additional tracing in `provisioner`, `vote_selection`

* Add `fetched_onchain_disputes` metric to provisioner

* Some tracelines in dispute-coordinator

TODO: cherry pick this in the initial branch!!!

* Remove spammy logs

* Remove some trace lines

* Rename and fix things

* Fix comments

* Typo

* Minor fixes

* Add codec indexes; Remove macro

---------

Co-authored-by: Marcin S. <marcin@realemail.net>
Co-authored-by: Bradley Olson <34992650+BradleyOlson64@users.noreply.github.com>
Co-authored-by: Petr Mensik <petr.mensik1@gmail.com>
Co-authored-by: Tsvetomir Dimitrov <tsvetomir@parity.io>
2023-03-08 22:43:51 +00:00
Tsvetomir Dimitrov 70be7a03d3 Additional tracing in provisioner, vote_selection and dispute-coordinator (#6775)
* Additional tracing in `provisioner`, `vote_selection`

* Add `fetched_onchain_disputes` metric to provisioner

* Some tracelines in dispute-coordinator

TODO: cherry pick this in the initial branch!!!

* Remove spammy logs

* Remove some trace lines
2023-03-06 12:18:30 +00:00
Bradley Olson 7e7f72ed74 Change handle_import_statements to FatalResult (#6820)
* Changing dispute db errors to fatal

* fmt
2023-03-04 19:35:04 +01:00
eskimor 4931eb0a97 Get rid of unnecessary cloning and work. (#6808)
Co-authored-by: eskimor <eskimor@no-such-url.com>
2023-03-02 07:53:32 +01:00
Bradley Olson 92ee0b7d9f Explicitly Handling ProvisionableData Cases (#6757)
* Initial pass

* fmt

* Lock changes

* Implementers guide edit

* Reasoning changes

* typo

Co-authored-by: Marcin S. <marcin@bytedude.com>

* Revert "Lock changes"

This reverts commit 3131a5245c6349743789270e6d1ad7842dc4c9df.

* Getting rid of cargo.lock changes

* Argumentation update

* fmt

---------

Co-authored-by: Marcin S. <marcin@bytedude.com>
2023-02-24 21:54:14 +01:00
Bastian Köcher 1e291f30f4 Companion for Substrate#12520 (#6730)
* Companion for Substrate#12520

https://github.com/paritytech/substrate/pull/12520

* Fix

* update lockfile for {"substrate"}

---------

Co-authored-by: parity-processbot <>
2023-02-24 12:47:41 +00:00
s0me0ne-unkn0wn b13ba77a3b Use PVF code paired with executor params wherever possible (#6742) 2023-02-20 13:41:46 +01:00
s0me0ne-unkn0wn bad4afca36 Retire OldV1SessionInfo (#6744) 2023-02-20 10:30:45 +00:00