Merge branch 'dev' into fix-v-committee

This commit is contained in:
Danny Ryan 2019-05-17 13:53:19 -04:00
commit 78471e0818
No known key found for this signature in database
GPG Key ID: 2765A792E42CE07A
3 changed files with 15 additions and 21 deletions

View File

@ -52,7 +52,7 @@ jobs:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
paths:
- ~/specs-repo
install_test:
install_env:
docker:
- image: circleci/python:3.6
working_directory: ~/specs-repo
@ -60,13 +60,13 @@ jobs:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_cached_venv:
venv_name: v1-pyspec
venv_name: v1-pyspec-03
reqs_checksum: '{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}'
- run:
name: Install pyspec requirements
command: make install_test
command: make install_test && make install_lint
- save_cached_venv:
venv_name: v1-pyspec
venv_name: v1-pyspec-03
reqs_checksum: '{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}'
venv_path: ./test_libs/pyspec/venv
test:
@ -77,7 +77,7 @@ jobs:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_cached_venv:
venv_name: v1-pyspec
venv_name: v1-pyspec-03
reqs_checksum: '{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}'
- run:
name: Run py-tests
@ -92,20 +92,22 @@ jobs:
- restore_cache:
key: v1-specs-repo-{{ .Branch }}-{{ .Revision }}
- restore_cached_venv:
venv_name: v1-pyspec
venv_name: v1-pyspec-03
reqs_checksum: '{{ checksum "test_libs/pyspec/requirements.txt" }}-{{ checksum "test_libs/pyspec/requirements-testing.txt" }}'
- run:
name: Run linter
command: make install_lint && make pyspec && make lint
command: make lint
workflows:
version: 2.1
test_spec:
jobs:
- checkout_specs
- lint
- install_test:
- install_env:
requires:
- checkout_specs
- test:
requires:
- install_test
- install_env
- lint:
requires:
- test

View File

@ -42,7 +42,7 @@ citest: $(PY_SPEC_ALL_TARGETS)
install_lint:
cd $(PY_SPEC_DIR); python3 -m venv venv; . venv/bin/activate; pip3 install flake8==3.5.0
lint:
lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \
flake8 --max-line-length=120 ./eth2spec;

View File

@ -41,7 +41,7 @@ Remote method calls are wrapped in a "request" structure:
(
id: uint64
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:
```
(
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: