Hsiao-Wei Wang
f6fd151872
Merge branch 'dev' into shard-fork-choice-fix
2020-07-29 00:15:41 +08:00
Hsiao-Wei Wang
33e56b5742
Apply Terence's suggestion: refactor on_shard_block interface
2020-07-22 22:48:52 +08:00
Hsiao-Wei Wang
cf42fd4828
Rename `PHASE_1_GENESIS_SLOT` to `PHASE_1_FORK_SLOT` and set it to `Slot(0)` for testing.
2020-07-16 23:58:47 +08:00
Hsiao-Wei Wang
f6b1fe6172
Refactor tests and avoiding passing `shart_store` to helper functions
2020-07-15 19:07:39 +08:00
Hsiao-Wei Wang
43ef9aa294
Make ShardLatestMessage per shard per validator
...
1. Add `ShardLatestMessage` dataclass
2. To make it compatible with phase 0 tests and APIs, add `Store.shard_stores: Dict[Shard, ShardStore]`
3. Update `get_forkchoice_store` and `update_latest_messages`
2020-07-14 17:44:01 +08:00
Hsiao-Wei Wang
a159a2da82
Merge pull request #1928 from ethereum/hwwhww/shard-block-tests
...
Add tests for `shard_state_transition` and some refactorings
2020-06-26 11:54:23 +08:00
Hsiao-Wei Wang
2a7b5f7e68
PR feedback from Danny: nuke optional beacon_parent_state
2020-06-25 11:14:25 +08:00
Hsiao-Wei Wang
c4973792e2
Make `get_pending_shard_blocks` return `Sequence[SignedShardBlock]`
2020-06-24 12:50:27 +08:00
Hsiao-Wei Wang
dbd1d4e589
PR feedback: Enable `verify_shard_block_signature`
2020-06-24 12:22:24 +08:00
Hsiao-Wei Wang
eec1442417
Reorg `shard_state_transition` argument and fix `get_shard_transition_fields`
2020-06-22 23:41:02 +08:00
Hsiao-Wei Wang
4f618fc62d
Rework `shard_state_transition` interface
...
To make `shard_state_transition` similar to phase 0
`state_transition` function
1. Rename old `shard_state_transition` to `process_shard_block`
2. Add `shard_state_transition` with `validate_message` flag, we only
validate it in shard fork choice
2020-06-22 23:21:24 +08:00
Hsiao-Wei Wang
dacf86a5c0
Remove `transition_digest`
2020-06-10 02:43:59 +08:00
Hsiao-Wei Wang
2d895e9388
PR feedback from danny
2020-06-09 00:13:27 +08:00
Hsiao-Wei Wang
9b3f45dfd0
Merge pull request #1875 from ethereum/hwwhww/shard_fork_choice_part2
...
Handle `beacon_parent_root` checks
2020-06-08 23:53:31 +08:00
Hsiao-Wei Wang
e03a970eaf
PR feedback from danny: simplify `verify_shard_block_message` params
2020-06-08 23:49:24 +08:00
Hsiao-Wei Wang
435505746c
PR feedback from Terence: fix `get_shard_latest_attesting_balance`
...
Co-authored-by: terence tsao <terence@prysmaticlabs.com>
2020-06-08 17:12:46 +08:00
Hsiao-Wei Wang
a4cc189f2b
Apply PR feedback from Danny
2020-06-06 05:19:46 +08:00
Hsiao-Wei Wang
2d4788fe7d
Fix `verify_shard_block_message`
...
Add check for `block.beacon_parent_root` per Terence's suggestion
Update `get_shard_transition`
1. Disable verification: it will be fix in v-guide
2. Use `on_time_slot` to compute offset_slots
Rework tests
2020-06-06 02:39:47 +08:00
Hsiao-Wei Wang
a154d0c22b
Fix typo
2020-06-06 02:39:11 +08:00
Hsiao-Wei Wang
6f9c290bfb
Add TODO flag of latest message
2020-06-06 02:39:11 +08:00
Hsiao-Wei Wang
f8597d2965
Add `get_pendings_shard_blocks`
2020-06-06 02:39:10 +08:00
Hsiao-Wei Wang
727353c054
Verify shard_block.slot fits the expected offset_slots
2020-06-06 02:39:10 +08:00
Hsiao-Wei Wang
e1981a7bfd
`head_shard_root` -> `shard_head_root`
2020-06-04 01:00:52 +08:00
Hsiao-Wei Wang
5c5cedd60d
Apply PR feedback from Danny and Terence
2020-06-03 22:31:16 +08:00
Hsiao-Wei Wang
142ba17451
PR review from Danny
2020-06-02 18:08:28 +08:00
Hsiao-Wei Wang
fca1bbccb9
Remove `get_filtered_shard_block_tree`
2020-05-05 21:42:13 +08:00
Hsiao-Wei Wang
8fafb6a9e5
Make `ShardStore` an independent object
2020-05-05 21:42:06 +08:00
Hsiao-Wei Wang
cddf9cf114
Refactor
2020-05-05 21:42:00 +08:00
Hsiao-Wei Wang
dab5a936c4
wip shard fork choice rule
2020-05-05 21:41:46 +08:00