1. Dec 10, 2020
    • Peter Goodspeed-Niklaus's avatar
      the `inclusion` inherent call is Operational, not Mandatory · e58858d1
      Peter Goodspeed-Niklaus authored
      This resolves a lot of the trickiness about this issue, because
      we no longer need to override or supplant any existing proposer
      logic; the existing logic should exhibit these behaviors:
      
      - the `inclusion` inherent is prioritized over standard transactions
      - but if it's too heavy, i.e. in case of runtime upgrade, it'll be
        dropped in favor of that.
      
      It is my belief that allowing the proposer to just not include
      this data won't have any adverse effects: it's equivalent to replacing
      them with empty versions of themselves, which the `ProvideInherent`
      impl already does.
      e58858d1
  2. Dec 07, 2020
  3. Dec 02, 2020
  4. Dec 01, 2020
  5. Nov 30, 2020
    • asynchronous rob's avatar
      small improvements for parachains consensus (#2040) · 5ce2b380
      asynchronous rob authored
      
      
      * introduce a waiting period before selecting candidates and bitfields
      
      * add network_bridge=debug tracing for rep
      
      * change to 2.5s timeout in proposer
      
      * pass timeout to proposer
      
      * move timeout back to provisioner
      
      * grumbles
      
      * Update node/core/provisioner/src/lib.rs
      
      * Fix nitpicks
      
      * Fix bug
      
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      Co-authored-by: default avatarBastian Köcher <[email protected]>
      5ce2b380
    • asynchronous rob's avatar
      Move candidate validation to the background (#2028) · 1e0c9910
      asynchronous rob authored
      * refactor some functions to not rely on `self`
      
      * factor out common elements of seconding and attesting
      
      * Add Spawn to backing FromJob
      
      * do candidate validation in background
      
      * tests
      
      * address grumbles
      1e0c9910
    • Bastian Köcher's avatar
      Simplify subsystem jobs (#2037) · 1fbf09ac
      Bastian Köcher authored
      * Simplify subsystem jobs
      
      This pr simplifies the subsystem jobs interface. Instead of requiring an
      extra message that is used to signal that a job should be ended, a job
      now ends when the receiver returns `None`. Besides that it changes the
      interface to enforce that messages to a job provide a relay parent.
      
      * Drop ToJobTrait
      
      * Remove FromJob
      
      We always convert this message to FromJobCommand anyway.
      1fbf09ac
    • Bastian Köcher's avatar
      Process runtime api requests in the background (#2035) · d00c05ba
      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.
      d00c05ba
  6. Nov 28, 2020
  7. Nov 27, 2020
  8. Nov 26, 2020
    • ordian's avatar
      past-session validator discovery APIs (#2009) · 734eda87
      ordian authored
      
      
      * guide: fix formatting for SessionInfo module
      
      * primitives: SessionInfo type
      
      * punt on approval keys
      
      * ah, revert the type alias
      
      * session info runtime module skeleton
      
      * update the guide
      
      * runtime/configuration: sync with the guide
      
      * runtime/configuration: setters for newly added fields
      
      * runtime/configuration: set codec indexes
      
      * runtime/configuration: update test
      
      * primitives: fix SessionInfo definition
      
      * runtime/session_info: initial impl
      
      * runtime/session_info: use initializer for session handling (wip)
      
      * runtime/session_info: mock authority discovery trait
      
      * guide: update the initializer's order
      
      * runtime/session_info: tests skeleton
      
      * runtime/session_info: store n_delay_tranches in Configuration
      
      * runtime/session_info: punt on approval keys
      
      * runtime/session_info: add some basic tests
      
      * Update primitives/src/v1.rs
      
      * small fixes
      
      * remove codec index annotation on structs
      
      * fix off-by-one error
      
      * validator_discovery: accept a session index
      
      * runtime: replace validator_discovery api with session_info
      
      * Update runtime/parachains/src/session_info.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * runtime/session_info: add a comment about missing entries
      
      * runtime/session_info: define the keys
      
      * util: expose connect_to_past_session_validators
      
      * util: allow session_info requests for jobs
      
      * runtime-api: add mock test for session_info
      
      * collator-protocol: add session_index to test state
      
      * util: fix error message for runtime error
      
      * fix compilation
      
      * fix tests after merge with master
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      734eda87
  9. Nov 24, 2020
  10. Nov 23, 2020
  11. 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
  12. Nov 19, 2020
  13. Nov 18, 2020
  14. 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
  15. Nov 09, 2020
  16. Nov 06, 2020
    • Sergey Pepyakin's avatar
      Implement HRMP (#1900) · 73553661
      Sergey Pepyakin authored
      * HRMP: Update the impl guide
      
      * HRMP: Incorporate the channel notifications into the guide
      
      * HRMP: Renaming in the impl guide
      
      * HRMP: Constrain the maximum number of HRMP messages per candidate
      
      This commit addresses the HRMP part of https://github.com/paritytech/polkadot/issues/1869
      
      
      
      * XCM: Introduce HRMP related message types
      
      * HRMP: Data structures and plumbing
      
      * HRMP: Configuration
      
      * HRMP: Data layout
      
      * HRMP: Acceptance & Enactment
      
      * HRMP: Test base logic
      
      * Update adder collator
      
      * HRMP: Runtime API for accessing inbound messages
      
      Also, removing some redundant fully-qualified names.
      
      * HRMP: Add diagnostic logging in acceptance criteria
      
      * HRMP: Additional tests
      
      * Self-review fixes
      
      * save test refactorings for the next time
      
      * Missed a return statement.
      
      * a formatting blip
      
      * Add missing logic for appending HRMP digests
      
      * Remove the channel contents vectors which became empty
      
      * Tighten HRMP channel digests invariants.
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Remove a note about sorting for channel id
      
      * Add missing rustdocs to the configuration
      
      * Clarify and update the invariant for HrmpChannelDigests
      
      * Make the onboarding invariant less sloppy
      
      Namely, introduce `Paras::is_valid_para` (in fact, it already is present
      in the implementation) and hook up the invariant to that.
      
      Note that this says "within a session" because I don't want to make it
      super strict on the session boundary. The logic on the session boundary
      should be extremely careful.
      
      * Make `CandidateCheckContext` use T::BlockNumber for hrmp_watermark
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      73553661
    • Bastian Köcher's avatar
      Distribute a PoV after seconding it (#1924) · 3a3aace3
      Bastian Köcher authored
      We need to distribute the PoV after we have seconded it. Other nodes
      that will receive our `Secondded` statement and want to validate the
      candidate another time will request this PoV from us.
      3a3aace3
  17. Nov 05, 2020
    • Bastian Köcher's avatar
      Adds a comment as requested (#1922) · 500934c5
      Bastian Köcher authored
      
      
      * Adds a comment as requested
      
      * Update node/core/bitfield-signing/src/lib.rs
      
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      
      Co-authored-by: default avatarFedor Sakharov <[email protected]>
      500934c5
    • Bastian Köcher's avatar
      Make `CandidateHash` a real type (#1916) · 76720173
      Bastian Köcher authored
      
      
      * Make `CandidateHash` a real type
      
      This pr adds a new type `CandidateHash` that is used instead of the
      opaque `Hash` type. This helps to ensure on the type system level that
      we are passing the correct types.
      
      This pr also fixes wrong usage of `relay_parent` as `candidate_hash`
      when communicating with the av storage.
      
      * Update core-primitives/src/lib.rs
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      
      * Wrap the lines
      
      Co-authored-by: default avatarPeter Goodspeed-Niklaus <[email protected]>
      76720173
    • 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
    • Bastian Köcher's avatar
      Simplify the bitfield signing job (#1920) · e488c6cd
      Bastian Köcher authored
      Besides that the pr also adds a simple test.
      e488c6cd
    • Bastian Köcher's avatar
      Do not validate a candidate in candidate selection (#1912) · c360efa4
      Bastian Köcher authored
      * Do not validate a candidate in candidate selection
      
      The candidate selection subsystem should not validate a candidate, as
      this is done by the backing subsystem on a `Second` request. Otherwise
      we validate one candidate twice.
      
      * Update candidate-selection.md
      c360efa4
  18. Nov 04, 2020
  19. Nov 03, 2020
  20. Nov 02, 2020
  21. Nov 01, 2020