- `range(len(col))`` instead of `range(col)`
- `beacon_parent_block.body.shard_transitions` instead of `beacon_parent_block.shard_transitions`
- `shard_states[len(shard_states)-1]` instead of `shard_states[-1]`
Fix wrong field names
Fix `build_attestation_data` and other PR feedback from Danny and
Terence
1. Rename `get_previous_slot` to `compute_previous_slot`
2. Break down `build_empty_block` into
`get_state_and_beacon_parent_root_at_slot`, use it in
`build_shard_block`
3. Set defult `slot` to `shard_state.slot + 1` in `build_shard_block`
Update `verify_shard_block_message`: check beacon_parent_root at fork
choice rule stage instead of state transition
Fix `beacon-chain.md`
1. Fix typo `attestation.slot == state.slot` -> `attestation.data.slot == state.slot` in `is_winning_attestation`
2. Check `verify_shard_transition_false_positives` **after** `process_operations`
3. Fix `shard_attestations` filter in `process_crosslinks`: since attestations come from block, should use `attestation.data.slot + MIN_ATTESTATION_INCLUSION_DELAY == state.slot`
4. [TBD] Allow empty `light_client_signature` to make the tests pass
5. [TBD] Add `is_shard_attestation`, filter out empty `ShardTransition()`
Rework `test_process_crosslink`
Add basic phase 1 `test_blocks`
Add more test cases
Revert `is_shard_attestation` and fix test cases backward compatibility.
Remove `test_process_beacon_block_no_shard_transition` and consider it as invalid case.
Use `ShardBlock` in `shard_state_transition`
PR feedback
1. Rename `ShardState.data` -> `ShardState.transition_digest`
2. Rename `compute_shard_transition_data` to `compute_shard_transition_digest`
3. Add `assert state.slot > PHASE_1_GENESIS_SLOT` just in case, may move it later
Add `get_post_shard_state` as a pure function wrapper
PR feedback from Danny and some refactor
1. Add stub `PHASE_1_GENESIS_SLOT`
2. Rename `get_updated_gasprice` to `compute_updated_gasprice`
3. Rename `compute_shard_data_roots` to `compute_shard_body_roots`
Apply shard transition for the skipped slots
Refactor `shard_state_transition`
Get `beacon_parent_root` from offset slot
Add more test
Add `verify_shard_block_message`
Add `> 0`
Keep `beacon_parent_block` unchanged in `is_valid_fraud_proof`
Remove some lines
Fix type
Refactor + simplify skipped slot processing