Commit Graph

1861 Commits

Author SHA1 Message Date
Hsiao-Wei Wang f8d9b0d283
Merge branch 'dev' into roots-removal 2019-08-24 03:10:02 +08:00
Martin Lundfall a843e9aeeb specs/ fix links 2019-08-19 13:47:09 +02:00
Danny Ryan c224af999e
MAX_PERSISTENT_COMMITTEE_SIZE -> TARGET_PERSISTENT_COMMITTEE_SIZE 2019-08-12 19:05:16 -06:00
Hsiao-Wei Wang d84c902bb1
Merge branch 'dev' into v082_backport 2019-08-12 01:47:24 +08:00
Hsiao-Wei Wang 8ac5ea20be
Merge pull request #1353 from mcdee/dev
Add link from DepositData reference to definition
2019-08-12 01:08:04 +08:00
dankrad b345dc0f5f Legendre custody construction (#1305)
* Stab at Legendre custody construction + some tests

* Fix some problems and fix function puller to remove phase0 only lines in phase1

* Pass the linter

* Add headings

* Fix domain for BLS stub

* Change Jacobi to Legendre

* n -> q to clarify notation

* Headings

* Another missing heading

* Custody subchunks via padding

* Fix max_reveal_lateness stuff

* Better names for reveal period functions

* Better parametrization of max_reveal_lateness computation and tests for custody reveal processing

* Fix linter

* Allow challenging for one period after the custody reveal, shorter periods for minimal tests

* Fix lint

* Fix linter error
2019-08-11 13:05:17 -04:00
Hsiao-Wei Wang 40fbcd3d59
Merge branch 'dev' into v082_backport 2019-08-12 00:58:20 +08:00
Hsiao-Wei Wang 01d58eb1c6
Merge branch 'dev' into v082_backport 2019-08-12 00:18:25 +08:00
Hsiao-Wei Wang 5290b62465
Fix + refactor `is_valid_beacon_attestation` and add basic test 2019-08-11 22:24:21 +08:00
Jim McDonald 0e7287eda5 Add link from DepositData reference to definition 2019-08-09 19:09:04 +01:00
Hsiao-Wei Wang 095cfe6633
Fix build_spec and typo 2019-08-07 19:29:24 +08:00
vbuterin cb92aa91dd
Include state root blocks in crosslink data in non-block slots
Also adds `total_bytes` to state. The goal is to facilitate easier fraud proofs, so that one needs to simply check two adjacent headers in a crosslink and their respective bodies to verify a fraud proof.
2019-08-05 14:37:38 -04:00
vbuterin ddd43ad99d
<= becomes < 2019-08-02 09:40:49 -04:00
vbuterin c29d85aafb
Update specs/core/1_shard-data-chains.md
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
2019-08-02 09:40:26 -04:00
Justin Drake 26641aa699 Remove light client infrastructure (better stuff to be added in phase 1) 2019-08-01 17:03:23 +01:00
Hsiao-Wei Wang 4163053cca
Clean up type hintings, especially `reward` is denominated in uint, and `fee` is in `Gwei` 2019-08-01 16:45:01 +08:00
Hsiao-Wei Wang ce3df38028
Some updates:
1. Clean up configurations
2. Add `HISTORY_ACCUMULATOR_VECTOR`
3. Add `validate_state_root` flag in `shard_state_transition` for testing
4. Rename `history_acc` to `history_accumulator`
2019-08-01 14:17:05 +08:00
Hsiao-Wei Wang 7a4a136d6c
Fix `later_committee` 2019-08-01 13:32:37 +08:00
vbuterin 52705f6fab
Quick fix 2019-07-31 21:28:07 -04:00
vbuterin b57aed2380
A few fixes 2019-07-31 21:26:47 -04:00
vbuterin e08c365e2f
Update specs/core/1_shard-data-chains.md
Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>
2019-07-31 17:25:55 -04:00
Hsiao-Wei Wang 13d6a31c5c
misc fix 2019-08-01 00:27:31 +08:00
Hsiao-Wei Wang fe2adfa0e2
Fix many typos and lint errors 2019-07-31 18:18:07 +08:00
Hsiao-Wei Wang f263b71875
ZERO_HASH -> Hash() 2019-07-31 17:50:55 +08:00
Hsiao-Wei Wang 058e63654d
Fix typo 2019-07-31 17:44:33 +08:00
vbuterin 4b2b5815c9
Add shard state transition function 2019-07-29 16:43:55 -04:00
dankrad ab156f31b1
Merge pull request #1283 from ethereum/n_zero
Clarify the illegal SSZ types
2019-07-29 17:40:38 +01:00
vbuterin de9b4f2d6d
Attestation changes + persistent committee changes (#1294)
* Minimal attestation simplification

* minor fix

* Make the tests pass

* Decrease `PLACEHOLDER`, Use `compute_epoch_of_shard_slot`

* Fix proposer signature name and use get_seed() to calculate current_shuffling_seed

* Fix linter error

* Add the WIP `test_is_valid_shard_block`

* Add `get_shard_block_attester_committee`

* Simplified committee selection

* Added some helpers and simplified

* Update specs/core/1_shard-data-chains.md

* Update 1_shard-data-chains.md

* Simplified switchover epochs, changed block structure, changed crosslink structure

* Update 1_shard-data-chains.md

* Moved balance dependency to proposer selection

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Danny Ryan <dannyjryan@gmail.com>

* Update specs/core/1_shard-data-chains.md

* Fixed shard header flattening

* Update specs/core/1_shard-data-chains.md

* Minor fixes

* Update specs/core/1_shard-data-chains.md

* Update specs/core/1_shard-data-chains.md

Co-Authored-By: Hsiao-Wei Wang <hwwang156@gmail.com>

* cleanup testing and lint

* return none if not active validators in persistent committee

* only allow active validators as shard proposer
2019-07-29 09:47:35 -04:00
Diederik Loerakker d791e9f7e8
Merge pull request #1319 from ethereum/compact_committees-shard
Fix start shard for compact committees root
2019-07-25 21:40:06 +02:00
Diederik Loerakker e20f5eb455
Merge pull request #1317 from ethereum/attestation-bit-lengths
Check attestation bit lengths
2019-07-25 21:17:39 +02:00
Danny Ryan 1ec20f6c1f
do not reset start_shard until after processing compact root 2019-07-25 12:59:38 -06:00
Justin 3f75f1e2c3
Update 0_beacon-chain.md 2019-07-25 19:32:56 +01:00
Danny Ryan bd69dc7e3c
add tests for bit lengths 2019-07-25 12:28:29 -06:00
Hsiao-Wei Wang f336e7ffb3
Rename `is_empty` to `is_zero` 2019-07-25 17:32:27 +08:00
Danny Ryan f9f722c505
Merge pull request #1306 from ethereum/old_latest_message
Found by Cem Özer: Ignore older latest messages in attesting balance
2019-07-24 20:03:23 -06:00
Chih Cheng Liang 9c6ba9cd0f
Fix md table 2019-07-24 13:39:04 +08:00
Danny Ryan 43a0ca4eeb
check bit lengths 2019-07-22 07:13:07 -06:00
protolambda 01af304403
Found by Cem Özer: Ignore older latest messages in attesting balance sum, instead of assertion error 2019-07-20 02:13:52 +02:00
Diederik Loerakker 866d3f30cc
Merge pull request #1299 from ethereum/master
backport v0.8.1 to dev
2019-07-15 19:34:51 +02:00
protolambda ef659144b4
make zero hash representation clear, fixes #1282 2019-07-15 02:05:16 +02:00
Danny Ryan 8970b71ca4
ensure min_seed_lookahead functions properly 2019-07-14 16:05:51 -06:00
Danny Ryan 9401383317
Merge pull request #1275 from ethereum/minor-cosmetics
Minor cosmetic fixes
2019-07-14 15:36:24 -06:00
Danny Ryan 6dc306700b avoid overflow in slashing penalty calculation (#1286)
Change presentation to avoid uint64 overflow in slashing penalty calculation. (Factor out `EFFECTIVE_BALANCE_INCREMENT` from `validator.effective_balance`.)
2019-07-11 09:53:51 +01:00
Alex Stokes 4def681a4e
Remove another unnecessary list materialization 2019-07-10 17:05:49 -07:00
Alex Stokes b80d6e0495
Avoid unnecessary materialization of list
There is a realization of a `list` in the `get_unslashed_attesting_indices` helper that is unnecessary.

The functionality in this PR is the same so this change should only really be cosmetic wrt the spec.
2019-07-10 17:00:11 -07:00
Danny Ryan 57c0eee197
Merge pull request #1285 from decanus/patch-24
Update 0_beacon-chain.md
2019-07-10 12:34:53 -06:00
Dean Eigenmann 0eadf61631
Update 0_beacon-chain.md 2019-07-10 13:11:34 -04:00
Justin Drake 591f9658d3 Copy edit 2019-07-05 15:04:57 +01:00
Justin Drake c8c810c0e1 Minor fixes 2019-07-05 15:03:37 +01:00
Hsiao-Wei Wang 733653f169
Update some missing type hinting of phase 1 2019-07-04 20:52:58 +08:00