1. Dec 25, 2020
  2. Dec 18, 2020
  3. Dec 17, 2020
    • asynchronous rob's avatar
      adjust span names (#2135) · e28bcbd2
      asynchronous rob authored
      * adjust span names
      
      * fix compile
      e28bcbd2
    • asynchronous rob's avatar
      add better spans for unbacked candidates (#2132) · f714f5f4
      asynchronous rob authored
      * add better spans for unbacked candidates
      
      * improve span names
      f714f5f4
    • 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
  4. Dec 11, 2020
  5. Dec 10, 2020
    • Bernhard Schuster's avatar
      addition error definitions (#2107) · dca93d01
      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
      dca93d01
  6. Dec 07, 2020
  7. Dec 04, 2020
    • Bastian Köcher's avatar
      Add an upper number of maximum parallel runtime api requests (#2069) · d7257026
      Bastian Köcher authored
      
      
      * Add an upper number of maximum parallel runtime api requests
      
      Instead of spawning all runtime api requests in the background and using
      all wasm instances. This pr adds a maximum number of parallel requests.
      
      * Update node/core/runtime-api/src/lib.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      * Review feedback
      
      * Increase instances
      
      * Add warning
      
      * Update node/core/runtime-api/src/lib.rs
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      
      Co-authored-by: default avatarSergei Shulepov <[email protected]>
      d7257026
    • Sergey Pepyakin's avatar
    • Peter Goodspeed-Niklaus's avatar
      do not store backed candidates in the provisioner (#1909) · 113ae827
      Peter Goodspeed-Niklaus authored
      * guide: non-semantic changes
      
      * guide: update per the issue description
      
      * GetBackedCandidates operates on multiple hashes now
      
      * GetBackedCandidates still needs a relay parent
      
      * implement changes specified in guide
      
      * distinguish between various occasions for canceled oneshots
      
      * add tracing info to getbackedcandidates
      
      * REVERT ME: add tracing messages for GetBackedCandidates
      
      Note that these messages are only sometimes actually passed on to the
      candidate backing subsystem, with the consequence that it is
      unexpectedly frequent that the provisioner fails to create its
      provisionable data.
      
      * REVERT ME: more tracing logging
      
      * REVERT ME: log when CandidateBackingJob receives any message at all
      
      * REVERT ME: log when send_msg sends a message to a job
      
      * fix candidate-backing tests
      
      * streamline GetBackedCandidates
      
      This uses table.attested_candidate instead of table.get_candidate, because
      it's not obvious how to get a BackedCandidate from just a
      CommittedCandidateReceipt.
      
      * REVERT ME: more logging tracing job lifespans
      
      * promote warning about job premature demise
      
      * don't terminate CandiateBackingJob::run_loop in event of failure to process message
      
      * Revert "REVERT ME: more logging tracing job lifespans"
      
      This reverts commit 7365f2fb.
      
      * Revert "REVERT ME: log when send_msg sends a message to a job"
      
      This reverts commit 58e46aad.
      
      * Revert "REVERT ME: log when CandidateBackingJob receives any message at all"
      
      This reverts commit 0d6f3841.
      
      * Revert "REVERT ME: more tracing logging"
      
      This reverts commit 675fd262.
      
      * Revert "REVERT ME: add tracing messages for GetBackedCandidates"
      
      This reverts commit e09e1564.
      
      * formatting
      
      * add logging message to CandidateBackingJob::run_loop start
      
      * REVERT ME: add tracing to candidate-backing job creation
      
      * run candidatebacking loop even if no assignment
      
      * use unique error variants for each canceled oneshot
      
      * Revert "REVERT ME: add tracing to candidate-backing job creation"
      
      This reverts commit 8ce5f4f0.
      
      * try_runtime_api more to reduce silent exits
      
      * add sanity check that returned backed candidates preserve ordering
      
      * remove redundant err attribute
      113ae827
  8. Dec 02, 2020
  9. Dec 01, 2020
  10. 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
  11. Nov 28, 2020
  12. Nov 27, 2020
  13. 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
  14. Nov 24, 2020
  15. Nov 23, 2020
  16. 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
  17. Nov 19, 2020
  18. Nov 18, 2020
  19. 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
  20. Nov 09, 2020
  21. 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