Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[RPC-Spec-V2] Limit ongoing operations #14640

Closed
Tracked by #14636
lexnv opened this issue Jul 25, 2023 · 0 comments · Fixed by #14699
Closed
Tracked by #14636

[RPC-Spec-V2] Limit ongoing operations #14640

lexnv opened this issue Jul 25, 2023 · 0 comments · Fixed by #14699
Assignees
Labels
J0-enhancement An additional feature request.

Comments

@lexnv
Copy link
Contributor

lexnv commented Jul 25, 2023

The chainHead must guarantee that at least 16 concurrent operations can be processed:

The JSON-RPC server must accept at least 16 concurrent operations for any given [chainHead_unstable_follow] subscription. In other words, as long as the JSON-RPC client makes sure that no more than 16 operations are in progress at any given item, it is guaranteed that all of its operations will be accepted by the JSON-RPC server.

For this purpose, each item requested through [chainHead_unstable_storage] counts as one operation, and each call to [chainHead_unstable_body] and [chainHead_unstable_call] counts as one operation.

  • ensure that at least 16 operations can be added to the internal queue
  • provide back to the methods a limitReached result in case the RPC server cannot perform more ops
  • discard any number of storage items that exceed the internal limit via discardedItems field

// @paritytech/subxt-team

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
J0-enhancement An additional feature request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant