Merge pull request #974 from mslipper/no-ssz-wrapper

Use SSZ union-types in RPC request/response
This commit is contained in:
Danny Ryan 2019-05-17 13:20:04 -04:00 committed by GitHub
commit e0b4dd1aeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -41,7 +41,7 @@ Remote method calls are wrapped in a "request" structure:
( (
id: uint64 id: uint64
method_id: uint16 method_id: uint16
body: Request body: (message_body...)
) )
``` ```
@ -55,15 +55,7 @@ and their corresponding responses are wrapped in a "response" structure:
) )
``` ```
If an error occurs, a variant of the response structure is returned: 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.
```
(
id: uint64
response_code: uint16
result: bytes
)
```
The details of the RPC-Over-`libp2p` protocol are similar to [JSON-RPC 2.0](https://www.jsonrpc.org/specification). Specifically: The details of the RPC-Over-`libp2p` protocol are similar to [JSON-RPC 2.0](https://www.jsonrpc.org/specification). Specifically: