1. Jan 05, 2021
  2. Jan 04, 2021
    • asynchronous rob's avatar
      Improve Network Spans (#2169) · a891884e
      asynchronous rob authored
      * utility functions for erasure-coding threshold
      
      * add candidate-hash tag to candidate jaeger spans
      
      * debug implementation for jaeger span
      
      * add a span to each live candidate in availability dist.
      
      * availability span covers only our piece
      
      * fix tests
      
      * keep span alive slightly longer
      
      * remove spammy bitfield-gossip-received log
      
      * Revert "remove spammy bitfield-gossip-received log"
      
      This reverts commit 831a2db5
      
      .
      
      * add claimed validator to bitfield-gossip span
      
      * add peer-id to handle-incoming span
      
      * add peer-id to availability distribution span
      
      * Update node/network/availability-distribution/src/lib.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Update erasure-coding/src/lib.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Update node/subsystem/src/jaeger.rs
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      a891884e
  3. Dec 18, 2020
    • asynchronous rob's avatar
      Add candidate info to OccupiedCore (#2134) · af0aff96
      asynchronous rob authored
      * guide: add candidate information to OccupiedCore
      
      * add descriptor and hash to occupied core type
      
      * guide: add candidate hash to inclusion
      
      * runtime: return candidate info in core state
      
      * bitfield signing: stop querying runtime as much
      
      * minimize going to runtime in availability distribution
      
      * fix availability distribution tests
      
      * guide: remove para ID from Occupied core
      
      * get all crates compiling
      af0aff96
  4. Dec 17, 2020
    • asynchronous rob's avatar
      c58edafe
    • Bastian Köcher's avatar
      Fix bug and further optimizations in availability distribution (#2104) · affa668a
      Bastian Köcher authored
      
      
      * Fix bug and further optimizations in availability distribution
      
      - There was a bug that resulted in only getting one candidate per block
      as the candidates were put into the hashmap with the relay block hash as
      key. The solution for this is to use the candidate hash and the relay
      block hash as key.
      - We stored received/sent messages with the candidate hash and chunk
      index as key. The candidate hash wasn't required in this case, as the
      messages are already stored per candidate.
      
      * Update node/core/bitfield-signing/src/lib.rs
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      
      * Remove the reverse map
      
      * major refactor of receipts & query_live
      
      * finish refactoring
      
      remove ancestory mapping,
      
      improve relay-parent cleanup & receipts-cache cleanup,
      add descriptor to `PerCandidate`
      
      * rename and rewrite query_pending_availability
      
      * add a bunch of consistency tests
      
      * Add some last changes
      
      * xy
      
      * fz
      
      * Make it compile again
      
      * Fix one test
      
      * Fix logging
      
      * Remove some buggy code
      
      * Make tests work again
      
      * Move stuff around
      
      * Remove dbg
      
      * Remove state from test_harness
      
      * More refactor and new test
      
      * New test and fixes
      
      * Move metric
      
      * Remove "duplicated code"
      
      * Fix tests
      
      * New test
      
      * Change break to continue
      
      * Update node/core/av-store/src/lib.rs
      
      * Update node/core/av-store/src/lib.rs
      
      * Update node/core/bitfield-signing/src/lib.rs
      
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      
      * update guide to match live_candidates changes
      
      * add comment
      
      * fix bitfield signing
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      affa668a
    • 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
  5. Dec 11, 2020
  6. Nov 27, 2020
    • asynchronous rob's avatar
      Move erasure root out of candidate commitments and into descriptor (#2010) · fff46359
      asynchronous rob authored
      
      
      * guide: move erasure-root to candidate descriptor
      
      * primitives: move erasure root to descriptor
      
      * guide: unify candidate commitments and validation outputs
      
      * primitives: unify validation outputs and candidate commitments
      
      * parachains-runtime: fix fallout
      
      * runtimes: fix fallout
      
      * collation generation: fix fallout
      
      * fix stray reference in primitives
      
      * fix fallout in node-primitives
      
      * fix remaining fallout in collation generation
      
      * fix fallout in candidate validation
      
      * fix fallout in runtime API subsystem
      
      * fix fallout in subsystem messages
      
      * fix fallout in candidate backing
      
      * fix fallout in availability distribution
      
      * don't clone
      
      * clone
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      fff46359
  7. Nov 26, 2020
  8. Nov 23, 2020
  9. Nov 20, 2020
    • ordian's avatar
      cleanup validator discovery (#1992) · f4897f74
      ordian authored
      * use snake_case for log targets
      
      * remove unused continue
      
      * validator_discovery: when disconnecting, use all addresses
      
      * validator_discovery: simplify request revokation
      
      * fix a typo
      f4897f74
    • 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
  10. 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
  11. Nov 05, 2020
  12. 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
  13. Oct 27, 2020
  14. Oct 24, 2020
    • Fedor Sakharov's avatar
      Availability store pruning (#1820) · 8f882afd
      Fedor Sakharov authored
      
      
      * Initial commit
      
      * Move tests to separate module
      
      * Move timestamps to the newtype
      
      * Change idx name
      
      * Use Duration for consts and update chunk records
      
      * Ordering::Equal
      
      * Update node/core/av-store/src/lib.rs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * put_ methods do the array sorting
      
      * Fix get_block_number
      
      * Change StoreChunk message type and relay parent method
      
      * Add chunk tests
      
      * Fix block number computation for StoreChunk
      
      * Duration instead of u64 everywhere
      
      * Add a clarifying comment
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      8f882afd
  15. 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
  16. 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
  17. Sep 29, 2020
  18. 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
  19. 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
  20. Aug 10, 2020