Commit Graph

158 Commits

Author SHA1 Message Date
Danny Ryan dc4869349c
remove explicitly handling empty attestation 2019-10-05 06:56:54 +09:00
Danny Ryan a5fb9408ae
make beacon state for shard sate transition from current shard epoch 2019-09-30 13:15:03 +09:00
Danny Ryan 75fd6191ca
Merge branch 'JustinDrake-patch-23' into shard-chain-test 2019-09-30 11:44:13 +09:00
Danny Ryan b259d3518b
move assert to get_beacon_proposer_index 2019-09-30 11:34:28 +09:00
Danny Ryan b892d46f26
working through shard chain tests 2019-09-27 13:02:16 +09:00
Danny Ryan 86ed3937dc
fix a couple of minor shard chain bugs 2019-09-27 10:34:19 +09:00
Danny Ryan 131bf282be
Merge branch 'JustinDrake-patch-23' into shard-chain-test 2019-09-27 09:43:30 +09:00
Danny Ryan 9ce7a8e591
working through lint and format on shard chains 2019-09-27 09:41:12 +09:00
Justin Drake d4f48117d3 Rename ShardCheckpoint, double header size, verify proposer not slashed 2019-09-26 19:32:50 +01:00
Justin Drake fd759a2cca Remove flat containers and revert back to uint64 2019-09-25 21:51:35 +01:00
Danny Ryan 44bdf01948
Merge branch 'dev' into JustinDrake-patch-23 2019-09-25 14:17:26 -06:00
Justin 25efbe7458
Rename seed to epoch_seed as per Danny 2019-09-23 20:58:29 +01:00
Justin Drake 47a818c705
Add domain_type to get_seed 2019-09-23 12:48:36 -06:00
Justin 2a4957c6cc
Update 1_shard-data-chains.md 2019-09-05 20:07:25 +01:00
Justin c01d036ed1
Update 1_shard-data-chains.md 2019-09-03 22:49:33 +01:00
Justin 2b60c9cf90
Update 1_shard-data-chains.md 2019-09-03 22:45:13 +01:00
Justin 91e73c1f57
Deduplicate indices 2019-09-03 22:15:52 +01:00
Justin 2eda4c5dbc
Update 1_shard-data-chains.md 2019-09-03 22:09:47 +01:00
Justin 40dc062279
Update 1_shard-data-chains.md 2019-09-03 22:04:59 +01:00
Justin 225c740107
Apply suggestions from code review
Co-Authored-By: terence tsao <terence@prysmaticlabs.com>
2019-09-03 21:56:12 +01:00
Justin a0bbc940ce
Update 1_shard-data-chains.md 2019-09-03 19:27:30 +01:00
Justin c4297ae330
Update 1_shard-data-chains.md 2019-09-03 19:17:19 +01:00
Justin 3ef24870d6
Changes as per today's discussion
1) Make `ShardBlock` and `ShardState` flat containers (as opposed to plain containers)
2) Make Gwei deltas `int64` (as opposed `uint64`)
3) Make `older_committee_deltas` a `Vector` (as opposed to `List`)
4) Apply size fee on block body only (as opposed to block header and body)
5) Enshrine minimum "extra" block body fee for proposers (reusing `PROPOSER_REWARD_QUOTIENT`)
6) Fix bugs reported by @terencechain and @hwwhww 👍
2019-09-03 18:55:46 +01:00
vbuterin 834edc2dbc
Removed shard from genesis shard block 2019-09-03 13:44:50 +01:00
Justin 66c3c391d4
Update 1_shard-data-chains.md 2019-08-29 16:36:13 +01:00
Justin d7e628e08f
WIP! 2019-08-28 22:57:24 +01:00
Justin 334d6c6bc7
Revamp 1_shard-data-chains.md
WIP!

* Significant simplifications
* A few bug fixes
* Lots of cleanups and reorganising (making it consistent with `0_beacon-chain.md`)
* Likely a few bugs introduced
2019-08-27 14:58:28 +01:00
Hsiao-Wei Wang 17702e6d88
Shard slot -> slot for PHASE_1_FORK_SLOT part2 2019-08-27 20:10:39 +08:00
Danny Ryan c224af999e
MAX_PERSISTENT_COMMITTEE_SIZE -> TARGET_PERSISTENT_COMMITTEE_SIZE 2019-08-12 19:05:16 -06:00
Hsiao-Wei Wang 5290b62465
Fix + refactor `is_valid_beacon_attestation` and add basic test 2019-08-11 22:24:21 +08: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
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
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
Chih Cheng Liang 9c6ba9cd0f
Fix md table 2019-07-24 13:39:04 +08:00
Hsiao-Wei Wang 733653f169
Update some missing type hinting of phase 1 2019-07-04 20:52:58 +08:00
Hsiao-Wei Wang b3d65368a1
`PERSISTENT_COMMITTEE_PERIOD` has been defined in phase 0 2019-07-04 20:38:18 +08:00
Danny Ryan af5719031c
Merge branch 'dev' into fix-bls-domain-type 2019-06-30 20:28:18 -05:00