Skip to content
  1. Feb 18, 2021
  2. Feb 17, 2021
    • asynchronous rob's avatar
      A fast-path for requesting `AvailableData` from backing validators (#2453) · b7aac513
      asynchronous rob authored
      
      
      * guide changes for a fast-path requesting from backing validators
      
      * add backing group to availability recovery message
      
      * add new phase to interaction
      
      * typos
      
      * add full data messages
      
      * handle new network messages
      
      * dispatch full data requests
      
      * cleanup
      
      * check chunk index
      
      * test for invalid recovery
      
      * tests
      
      * Typos.
      
      * fix some grumbles
      
      * be more explicit about error handling and control flow
      
      * fast-path param
      
      * use with_chunks_only in Service
      
      Co-authored-by: default avatarRobert Klotzner <[email protected]>
      b7aac513
    • Cecile Tonglet's avatar
      Polkadot companion for #8043 (#2382) · 0771537a
      Cecile Tonglet authored
      * WIP
      
      * WIP
      
      * WIP
      
      * Revert branch change
      
      * CLEANUP
      
      * "Update Substrate"
      
      * Fix build
      
      * Revert "Fix build"
      
      This reverts commit 2dcc3f2a14d28febb84c2c35d682243bc03523a8.
      
      * cargo update -p sp-io
      
      Co-authored-by: parity-processbot <>
      0771537a
  3. Feb 16, 2021
    • asynchronous rob's avatar
      Integrate Approval Voting into Overseer / Service / GRANDPA (#2412) · 4f21cc7e
      asynchronous rob authored
      * integrate approval voting into overseer
      
      * expose public API and make keystore arc
      
      * integrate overseer in service
      
      * guide: `ApprovedAncestor` returns block number
      
      * return block number along with hash from ApprovedAncestor
      
      * introduce a voting rule for reporting on approval checking
      
      * integrate the delay voting rule
      
      * Rococo configuration
      
      * fix compilation and add slack
      
      * fix web-wasm build
      
      * tweak parameterization
      
      * migrate voting rules to asycn
      
      * remove hack comment
      4f21cc7e
  4. Feb 15, 2021
  5. Feb 11, 2021
    • asynchronous rob's avatar
      Implement Approval Voting Subsystem (#2112) · e48c6875
      asynchronous rob authored
      
      
      * skeleton
      
      * skeleton aux-schema module
      
      * start approval types
      
      * start aux schema with aux store
      
      * doc
      
      * finish basic types
      
      * start approval types
      
      * doc
      
      * finish basic types
      
      * write out schema types
      
      * add debug and codec impls to approval types
      
      * add debug and codec impls to approval types
      
      also add some key computation
      
      * add debug and codec impls to approval types
      
      * getters for block and candidate entries
      
      * grumbles
      
      * remove unused AssignmentId
      
      * load_decode utility
      
      * implement DB clearing
      
      * function for adding new block entry to aux store
      
      * start `canonicalize` implementation
      
      * more skeleton
      
      * finish implementing canonicalize
      
      * tag TODO
      
      * implement a test AuxStore
      
      * add allow(unused)
      
      * basic loading and deleting test
      
      * block_entry test function
      
      * add a test for `add_block_entry`
      
      * ensure range is exclusive at end
      
      * test clear()
      
      * test that add_block sets children
      
      * add a test for canonicalize
      
      * extract Pre-digest from header
      
      * utilities for extracting RelayVRFStory from the header-chain
      
      * add approval voting message types
      
      * approval distribution message type
      
      * subsystem skeleton
      
      * state struct
      
      * add futures-timer
      
      * prepare service for babe slot duration
      
      * more skeleton
      
      * better integrate AuxStore
      
      * RelayVRF -> RelayVRFStory
      
      * canonicalize
      
      * implement some tick functionality
      
      * guide: tweaks
      
      * check_approval
      
      * more tweaks and helpers
      
      * guide: add core index to candidate event
      
      * primitives: add core index to candidate event
      
      * runtime: add core index to candidate events
      
      * head handling (session window)
      
      * implement `determine_new_blocks`
      
      * add TODO
      
      * change error type on functions
      
      * compute RelayVRFModulo assignments
      
      * compute RelayVRFDelay assignments
      
      * fix delay tranche calc
      
      * assignment checking
      
      * pluralize
      
      * some dummy code for fetching assignments
      
      * guide: add babe epoch runtime API
      
      * implement a current_epoch() runtime API
      
      * compute assignments
      
      * candidate events get backing group
      
      * import blocks and assignments into DB
      
      * push block approval meta
      
      * add message types, no overseer integration yet
      
      * notify approval distribution of new blocks
      
      * refactor import into separate functions
      
      * impl tranches_to_approve
      
      * guide: improve function signatures
      
      * guide: remove Tick from ApprovalEntry
      
      * trigger and broadcast assignment
      
      * most of approval launching
      
      * remove byteorder crate
      
      * load blocks back to finality, except on startup
      
      * check unchecked assignments
      
      * add claimed core to approval voting message
      
      * fix checks
      
      * assign only to backing group
      
      * remove import_checked_assignment from guide
      
      * newline
      
      * import assignments
      
      * abstract out a bit
      
      * check and import approvals
      
      * check full approvals from assignment import too
      
      * comment
      
      * create a Transaction utility
      
      * must_use
      
      * use transaction in `check_full_approvals`
      
      * wire up wakeups
      
      * add Ord to CandidateHash
      
      * wakeup refactoring
      
      * return candidate info from add_block_entry
      
      * schedule wakeups
      
      * background task: do candidate validation
      
      * forward candidate validation requests
      
      * issue approval votes when requested
      
      * clean up a couple TODOs
      
      * fix up session caching
      
      * clean up last unimplemented!() items
      
      * fix remaining warnings
      
      * remove TODO
      
      * implement handle_approved_ancestor
      
      * update Cargo.lock
      
      * fix runtime API tests
      
      * guide: cleanup assignment checking
      
      * use claimed candidate index instead of core
      
      * extract time to a trait
      
      * tests module
      
      * write a mock clock for testing
      
      * allow swapping out the clock
      
      * make abstract over assignment criteria
      
      * add some skeleton tests and simplify params
      
      * fix backing group check
      
      * do backing group check inside check_assignment_cert
      
      * write some empty test functions to implement
      
      * add a test for non-backing
      
      * test that produced checks pass
      
      * some empty test ideas
      
      * runtime/inclusion: remove outdated TODO
      
      * fix compilation
      
      * av-store: fix tests
      
      * dummy cert
      
      * criteria tests
      
      * move `TestStore` to main tests file
      
      * fix unused warning
      
      * test harness beginnings
      
      * resolve slots renaming fallout
      
      * more compilation fixes
      
      * wip: extract pure data into a separate module
      
      * wip: extract pure data into a separate module
      
      * move types completely to v1
      
      * add persisted_entries
      
      * add conversion trait impls
      
      * clean up some warnings
      
      * extract import logic to own module
      
      * schedule wakeups
      
      * experiment with Actions
      
      * uncomment approval-checking
      
      * separate module for approval checking utilities
      
      * port more code to use actions
      
      * get approval pipeline using actions
      
      * all logic is uncommented
      
      * main loop processes actions
      
      * all loop logic uncommented
      
      * separate function for handling actions
      
      * remove last unimplemented item
      
      * clean up warnings
      
      * State gives read-only access to underlying DB
      
      * tests for approval checking
      
      * tests for approval criteria
      
      * skeleton test module for import
      
      * list of import tests to do
      
      * some test glue code
      
      * test reject bad assignment
      
      * test slot too far in future
      
      * test reject assignment with unknown candidate
      
      * remove loads_blocks tests
      
      * determine_new_blocks back to finalized & harness
      
      * more coverage for determining new blocks
      
      * make `imported_block_info` have less reliance on State
      
      * candidate_info tests
      
      * tests for session caching
      
      * remove println
      
      * extricate DB and main TestStores
      
      * rewrite approval checking logic to counteract early delays
      
      * move state out of function
      
      * update approval-checking tests
      
      * tweak wakeups & scheduling logic
      
      * rename check_full_approvals
      
      * test that assignment import updates candidate
      
      * some approval import tests
      
      * some tests for check_and_apply_approval
      
      * add 'full' qualifier to avoid confusion
      
      * extract should-trigger logic to separate function
      
      * some tests for all triggering
      
      * tests for when we trigger assignments
      
      * test wakeups
      
      * add block utilities for testing
      
      * some more tests for approval updates
      
      * approved_ancestor tests
      
      * new action type for launch approval
      
      * process-wakeup tests
      
      * clean up some warnings
      
      * fix in_future test
      
      * approval checking tests
      
      * tighten up too-far-in-future
      
      * special-case genesis when caching sessions
      
      * fix bitfield len
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      e48c6875
  6. Feb 09, 2021
  7. Feb 04, 2021
  8. Feb 03, 2021
    • Robert Klotzner's avatar
      Generic request/response infrastructure for Polkadot (#2352) · 0cb1ccd1
      Robert Klotzner authored
      * Move NetworkBridgeEvent to subsystem::messages.
      
      It is not protocol related at all, it is in fact only part of the
      subsystem communication as it gets wrapped into messages of each
      subsystem.
      
      * Request/response infrastructure is taking shape.
      
      WIP: Does not compile.
      
      * Multiplexer variant not supported by Rusts type system.
      
      * request_response::request type checks.
      
      * Cleanup.
      
      * Minor fixes for request_response.
      
      * Implement request sending + move multiplexer.
      
      Request multiplexer is moved to bridge, as there the implementation is
      more straight forward as we can specialize on `AllMessages` for the
      multiplexing target.
      
      Sending of requests is mostly complete, apart from a few `From`
      instances. Receiving is also almost done, initializtion needs to be
      fixed and the multiplexer needs to be invoked.
      
      * Remove obsolete multiplexer.
      
      * Initialize bridge with multiplexer.
      
      * Finish generic request sending/receiving.
      
      Subsystems are now able to receive and send requests and responses via
      the overseer.
      
      * Doc update.
      
      * Fixes.
      
      * Link issue for not yet implemented code.
      
      * Fixes suggested by @ordian
      
       - thanks!
      
      - start encoding at 0
      - don't crash on zero protocols
      - don't panic on not yet implemented request handling
      
      * Update node/network/protocol/src/request_response/v1.rs
      
      Use index 0 instead of 1.
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Update node/network/protocol/src/request_response.rs
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      * Fix existing tests.
      
      * Better avoidance of division by zoro errors.
      
      * Doc fixes.
      
      * send_request -> start_request.
      
      * Fix missing renamings.
      
      * Update substrate.
      
      * Pass TryConnect instead of true.
      
      * Actually import `IfDisconnected`.
      
      * Fix wrong import.
      
      * Update node/network/bridge/src/lib.rs
      
      typo
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      * Update node/network/bridge/src/multiplexer.rs
      
      Remove redundant import.
      
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      
      * Stop doing tracing from within `From` instance.
      
      Thanks for the catch @tomaka
      
      !
      
      * Get rid of redundant import.
      
      * Formatting cleanup.
      
      * Fix tests.
      
      * Add link to issue.
      
      * Clarify comments some more.
      
      * Fix tests.
      
      * Formatting fix.
      
      * tabs
      
      * Fix link
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Use map_err.
      
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      
      * Improvements inspired by suggestions by @drahnr.
      
      - Channel size is now determined by function.
      - Explicitely scope NetworkService::start_request.
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avatarPierre Krieger <[email protected]>
      Co-authored-by: default avatarBernhard Schuster <[email protected]>
      0cb1ccd1
  9. Jan 29, 2021
  10. Jan 26, 2021
  11. Jan 25, 2021
    • ordian's avatar
      impl approval distribution (#2160) · 3f1e1a6f
      ordian authored
      * initial impl approval distribution
      
      * initial tests and fixes
      
      * batching seems difficult: different peers have different needs
      
      * bridge: fix test after merge
      
      * some guide updates
      
      * only send assignments to peers who know about the block
      
      * fix a test, add approvals test
      
      * simplify
      
      * do not send assignment to peers for finalized blocks
      
      * guide: protocol input and output
      
      * one more test
      
      * more comments, logs, initial metrics
      
      * fix a typo
      
      * one more thing: early return when reimporting a thing locally
      3f1e1a6f
  12. Jan 21, 2021
  13. Jan 20, 2021
  14. Jan 18, 2021
  15. Jan 15, 2021
    • Fedor Sakharov's avatar
      Availability recovery subsystem (#2122) · 90a68626
      Fedor Sakharov authored
      * Adds message types
      
      * Add code skeleton
      
      * Adds subsystem code.
      
      * Adds a first test
      
      * Adds interaction result to availability_lru
      
      * Use LruCache instead of a HashMap
      
      * Whitespaces to tabs
      
      * Do not ignore errors
      
      * Change error type
      
      * Add a timeout to chunk requests
      
      * Add custom errors and log them
      
      * Adds replace_availability_recovery method
      
      * recovery_threshold computed by erasure crate
      
      * change core to std
      
      * adds docs to error type
      
      * Adds a test for invalid reconstruction
      
      * refactors interaction run into multiple methods
      
      * Cleanup AwaitedChunks
      
      * Even more fixes
      
      * Test that recovery with wrong root is an error
      
      * Break to launch another requests
      
      * Styling fixes
      
      * Add SessionIndex to API
      
      * Proper relay parents for MakeRequest
      
      * Remove validator_discovery and use message
      
      * Remove a stream on exhaustion
      
      * On cleanup free the request streams
      
      * Fix merge and refactor
      90a68626
  16. Jan 14, 2021
    • Robert Klotzner's avatar
      Some refactoring in network-bridge in the course of dealing with #2177 (#2263) · 32d4670b
      Robert Klotzner authored
      * More doc fixes.
      
      * Minor refactorings in the process of #2177
      
      By having everything peer set related depend directly on the enum the
      code becomes more clear and it is also straight forward to add more
      peersets/protocols as the compiler will complain if you forget to
      implement parts of it.
      
      * Add peer set infos on startup properly
      
      For feature real_overseer.
      
      + Fixes from review. Thanks @coriolinus and @ordian
      
      !
      
      * More structure in network-bridge
      
      Some changes, which would have helped me in groking the code faster.
      
      Entry points/public types more to the top. Factored out implementation
      in their own files, to clear up the top-level view.
      
      * Get rid of local ProtocolName type definition.
      
      Does not add much at this level.
      
      * Fix tests + import cleanup.
      
      * Make spaces tabs.
      
      * Clarify what correct parameters to send_message are
      
      * Be more less vague in docs of send_message.
      
      * Apply suggestions from code review
      
      Extend copyright on new files to 2021 as well.
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      32d4670b
  17. Jan 07, 2021
    • Pierre Krieger's avatar
      Companion PR for refactoring priority groups (#2095) · 5ce24c49
      Pierre Krieger authored
      * Companion PR for refactoring priority groups
      
      * Fix non reserved node
      
      * Try fix tests
      
      * Missing import
      
      * Fix warning
      
      * Change protocols order
      
      * Fix test
      
      * Renames
      
      * Update syn dependency to make it compile again after merging master
      
      * "Update Substrate"
      
      Co-authored-by: parity-processbot <>
      5ce24c49
  18. Dec 11, 2020
  19. Dec 10, 2020
    • Bernhard Schuster's avatar
      addition error definitions (#2107) · 35c71bf3
      Bernhard Schuster authored
      * remove low information density error doc comments
      
      * another round of error dancing
      
      * fix compilation
      
      * remove stale `None` argument
      
      * adjust test, minor slip in command
      
      * only add AvailabilityError for full node features
      
      * another None where none shuld be
      35c71bf3
  20. Dec 02, 2020
  21. Dec 01, 2020
  22. Nov 30, 2020
    • Bastian Köcher's avatar
      Process runtime api requests in the background (#2035) · 9ce18622
      Bastian Köcher authored
      This pr changes how the runtime api subsystem processes runtime api
      requests. Instead of answering all of them in the subsystem task and
      thus, making all requests sequential, we now answer them in a background
      task. This enables us to serve multiple requests at once.
      9ce18622
  23. Nov 23, 2020
    • Max Inden's avatar
      *: Update authority discovery and remove WorkerConfig (#1953) · 63bf63e4
      Max Inden authored
      * *: Update authority discovery and remove WorkerConfig
      
      With https://github.com/paritytech/substrate/pull/7545 the authority
      discovery module queries and publishes addresses on an exponentially
      increasing interval. Doing so should make custom configurations
      obsolete, as operations are retried in a timely fashion in the first
      minutes.
      
      * */Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing
      
      * Revert "*/Cargo.{lock,toml}: Point to mxinden substrate auth-disc-timing"
      
      This reverts commit 0785943a1e377454f088814ef20f4432de09da7a.
      
      * "Update Substrate"
      
      * Revert ""Update Substrate""
      
      This reverts commit 377b221e1853b2c383f0c416d686535b545796cb.
      
      * Cargo.lock: Manual Substrate update
      
      * node/test/service/src/lib: Remove unused import
      
      * parachain/test-parachains/adder: Remove unused import
      
      Co-authored-by: parity-processbot <>
      63bf63e4
    • André Silva's avatar
      companion for substrate#7546 (#1954) · ec292823
      André Silva authored
      * companion for substrate#7546
      
      * update to substrate master
      ec292823
  24. Nov 20, 2020
    • Peter Goodspeed-Niklaus's avatar
      Add tracing support to node (#1940) · e4998997
      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
      e4998997
  25. Nov 11, 2020
    • Jon Häggblad's avatar
      Companion PR for Substrate #7186 (#1816) · 4b082997
      Jon Häggblad authored
      * babe: backoff authoring blocks when finality lags
      
      * service: use default constructor for backoff authoring strat
      
      * slots: update to use renamed backoff strategy name
      
      * "Update Substrate"
      
      Co-authored-by: parity-processbot <>
      4b082997
  26. Nov 09, 2020
  27. Nov 02, 2020
    • Bastian Köcher's avatar
      Adder collator improvements (#1896) · cfa078ae
      Bastian Köcher authored
      * Fixes bug that collator wasn't sending `Declare` message
      
      * Set authority discovery config
      
      * Fixes bug that collator wasn't sending `Declare` message
      
      * Adds real overseer feature and makes the wasm_validation fail with a
      proper error
      
      * Adds README
      
      * Remove debug stuff
      
      * Add feature
      
      * Make adder collator use the correct parent when building a new block
      cfa078ae
  28. Oct 31, 2020
    • asynchronous rob's avatar
    • Bastian Köcher's avatar
      Adds test parachain adder collator (#1864) · f82de7b9
      Bastian Köcher 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
      
      * Adds test parachain adder collator
      
      * Add sudo to Rococo, change session length to 30 seconds and some renaming
      
      * Update to the latest changes on master
      
      * Some fixes
      
      * Fix compilation
      
      * Update parachain/test-parachains/adder/collator/src/lib.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * Review comments
      
      * Downgrade transaction version
      
      * Fixes
      
      * MOARE
      
      * Register notification protocols
      
      * utils: remove unused error
      
      * av-store: more resilient to some errors
      
      * address review nits
      
      * address more review nits
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      Co-authored-by: default avatarAndronik Ordian <[email protected]>
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      Co-authored-by: default avatarMax Inden <[email protected]>
      Co-authored-by: default avatarSergey Shulepov <[email protected]>
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      f82de7b9
    • Fedor Sakharov's avatar
      A real overseer feature (#1892) · 16f8da1d
      Fedor Sakharov authored
      
      
      * A real overseer feature
      
      * Fix build without feature
      
      * Update node/service/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      
      Co-authored-by: default avatarRobert Habermeier <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      16f8da1d
  29. Oct 29, 2020
  30. Oct 28, 2020
    • Fedor Sakharov's avatar
      Collator protocol should choose side (#1872) · 19286563
      Fedor Sakharov authored
      
      
      * Collator protocol should choose side
      
      * Update node/service/src/lib.rs
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      19286563
    • Peter Goodspeed-Niklaus's avatar
    • Peter Goodspeed-Niklaus's avatar
      start working on building the real overseer (#1795) · 1a25c412
      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]>
      1a25c412
  31. Oct 27, 2020