1. Dec 25, 2020
  2. Dec 17, 2020
    • asynchronous rob's avatar
      adjust span names (#2135) · e28bcbd2
      asynchronous rob authored
      * adjust span names
      
      * fix compile
      e28bcbd2
    • ordian's avatar
      refactor View to include finalized_number (#2128) · c429e15c
      ordian authored
      * refactor View to include finalized_number
      
      * guide: update the NetworkBridge on BlockFinalized
      
      * av-store: fix the tests
      
      * actually fix tests
      
      * grumbles
      
      * ignore macro doctest
      
      * use Hash::repeat_bytes more consistently
      
      * broadcast empty leaves updates as well
      
      * fix issuing view updates on empty leaves updates
      c429e15c
  3. Dec 11, 2020
  4. Nov 24, 2020
  5. Nov 23, 2020
  6. Nov 20, 2020
    • Peter Goodspeed-Niklaus's avatar
      Add Prometheus timers to the subsystems (#1923) · e655654e
      Peter Goodspeed-Niklaus authored
      * reexport prometheus-super for ease of use of other subsystems
      
      * add some prometheus timers for collation generation subsystem
      
      * add timing metrics to av-store
      
      * add metrics to candidate backing
      
      * add timing metric to bitfield signing
      
      * add timing metrics to candidate selection
      
      * add timing metrics to candidate-validation
      
      * add timing metrics to chain-api
      
      * add timing metrics to provisioner
      
      * add timing metrics to runtime-api
      
      * add timing metrics to availability-distribution
      
      * add timing metrics to bitfield-distribution
      
      * add timing metrics to collator protocol: collator side
      
      * add timing metrics to collator protocol: validator side
      
      * fix candidate validation test failures
      
      * add timing metrics to pov distribution
      
      * add timing metrics to statement-distribution
      
      * use substrate_prometheus_endpoint prometheus reexport instead of prometheus_super
      
      * don't include JOB_DELAY in bitfield-signing metrics
      
      * give adder-collator ability to easily export its genesis-state and validation code
      
      * wip: adder-collator pushbutton script
      
      * don't attempt to register the adder-collator automatically
      
      Instead, get these values with
      
      ```sh
      target/release/adder-collator export-genesis-state
      target/release/adder-collator export-genesis-wasm
      ```
      
      And then register the parachain on https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944#/explorer
      
      To collect prometheus data, after running the script, create `prometheus.yml` per the instructions
      at https://www.notion.so/paritytechnologies/Setting-up-Prometheus-locally-835cb3a9df7541a781c381006252b5ff
      
      
      and then run:
      
      ```sh
      docker run -v `pwd`/prometheus.yml:/etc/prometheus/prometheus.yml:z --network host prom/prometheus
      ```
      
      Demonstrates that data makes it across to prometheus, though it is likely to be useful in the future
      to tweak the buckets.
      
      * Update parachain/test-parachains/adder/collator/src/cli.rs
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * use the grandpa-pause parameter
      
      * skip metrics in tracing instrumentation
      
      * remove unnecessary grandpa_pause cli param
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      e655654e
    • Peter Goodspeed-Niklaus's avatar
      Add tracing support to node (#1940) · f7ea3d07
      Peter Goodspeed-Niklaus authored
      * drop in tracing to replace log
      
      * add structured logging to trace messages
      
      * add structured logging to debug messages
      
      * add structured logging to info messages
      
      * add structured logging to warn messages
      
      * add structured logging to error messages
      
      * normalize spacing and Display vs Debug
      
      * add instrumentation to the various 'fn run'
      
      * use explicit tracing module throughout
      
      * fix availability distribution test
      
      * don't double-print errors
      
      * remove further redundancy from logs
      
      * fix test errors
      
      * fix more test errors
      
      * remove unused kv_log_macro
      
      * fix unused variable
      
      * add tracing spans to collation generation
      
      * add tracing spans to av-store
      
      * add tracing spans to backing
      
      * add tracing spans to bitfield-signing
      
      * add tracing spans to candidate-selection
      
      * add tracing spans to candidate-validation
      
      * add tracing spans to chain-api
      
      * add tracing spans to provisioner
      
      * add tracing spans to runtime-api
      
      * add tracing spans to availability-distribution
      
      * add tracing spans to bitfield-distribution
      
      * add tracing spans to network-bridge
      
      * add tracing spans to collator-protocol
      
      * add tracing spans to pov-distribution
      
      * add tracing spans to statement-distribution
      
      * add tracing spans to overseer
      
      * cleanup
      f7ea3d07
  7. Nov 19, 2020
  8. Nov 17, 2020
    • ordian's avatar
      update most of the dependencies (#1946) · 31fb8fed
      ordian authored
      * update tiny-keccak to 0.2
      
      * update deps except bitvec and shared_memory
      
      * fix some warning after futures upgrade
      
      * remove useless package rename caused by bug in cargo-upgrade
      
      * revert parity-util-mem *
      
      * remove unused import
      
      * cargo update
      
      * remove all renames on parity-scale-codec
      
      * remove the leftovers
      
      * remove unused dep
      31fb8fed
  9. Nov 05, 2020
    • ordian's avatar
      more resilient subsystems (#1908) · 9758a180
      ordian authored
      * backing: extract log target
      
      * bitfield-signing: extract log target
      
      * utils: fix a typo
      
      * provisioner: extract log target
      
      * candidate selection: remove unused error variant
      
      * bitfield-distribution: change the return type of run
      
      * pov-distribution: extract log target
      
      * collator-protocol: simplify runtime request
      
      * collation-generation: do not exit early on error
      
      * collation-generation: do not exit on double init
      
      * collator-protocol: do not exit on errors and rename LOG_TARGET
      
      * collator-protocol: a workaround for ununused imports warning
      
      * Update node/network/bitfield-distribution/src/lib.rs
      
      * collation-generation: elevate warn! to error!
      
      * collator-protocol: fix imports
      
      * post merge fix
      
      * fix compilation
      9758a180
  10. Nov 03, 2020
  11. Oct 28, 2020
    • Fedor Sakharov's avatar
      Change SpawnedSubsystem type to log subsystem errors (#1878) · d34585dd
      Fedor Sakharov authored
      * Change SpawnedSubsystem type to log subsystem errors
      
      * Remove clone
      d34585dd
    • Peter Goodspeed-Niklaus's avatar
      start working on building the real overseer (#1795) · 798f781f
      Peter Goodspeed-Niklaus authored
      
      
      * start working on building the real overseer
      
      Unfortunately, this fails to compile right now due to an upstream
      failure to compile which is probably brought on by a recent upgrade
      to rustc v1.47.
      
      * fill in AllSubsystems internal constructors
      
      * replace fn make_metrics with Metrics::attempt_to_register
      
      * update to account for #1740
      
      * remove Metrics::register, rename Metrics::attempt_to_register
      
      * add 'static bounds to real_overseer type params
      
      * pass authority_discovery and network_service to real_overseer
      
      It's not straightforwardly obvious that this is the best way to handle
      the case when there is no authority discovery service, but it seems
      to be the best option available at the moment.
      
      * select a proper database configuration for the availability store db
      
      * use subdirectory for av-store database path
      
      * apply Basti's patch which avoids needing to parameterize everything on Block
      
      * simplify path extraction
      
      * get all tests to compile
      
      * Fix Prometheus double-registry error
      
      for debugging purposes, added this to node/subsystem-util/src/lib.rs:472-476:
      
      ```rust
      Some(registry) => Self::try_register(registry).map_err(|err| {
      	eprintln!("PrometheusError calling {}::register: {:?}", std::any::type_name::<Self>(), err);
      	err
      }),
      ```
      
      That pointed out where the registration was failing, which led to
      this fix. The test still doesn't pass, but it now fails in a new
      and different way!
      
      * authorities must have authority discovery, but not necessarily overseer handlers
      
      * fix broken SpawnedSubsystem impls
      
      detailed logging determined that using the `Box::new` style of
      future generation, the `self.run` method was never being called,
      leading to dropped receivers / closed senders for those subsystems,
      causing the overseer to shut down immediately.
      
      This is not the final fix needed to get things working properly,
      but it's a good start.
      
      * use prometheus properly
      
      Prometheus lets us register simple counters, which aren't very
      interesting. It also allows us to register CounterVecs, which are.
      With a CounterVec, you can provide a set of labels, which can
      later be used to filter the counts.
      
      We were using them wrong, though. This pattern was repeated in a
      variety of places in the code:
      
      ```rust
      // panics with an cardinality mismatch
      let my_counter = register(CounterVec::new(opts, &["succeeded", "failed"])?, registry)?;
      my_counter.with_label_values(&["succeeded"]).inc()
      ```
      
      The problem is that the labels provided in the constructor are not
      the set of legal values which can be annotated, but a set of individual
      label names which can have individual, arbitrary values.
      
      This commit fixes that.
      
      * get av-store subsystem to actually run properly and not die on first signal
      
      * typo fix: incomming -> incoming
      
      * don't disable authority discovery in test nodes
      
      * Fix rococo-v1 missing session keys
      
      * Update node/core/av-store/Cargo.toml
      
      * try dummying out av-store on non-full-nodes
      
      * overseer and subsystems are required only for full nodes
      
      * Reduce the amount of warnings on browser target
      
      * Fix two more warnings
      
      * InclusionInherent should actually have an Inherent module on rococo
      
      * Ancestry: don't return genesis' parent hash
      
      * Update Cargo.lock
      
      * fix broken test
      
      * update test script: specify chainspec as script argument
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Update node/service/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * node/service/src/lib: Return error via ? operator
      
      * post-merge blues
      
      * add is_collator flag
      
      * prevent occasional av-store test panic
      
      * simplify fix; expand application
      
      * run authority_discovery in Role::Discover when collating
      
      * distinguish between proposer closed channel errors
      
      * add IsCollator enum, remove is_collator CLI flag
      
      * improve formatting
      
      * remove nop loop
      
      * Fix some stuff
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarMax Inden <[email protected]>
      798f781f
  12. Oct 27, 2020
  13. Oct 09, 2020
    • Rakan Alhneiti's avatar
      Update to work with async keystore – Companion PR for #7000 (#1740) · bc7d1322
      Rakan Alhneiti authored
      
      
      * Fix keystore types
      
      * Use SyncCryptoStorePtr
      
      * Borrow keystore
      
      * Fix unused imports
      
      * Fix polkadot service
      
      * Fix bitfield-distribution tests
      
      * Fix indentation
      
      * Fix backing tests
      
      * Fix tests
      
      * Fix provisioner tests
      
      * Removed SyncCryptoStorePtr
      
      * Fix services
      
      * Address PR feedback
      
      * Address PR feedback - 2
      
      * Update CryptoStorePtr imports to be from sp_keystore
      
      * Typo
      
      * Fix CryptoStore import
      
      * Document the reason behind using filesystem keystore
      
      * Remove VALIDATORS
      
      * Fix duplicate dependency
      
      * Mark sp-keystore as optional
      
      * Fix availability distribution
      
      * Fix call to sign_with
      
      * Fix keystore usage
      
      * Remove tokio and fix parachains Cargo config
      
      * Typos
      
      * Fix keystore dereferencing
      
      * Fix CryptoStore import
      
      * Fix provisioner
      
      * Fix node backing
      
      * Update services
      
      * Cleanup dependencies
      
      * Use sync_keystore
      
      * Fix node service
      
      * Fix node service - 2
      
      * Fix node service - 3
      
      * Rename CryptoStorePtr to SyncCryptoStorePtr
      
      * "Update Substrate"
      
      * Apply suggestions from code review
      
      * Update node/core/backing/Cargo.toml
      
      * Update primitives/src/v0.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      * Fix wasm build
      
      * Update Cargo.lock
      
      Co-authored-by: parity-processbot <>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      bc7d1322
  14. Oct 01, 2020
    • ordian's avatar
      implement remaining subsystem metrics (#1770) · 5bb296bf
      ordian authored
      * overseer metrics: messages relayed
      
      * provisioner metrics: cosmetic changes
      
      * candidate selection metrics: cosmetic changes
      
      * availability bitfields metrics
      
      * availability distribution metrics
      
      * PoV distribution metrics
      
      * statement-distribution: small simplification
      
      * statement-distribution: extract log target into a const
      
      * statement-distribution: metrics
      
      * address review nits
      5bb296bf
  15. Sep 29, 2020
  16. Sep 10, 2020
    • Fedor Sakharov's avatar
      Collator protocol subsystem (#1659) · b32dcc44
      Fedor Sakharov authored
      
      
      * WIP
      
      * The initial implementation of the collator side.
      
      * Improve comments
      
      * Multiple collation requests
      
      * Add more tests and comments to validator side
      
      * Add comments, remove dead code
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Fix build after suggested changes
      
      * Also connect to the next validator group
      
      * Remove a Future impl and move TimeoutExt to util
      
      * Minor nits
      
      * Fix build
      
      * Change FetchCollations back to FetchCollation
      
      * Try this
      
      * Final fixes
      
      * Fix build
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      b32dcc44
  17. Aug 31, 2020
  18. Aug 20, 2020
  19. Aug 18, 2020
    • ordian's avatar
      initial prometheus metrics (#1536) · 804958ab
      ordian authored
      * service-new: cosmetic changes
      
      * overseer: draft of prometheus metrics
      
      * metrics: update active_leaves metrics
      
      * metrics: extract into functions
      
      * metrics: resolve XXX
      
      * metrics: it's ugly, but it works
      
      * Bump Substrate
      
      * metrics: move a bunch of code around
      
      * Bumb substrate again
      
      * metrics: fix a warning
      
      * fix a warning in runtime
      
      * metrics: statements signed
      
      * metrics: statements impl RegisterMetrics
      
      * metrics: refactor Metrics trait
      
      * metrics: add Metrics assoc type to JobTrait
      
      * metrics: move Metrics trait to util
      
      * metrics: fix overseer
      
      * metrics: fix backing
      
      * metrics: fix candidate validation
      
      * metrics: derive Default
      
      * metrics: docs
      
      * metrics: add stubs for other subsystems
      
      * metrics: add more stubs and fix compilation
      
      * metrics: fix doctest
      
      * metrics: move to subsystem
      
      * metrics: fix candidate validation
      
      * metrics: bitfield signing
      
      * metrics: av store
      
      * metrics: chain API
      
      * metrics: runtime API
      
      * metrics: stub for avad
      
      * metrics: candidates seconded
      
      * metrics: ok I gave up
      
      * metrics: provisioner
      
      * metrics: remove a clone by requiring Metrics: Sync
      
      * metrics: YAGNI
      
      * metrics: remove another TODO
      
      * metrics: for later
      
      * metrics: add parachain_ prefix
      
      * metrics: s/signed_statement/signed_statements
      
      * utils: add a comment for job metrics
      
      * metrics: address review comments
      
      * metrics: oops
      
      * metrics: make sure to save files before commit 😅
      
      
      
      * use _total suffix for requests metrics
      
      Co-authored-by: default avatarMax Inden <[email protected]>
      
      * metrics: add tests for overseer
      
      * update Cargo.lock
      
      * overseer: add a test for CollationGeneration
      
      * collation-generation: impl metrics
      
      * collation-generation: use kebab-case for name
      
      * collation-generation: add a constructor
      
      Co-authored-by: default avatarGav Wood <[email protected]>
      Co-authored-by: default avatarAshley Ruglys <[email protected]>
      Co-authored-by: default avatarMax Inden <[email protected]>
      804958ab
  20. Aug 12, 2020
    • asynchronous rob's avatar
      Network bridge refactoring impl (#1537) · 1e9c0540
      asynchronous rob authored
      * update networking types
      
      * port over overseer-protocol message types
      
      * Add the collation protocol to network bridge
      
      * message sending
      
      * stub for ConnectToValidators
      
      * add some helper traits and methods to protocol types
      
      * add collator protocol message
      
      * leaves-updating
      
      * peer connection and disconnection
      
      * add utilities for dispatching multiple events
      
      * implement message handling
      
      * add an observedrole enum with equality and no sentry nodes
      
      * derive partial-eq on network bridge event
      
      * add PartialEq impls for network message types
      
      * add Into implementation for observedrole
      
      * port over existing network bridge tests
      
      * add some more tests
      
      * port bitfield distribution
      
      * port over bitfield distribution tests
      
      * add codec indices
      
      * port PoV distribution
      
      * port over PoV distribution tests
      
      * port over statement distribution
      
      * port over statement distribution tests
      
      * update overseer and service-new
      
      * address review comments
      
      * port availability distribution
      
      * port over availability distribution tests
      1e9c0540
  21. Aug 10, 2020
  22. Aug 07, 2020
  23. Jul 28, 2020
  24. Jul 27, 2020
    • Fedor Sakharov's avatar
      Availability store subsystem (#1404) · b838b386
      Fedor Sakharov authored
      * Initial commit
      
      * WIP
      
      * Make atomic transactions
      
      * Remove pruning code
      
      * Fix build and add a Nop to bridge
      
      * Fixes from review
      
      * Move config struct around for clarity
      
      * Rename constructor and warn on missing docs
      
      * Fix a test and rename a message
      
      * Fix some more reviews
      
      * Obviously failed to rebase cleanly
      b838b386
    • Peter Goodspeed-Niklaus's avatar
      add ActiveLeavesUpdate, remove StartWork, StopWork (#1458) · 12a02556
      Peter Goodspeed-Niklaus authored
      * add ActiveLeavesUpdate, remove StartWork, StopWork
      
      * replace StartWork, StopWork in subsystem crate tests
      
      * mechanically update OverseerSignal in other modules
      
      * convert overseer to take advantage of new multi-hash update abilities
      
      Note: this does not yet convert the tests; some of the tests now freeze:
      
      test tests::overseer_start_stop_works ... test tests::overseer_start_stop_works has been running for over 60 seconds
      test tests::overseer_finalize_works ... test tests::overseer_finalize_works has been running for over 60 seconds
      
      * fix broken overseer tests
      
      * manually impl PartialEq for ActiveLeavesUpdate, rm trait Equivalent
      
      This cleans up the code a bit and makes it easier in the future to
      do the right thing when comparing ALUs.
      
      * use target in all network bridge logging
      
      * reduce spamming of  and
      12a02556
  25. Jul 26, 2020
  26. Jul 23, 2020
    • Bernhard Schuster's avatar
      implement bitfield distribution subsystem (#1368) · 08fcbda4
      Bernhard Schuster authored
      
      
      * feat bitfield distribution
      
      * feat bitfield distribution part 2
      
      * pair programming with rustc & cargo
      
      * lets go
      
      * move bitfield-distribution to the node/network folder
      
      * shape shifting
      
      * lunchtime
      
      * ignore the two fn recursion for now
      
      * step by step
      
      * triplesteps
      
      * bandaid commit
      
      * unordered futures magic
      
      * chore
      
      * reword markdown
      
      * clarify
      
      * lacks abortable processing impl details
      
      * slimify
      
      * fix: warnings and avoid ctx.clone() improve comments
      
      * review comments
      
      * fix details
      
      * make sure outgoing messages are tracked
      
      * fix name
      
      * fix subsystem
      
      * partial test impl
      
      * relax context bounds
      
      * test
      
      * X
      
      * X
      
      * initial test
      
      * fix relay_message not tracked when origin is self
      
      * fix/guide: grammar
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * work around missing Eq+PartialEq
      
      * fix: add missing message to provisioner
      
      * unify per_job to job_data
      
      * fix/review: part one
      
      * fix/review: more grumbles
      
      * fix/review: track incoming messages per peer
      
      * fix/review: extract fn, avoid nested matches
      
      * fix/review: more tests, simplify test
      
      * fix/review: extend tests to cover more cases
      
      * chore/rename: Tracker -> ProtocolState
      
      * chore check and comment rewording
      
      * feat test: invalid peer message
      
      * remove ignored test cases and unused macros
      
      * fix master merge fallout + warnings
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      08fcbda4