1. Jan 29, 2024
  2. Jan 28, 2024
  3. Jan 27, 2024
  4. Jan 26, 2024
  5. Jan 25, 2024
  6. Jan 24, 2024
  7. Jan 23, 2024
    • Branislav Kontur's avatar
      Various nits and alignments for testnet runtimes (#3024) · a817d310
      Branislav Kontur authored
      There were several improvements and PRs that didn't apply to all
      runtimes, so this PR attempts to align those small differences. In
      addition, the PR eliminates unused dependencies across multiple modules.
      
      Relates to PR for `polkadot-fellows`:
      https://github.com/polkadot-fellows/runtimes/pull/154
      a817d310
    • Alexandru Vasile's avatar
      rpc-v2: Enable the `archive` class of methods (#3017) · 01ac54db
      Alexandru Vasile authored
      The
      [archive](https://github.com/paritytech/json-rpc-interface-spec/blob/main/src/api/archive.md
      
      )
      API is unstable and subject to change.
      
      This PR enables the `archive` class of the RPC-V2 spec to substrate
      based chains.
      
      The `archive` API is enabled for archive nodes: 
      - the state of the blocks is in archive mode
      - the block's bodies are in archive mode
      
      While at it, this PR extends the `BlocksPrunning` enum with an
      `is_archive` helper to check if the pruning mode keeps the block's
      bodies for long enough.
      
      Defaults used for the `archive` API:
      - a maximum of 5 responses are provided for descendants queries (this is
      similar to chainHead)
      - a maximum of 8 item queries are accepted at a time
      
      Before stabilizing the API we should look into these defaults and adjust
      after collecting some data.
      
      ---------
      
      Signed-off-by: default avatarAlexandru Vasile <[email protected]>
      01ac54db
    • Andrei Sandu's avatar
      approval-distribution: aggresion must target unfinalized chain rather than unapproved chain (#2988) · b4dfad83
      Andrei Sandu authored
      
      
      Found the issue while investigating the recent finality stall on Westend
      after upgrading to 1.6.0. Approval distribution aggression is supposed
      to trade off bandwidth and re-send assignemnts/approvals until enough
      approvals are be received by at least 2/3 validators. This is supposed
      to be a catch all mechanism when network connectivity goes south or many
      validators reboot at the same time.
      
      This fix ensures that we always resend approvals starting with the first
      unfinalized block even in the case when it appears approved from the
      node's perspective.
      
      TODO:
      - [x] Versi test
      
      ---------
      
      Signed-off-by: default avatarAndrei Sandu <[email protected]>
      b4dfad83
    • joe petrowski's avatar
    • Niklas Adolfsson's avatar
      rpc: backpressured RPC server (bump jsonrpsee 0.20) (#1313) · e16ef086
      Niklas Adolfsson authored
      This is a rather big change in jsonrpsee, the major things in this bump
      are:
      - Server backpressure (the subscription impls are modified to deal with
      that)
      - Allow custom error types / return types (remove jsonrpsee::core::Error
      and jsonrpee::core::CallError)
      - Bug fixes (graceful shutdown in particular not used by substrate
      anyway)
         - Less dependencies for the clients in particular
         - Return type requires Clone in method call responses
         - Moved to tokio channels
         - Async subscription API (not used in this PR)
      
      Major changes in this PR:
      - The subscriptions are now bounded and if subscription can't keep up
      with the server it is dropped
      - CLI: add parameter to configure the jsonrpc server bounded message
      buffer (default is 64)
      - Add our own subscription helper to deal with the unbounded streams in
      substrate
      
      The most important things in this PR to review is the added helpers
      functions in `substrate/client/rpc/src/utils.rs` and the rest is pretty
      much chore.
      
      Regarding the "bounded buffer limit" it may cause the server to handle
      the JSON-RPC calls
      slower than before.
      
      The message size limit is bounded by "--rpc-response-size" thus "by
      default 10MB * 64 = 640MB"
      but the subscription message size is not covered by this limit and could
      be capped as well.
      
      Hopefully the last release prior to 1.0, sorry in advance for a big PR
      
      Previous attempt: https://github.com/paritytech/substrate/pull/13992
      
      Resolves https://github.com/paritytech/polkadot-sdk/issues/748, resolves
      https://github.com/paritytech/polkadot-sdk/issues/627
      e16ef086