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

backport v093 to dev #1522

Merged
merged 50 commits into from
Dec 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
9004bcf
WIP filter block tree
djrtwo Nov 25, 2019
8021f34
fix existing fork choce tests with new filter
djrtwo Nov 25, 2019
5aa9f96
Update specs/core/0_fork-choice.md
djrtwo Nov 27, 2019
2275cdf
fix child filter in get_head
djrtwo Nov 27, 2019
dfcd6f6
add tests for block filter in get_head
djrtwo Dec 4, 2019
7baf81e
minor test style change, avoid state copy
protolambda Dec 5, 2019
e53a6da
clarify fliter block tree through two line usage
djrtwo Dec 8, 2019
57aeed1
Merge branch 'v09x' into filter-fc-justified
djrtwo Dec 8, 2019
cf5b48f
Merge pull request #1495 from ethereum/filter-fc-justified
djrtwo Dec 8, 2019
d4d17ec
ensure the best better-justification is stored in fork choice
djrtwo Dec 9, 2019
4322576
add asserts to ensure that attestation slot must match the target epoch
djrtwo Dec 10, 2019
9989f3e
ensure fork choice functions when GENESIS_SLOT != 0
djrtwo Dec 10, 2019
8861ca0
minor typo
djrtwo Dec 10, 2019
2c5c9cb
feedback from mikhail
djrtwo Dec 10, 2019
12ff64e
Update ToC of specs to consistent use of doctoc
MrChico Dec 10, 2019
ca2b6a0
Use consistent header level for TOC generation
MrChico Dec 10, 2019
aa0c9f8
Add check_toc rule to makefile, which fails if table of contents of a…
MrChico Dec 10, 2019
8408ec6
check table of contents in circleci
MrChico Dec 10, 2019
3190f58
ci: try with sudo
MrChico Dec 10, 2019
e090174
checkout specs before checking toc
MrChico Dec 10, 2019
c761fea
checkout in same job
MrChico Dec 10, 2019
d126162
fix activation queue efficiency
djrtwo Dec 10, 2019
e4d7105
add test for queue efficiency
djrtwo Dec 10, 2019
4636b3e
Merge pull request #1510 from ethereum/genesis-slot-time
djrtwo Dec 10, 2019
66652d0
Merge pull request #1508 from ethereum/better-best
djrtwo Dec 10, 2019
40025c9
Merge pull request #1509 from ethereum/match-slot-target
djrtwo Dec 10, 2019
6610aee
fix activation queue to finality
djrtwo Dec 11, 2019
e117b58
add queue eligibility helper
djrtwo Dec 11, 2019
e8d079b
fix and add tests for activation queue
djrtwo Dec 12, 2019
b6d7cd9
Add ejection/exit queue test
djrtwo Dec 12, 2019
45620e3
add test for activation_queue, activation, and ejection all in one
djrtwo Dec 12, 2019
2405060
Fixes #1486: disallow duplicate indices in indexed attestation
protolambda Dec 12, 2019
7691e31
update mypy to compile pyspec well with py 3.8.0, and minor mypy fix
protolambda Dec 12, 2019
e2d93da
Merge pull request #1517 from ethereum/mypy_update
djrtwo Dec 12, 2019
8d5d738
Two tests for proposer indices being off because of active validators…
protolambda Dec 12, 2019
19ec01e
add comment about activation queue sort order
djrtwo Dec 12, 2019
86fb3ac
minor changes to finality in activation queue
djrtwo Dec 12, 2019
199933c
fix tocs
djrtwo Dec 12, 2019
ba8a67c
update registry tests to modified finality condition
djrtwo Dec 12, 2019
52a6cf7
Merge pull request #1514 from ethereum/queue-fix-on-finality
djrtwo Dec 12, 2019
020dbb1
fix missing transition
protolambda Dec 12, 2019
5c26d8e
fix normal signed case; only sign for 1 of the duplicate indices
protolambda Dec 12, 2019
4a31503
Merge pull request #1516 from ethereum/dup-indices-attest
djrtwo Dec 12, 2019
020af27
fix: don't get stuck in same slot doing a transition, and clean up la…
protolambda Dec 12, 2019
c1dc4a0
Merge pull request #1518 from ethereum/proposers-1515
djrtwo Dec 12, 2019
49a8264
Merge branch 'v09x' into toc_ci
djrtwo Dec 12, 2019
7343baf
Merge pull request #1512 from MrChico/toc_ci
djrtwo Dec 12, 2019
47ecedb
update tocs
djrtwo Dec 12, 2019
b09c45f
remove last two references to signing root
djrtwo Dec 12, 2019
e7c5d64
Merge pull request #1507 from ethereum/v09x
djrtwo Dec 12, 2019
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
10 changes: 10 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ jobs:
command: make citest
- store_test_results:
path: test_libs/pyspec/test-reports
table_of_contents:
docker:
- image: circleci/node:10.16.3
working_directory: ~/specs-repo
steps:
- checkout
- run:
name: Check table of contents
command: sudo npm install -g doctoc && make check_toc
lint:
docker:
- image: circleci/python:3.6
Expand Down Expand Up @@ -148,6 +157,7 @@ workflows:
- test:
requires:
- install_pyspec_test
- table_of_contents
- lint:
requires:
- test
Expand Down
18 changes: 15 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,22 @@ GENERATOR_VENVS = $(patsubst $(GENERATOR_DIR)/%, $(GENERATOR_DIR)/%venv, $(GENER
#$(info $$GENERATOR_TARGETS is [${GENERATOR_TARGETS}])

PY_SPEC_PHASE_0_TARGETS = $(PY_SPEC_DIR)/eth2spec/phase0/spec.py
PY_SPEC_PHASE_0_DEPS = $(SPEC_DIR)/core/0_*.md
PY_SPEC_PHASE_0_DEPS = $(wildcard $(SPEC_DIR)/core/0_*.md)

PY_SPEC_PHASE_1_TARGETS = $(PY_SPEC_DIR)/eth2spec/phase1/spec.py
PY_SPEC_PHASE_1_DEPS = $(SPEC_DIR)/core/1_*.md
PY_SPEC_PHASE_1_DEPS = $(wildcard $(SPEC_DIR)/core/1_*.md)

PY_SPEC_ALL_DEPS = $(PY_SPEC_PHASE_0_DEPS) $(PY_SPEC_PHASE_1_DEPS)

PY_SPEC_ALL_TARGETS = $(PY_SPEC_PHASE_0_TARGETS) $(PY_SPEC_PHASE_1_TARGETS)

MARKDOWN_FILES = $(PY_SPEC_ALL_DEPS) $(wildcard $(SPEC_DIR)/*.md) $(wildcard $(SPEC_DIR)/light_client/*.md) $(wildcard $(SPEC_DIR)/networking/*.md) $(wildcard $(SPEC_DIR)/validator/*.md)

COV_HTML_OUT=.htmlcov
COV_INDEX_FILE=$(PY_SPEC_DIR)/$(COV_HTML_OUT)/index.html

.PHONY: clean partial_clean all test citest lint generate_tests pyspec phase0 phase1 install_test open_cov \
install_deposit_contract_test test_deposit_contract compile_deposit_contract
install_deposit_contract_test test_deposit_contract compile_deposit_contract check_toc

all: $(PY_SPEC_ALL_TARGETS)

Expand Down Expand Up @@ -65,6 +69,14 @@ citest: $(PY_SPEC_ALL_TARGETS)
open_cov:
((open "$(COV_INDEX_FILE)" || xdg-open "$(COV_INDEX_FILE)") &> /dev/null) &

check_toc: $(MARKDOWN_FILES:=.toc)

%.toc:
cp $* $*.tmp && \
doctoc $* && \
diff -q $* $*.tmp && \
rm $*.tmp

lint: $(PY_SPEC_ALL_TARGETS)
cd $(PY_SPEC_DIR); . venv/bin/activate; \
flake8 --ignore=E252,W504,W503 --max-line-length=120 ./eth2spec \
Expand Down
2 changes: 1 addition & 1 deletion scripts/build_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def get_eth1_data(distance: uint64) -> Bytes32:
return hash(distance)


def hash(x: bytes) -> Bytes32:
def hash(x: bytes) -> Bytes32: # type: ignore
if x not in hash_cache:
hash_cache[x] = Bytes32(_hash(x))
return hash_cache[x]
Expand Down
36 changes: 19 additions & 17 deletions specs/bls_signature.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,25 @@

## Table of contents
<!-- TOC -->

- [BLS signature verification](#bls-signature-verification)
- [Table of contents](#table-of-contents)
- [Curve parameters](#curve-parameters)
- [Point representations](#point-representations)
- [G1 points](#g1-points)
- [G2 points](#g2-points)
- [Helpers](#helpers)
- [`hash_to_G2`](#hash_to_g2)
- [`modular_squareroot`](#modular_squareroot)
- [Aggregation operations](#aggregation-operations)
- [`bls_aggregate_pubkeys`](#bls_aggregate_pubkeys)
- [`bls_aggregate_signatures`](#bls_aggregate_signatures)
- [Signature verification](#signature-verification)
- [`bls_verify`](#bls_verify)
- [`bls_verify_multiple`](#bls_verify_multiple)

<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->


- [Curve parameters](#curve-parameters)
- [Point representations](#point-representations)
- [G1 points](#g1-points)
- [G2 points](#g2-points)
- [Helpers](#helpers)
- [`hash_to_G2`](#hash_to_g2)
- [`modular_squareroot`](#modular_squareroot)
- [Aggregation operations](#aggregation-operations)
- [`bls_aggregate_pubkeys`](#bls_aggregate_pubkeys)
- [`bls_aggregate_signatures`](#bls_aggregate_signatures)
- [Signature verification](#signature-verification)
- [`bls_verify`](#bls_verify)
- [`bls_verify_multiple`](#bls_verify_multiple)

<!-- END doctoc generated TOC please keep comment here to allow auto update -->
<!-- /TOC -->

## Curve parameters
Expand Down
Loading