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

Add support for JSON-RPC batched calls #341

Merged
merged 4 commits into from
Sep 18, 2017
Merged

Conversation

divan
Copy link
Contributor

@divan divan commented Sep 18, 2017

This PR introduces proper support for JSON-RPC batched requests (http://www.jsonrpc.org/specification#batch)

In short, JSON-RPC raw requests from web3.js can come up in two forms:

  • single method request:
{"jsonrpc": "2.0", "method": "subtract", "params": [42, 23], "id": 1}`
  • batched methods request:
[
        {"jsonrpc": "2.0", "method": "sum", "params": [1,2,4], "id": "1"},
        {"jsonrpc": "2.0", "method": "notify_hello", "params": [7]},
]

Each of the requests should be routed to proper destination RPC server (upstream or local).

@tiabc tiabc merged commit ca4bc51 into develop Sep 18, 2017
@adambabik adambabik deleted the bugfix/jsonrpc_batches-#333 branch December 27, 2019 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants