Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rpc: add limit for batch request and response size #26681

Merged
merged 32 commits into from Jun 13, 2023

Commits on Feb 14, 2023

  1. Configuration menu
    Copy the full SHA
    7f3d7e6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    667a408 View commit details
    Browse the repository at this point in the history
  3. add batch limit related config

    mmsqe committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    21aec8f View commit details
    Browse the repository at this point in the history
  4. update doc

    mmsqe committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    6b8b39d View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b6993c4 View commit details
    Browse the repository at this point in the history
  6. apply limit for server & client

    mmsqe committed Feb 14, 2023
    Configuration menu
    Copy the full SHA
    c4ac65c View commit details
    Browse the repository at this point in the history

Commits on Feb 15, 2023

  1. Configuration menu
    Copy the full SHA
    c9015fa View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6d2ce24 View commit details
    Browse the repository at this point in the history

Commits on Feb 16, 2023

  1. Configuration menu
    Copy the full SHA
    2c04aa0 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22bc552 View commit details
    Browse the repository at this point in the history
  3. rename namespace

    mmsqe committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    a43fda5 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    754137c View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d7c8673 View commit details
    Browse the repository at this point in the history
  6. set limit when init client

    mmsqe committed Feb 16, 2023
    Configuration menu
    Copy the full SHA
    7fd2b77 View commit details
    Browse the repository at this point in the history

Commits on Feb 17, 2023

  1. rpc: configure client batch limits through options

    It's not really possible to change these values in a running client
    without recreating the connection, and I suspect users will rarely want
    to do that.
    fjl committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    733910c View commit details
    Browse the repository at this point in the history
  2. node: refactor passing around rpc config

    Passing options in function parameters makes it hard to add more
    options later. Pass them in a struct instead.
    fjl committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    bae5a2f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6c6b8b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cebe226 View commit details
    Browse the repository at this point in the history
  5. rpc: rename variable

    fjl committed Feb 17, 2023
    Configuration menu
    Copy the full SHA
    333dffb View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    b91f08a View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2023

  1. Configuration menu
    Copy the full SHA
    fdf1b20 View commit details
    Browse the repository at this point in the history

Commits on Mar 3, 2023

  1. Configuration menu
    Copy the full SHA
    127079b View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. rm non-call test

    mmsqe committed Mar 6, 2023
    Configuration menu
    Copy the full SHA
    e82658a View commit details
    Browse the repository at this point in the history

Commits on May 31, 2023

  1. Configuration menu
    Copy the full SHA
    bd5dfa6 View commit details
    Browse the repository at this point in the history
  2. cmd/utils: fix docs on flags

    holiman committed May 31, 2023
    Configuration menu
    Copy the full SHA
    47557d1 View commit details
    Browse the repository at this point in the history
  3. rpc: minor refactor of tests

    holiman committed May 31, 2023
    Configuration menu
    Copy the full SHA
    8e6018f View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2023

  1. rpc: improve client batch response handling

    This changes how we handle batch responses in order to be able to react to situations
    where the server does not provide a response for every request batch element.
    
    For some weird reason, when writing the original client implementation, I worked off of
    the assumption that responses could be distributed across batches arbitrarily. So for a
    batch request containing requests [A, B, C], the server could respond with [A B C] but
    also with [A B] [C] or even [A] [B] [C] and it wouldn't make a difference to the client.
    
    So in the implementation of BatchCallContext, the client waited for all requests in the
    batch individually. If the server didn't respond to all requests in the batch, the client
    would eventually just time out.
    
    With the addition of batch limits into the server, I anticipate that people will hit this
    kind of error way more often. To handle this properly, the client now waits for a single
    response batch and expects it to contain all responses to the requests.
    fjl committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    acf5730 View commit details
    Browse the repository at this point in the history
  2. rpc: attach "batch too large" error to the first call

    In JSON-RPC, only method calls with a non-null "id" can be responded to. Since batches can
    contain non-call messages or notifications, the best effort thing we can do to report an
    error with the batch itself is the first method call message.
    fjl committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    82b5208 View commit details
    Browse the repository at this point in the history
  3. rpc: remove default limits

    I think adding these limits might break people's setups, so best
    to avoid configuring them by default in package rpc.
    fjl committed Jun 8, 2023
    Configuration menu
    Copy the full SHA
    f0688d6 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    cd73291 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7048bfc View commit details
    Browse the repository at this point in the history

Commits on Jun 9, 2023

  1. rpc: rename error

    fjl committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    6841858 View commit details
    Browse the repository at this point in the history