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

Use SSZ union-types in RPC request/response #974

Merged
merged 2 commits into from
May 17, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions specs/networking/rpc-interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Remote method calls are wrapped in a "request" structure:
(
id: uint64
method_id: uint16
body: Request
body: (message_body...)
)
```

Expand All @@ -56,15 +56,7 @@ and their corresponding responses are wrapped in a "response" structure:
)
```

If an error occurs, a variant of the response structure is returned:

```
(
id: uint64
response_code: uint16
result: bytes
)
```
A union type is used to determine the contents of the `body` field in the request structure. Each "body" entry in the RPC calls below corresponds to one subtype in the `body` type union.

The details of the RPC-Over-`libp2p` protocol are similar to [JSON-RPC 2.0](https://www.jsonrpc.org/specification). Specifically:

Expand Down