1. Dec 25, 2020
  2. Dec 07, 2020
  3. Nov 24, 2020
  4. Nov 20, 2020
    • 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
  5. Nov 19, 2020
  6. Nov 18, 2020
  7. 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
  8. Oct 28, 2020
    • 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
  9. Oct 27, 2020
  10. 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
  11. Sep 29, 2020
  12. Aug 29, 2020
  13. Aug 07, 2020
  14. 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
  15. Jul 21, 2020
    • Peter Goodspeed-Niklaus's avatar
      Add test suite and minor refinements to the utility subsystem (#1403) · cc2d7afd
      Peter Goodspeed-Niklaus authored
      * get conclude signal working properly; don't allocate a vector
      
      * wip: add test suite / example / explanation for using utility subsystem
      
      Unfortunately, the test fails right now for reasons which seem
      very odd. Just have to keep poking at it.
      
      * explicitly import everything
      
      * fix subsystem-util test
      
      The root problem here was two-fold:
      
      - there was a circular dependency from subsystem -> test-helpers/subsystem ->
        subsystem
      - cfg(test) doesn't propagate between crates
      
      The solution: move the subsystem test helpers into a sub-module
      within subsystem. Publicly export them from the previous location
      so no other code breaks.
      
      Doing this has an additional benefit: it ensures that no production
      code can ever accidentally use the subsystem helpers, as they are compile-
      gated on cfg(test).
      
      * fully commit to moving test helpers into a subsystem module
      
      * add some more tests
      
      * get rid of log tests in favor of real error forwarding
      
      It's not obvious whether we'll ever really want to chase down
      these errors outside a testing context, but having the capability
      won't hurt.
      
      * fix issue which caused test to hang on osx
      
      * only require that job errors are PartialEq when testing
      
      also fix polkadot-node-core-backing tests
      
      * get rid of any notion of partialeq
      
      * rethink testing
      
      Combine tests of starting and stopping job: leaving a test executor
      with a job running was pretty clearly the cause of the sometimes-hang.
      
      Also, add a timeout so tests _can't_ hang anymore; they just fail
      after a while.
      
      * rename fwd_errors -> forward_errors
      
      * warn on error propagation failure
      
      * fix unused import leftover from merge
      
      * derive eq for subsystemerror
      cc2d7afd
  16. Jul 17, 2020
  17. Jul 08, 2020
    • asynchronous rob's avatar
      Implement PoV Distribution Subsystem (#1344) · b651e4af
      asynchronous rob authored
      * introduce candidatedescriptor type
      
      * add PoVDistribution message type
      
      * loosen bound on PoV Distribution to account for equivocations
      
      * re-export some types from the messages module
      
      * begin PoV Distribution subsystem
      
      * remove redundant index from PoV distribution
      
      * define state machine for pov distribution
      
      * handle overseer signals
      
      * set up control flow
      
      * remove `ValidatorStatement` section
      
      * implement PoV fetching
      
      * implement distribution logic
      
      * add missing `
      
      * implement some network bridge event handlers
      
      * stub for message processing, handle our view change
      
      * control flow for handling messages
      
      * handle `awaiting` message
      
      * handle any incoming PoVs and redistribute
      
      * actually provide a subsystem implementation
      
      * remove set-builder notation
      
      * begin testing PoV distribution
      
      * test that we send awaiting messages only to peers with same view
      
      * ensure we distribute awaited PoVs to peers on view changes
      
      * test that peers can complete fetch and are rewarded
      
      * test some reporting logic
      
      * ensure peer is reported for flooding
      
      * test punishing peers diverging from awaited protocol
      
      * test that we eagerly complete peers' awaited PoVs based on what we receive
      
      * test that we prune the awaited set after receiving
      
      * expand pov-distribution in guide to match a change I made
      
      * remove unneeded import
      b651e4af
  18. Jun 30, 2020
    • asynchronous rob's avatar
      Implement Network Bridge (#1280) · eaae8653
      asynchronous rob authored
      
      
      * network bridge skeleton
      
      * move some primitives around and add debug impls
      
      * protocol registration glue & abstract network interface
      
      * add send_msgs to subsystemctx
      
      * select logic
      
      * transform different events into actions and handle
      
      * implement remaining network bridge state machine
      
      * start test skeleton
      
      * make network methods asynchronous
      
      * extract subsystem out to subsystem crate
      
      * port over overseer to subsystem context trait
      
      * fix minimal example
      
      * fix overseer doc test
      
      * update network-bridge crate
      
      * write a subsystem test-helpers crate
      
      * write a network test helper for network-bridge
      
      * set up (broken) view test
      
      * Revamp network to be more async-friendly and not require Sync
      
      * fix spacing
      
      * fix test compilation
      
      * insert side-channel for actions
      
      * Add some more message types to AllMessages
      
      * introduce a test harness
      
      * add some tests
      
      * ensure service compiles and passes tests
      
      * fix typo
      
      * fix service-new compilation
      
      * Subsystem test helpers send messages synchronously
      
      * remove smelly action inspector
      
      * remove superfluous let binding
      
      * fix warnings
      
      * Update node/network/bridge/src/lib.rs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * fix compilation
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      eaae8653