Commit Graph

41 Commits

Author SHA1 Message Date
Hsiao-Wei Wang 64412be0d7
Minor update ToC 2020-12-07 11:10:19 +08:00
Hsiao-Wei Wang f1e4b3c88b
Refactor shard_state_transition 2020-10-15 16:14:01 +08:00
protolambda 708827413f
cleanup phase1 TOC contents 2020-09-23 22:55:22 +02:00
ericsson 7674c76b61 get rid of `.message` as `block` is `ShardBlock` already 2020-07-01 17:23:05 +03: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 79b6bc616d
PR feedback from danny 2020-06-25 10:58:04 +08:00
Hsiao-Wei Wang 661959c13e
Add `process_shard_block` verification 2020-06-24 18:18:50 +08:00
Hsiao-Wei Wang 4a46fb2a8a
Refactor phase 1 block tests a bit and add `shard_state_transition`
tests

1. Refacotr phase1/sanity/test_blocks.py
2. Add phase1/sanity/test_shard_blocks.py for testing `verify_shard_block_message` and `verify_shard_block_signature`
2020-06-24 18:08:26 +08:00
Hsiao-Wei Wang dbd1d4e589
PR feedback: Enable `verify_shard_block_signature` 2020-06-24 12:22:24 +08:00
Hsiao-Wei Wang db5da9dc97
Fix return type
Co-authored-by: Danny Ryan <dannyjryan@gmail.com>
2020-06-23 10:50:41 +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
Danny Ryan 05453b786d
Merge pull request #1895 from ethereum/hwwhww/attestation-shard
Add `shard: Shard` field to `AttestationData`
2020-06-18 09:37:07 -06:00
Hsiao-Wei Wang 8cf0774290
Fix shard_block_length type in `compute_updated_gasprice` 2020-06-18 20:39:29 +08:00
Hsiao-Wei Wang 3ee0761d17
Add `shard: Shard` field to `AttestationData` 2020-06-16 00:17:49 +08:00
Hsiao-Wei Wang dacf86a5c0
Remove `transition_digest` 2020-06-10 02:43:59 +08:00
Danny Ryan 65a739fe41
Merge branch 'dev' into phase1-validator 2020-06-08 15:50:51 -06: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 a4cc189f2b
Apply PR feedback from Danny 2020-06-06 05:19:46 +08:00
Hsiao-Wei Wang a71c0a5ccc
Per #1704 discussion, remove `on_time_slot`: the given `beacon_state`
should be transitioned.
2020-06-06 02:39:47 +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 727353c054
Verify shard_block.slot fits the expected offset_slots 2020-06-06 02:39:10 +08:00
Hsiao-Wei Wang d344521741
Bugfix: should set `shard` for empty proposal 2020-06-04 05:30:13 +08:00
Danny Ryan b1ff00aab0
Merge branch 'dev' into phase1-validator 2020-06-03 12:18:17 -06:00
Danny Ryan 74204f795d
udpate validator guide to work with all updated phase 1 constructions 2020-06-03 12:16:39 -06:00
terence tsao 24427947b1
Moved transition_digest to last 2020-06-02 08:09:43 -07:00
terence tsao 2a218520a1
Tidying up `shard_state_transition` 2020-06-01 14:31:45 -07:00
Hsiao-Wei Wang 9b9507c138
Merge branch 'dev' into hwwhww/phase1_refactor_part2 2020-05-30 03:11:28 +08:00
Hsiao-Wei Wang 7509ecb742
Add comments, minor refactoring 2020-05-29 00:13:08 +08:00
Hsiao-Wei Wang c437578280
Add `shard` field to `ShardBlock` 2020-05-28 21:32:27 +08:00
ericsson d3c26d6b8b `compute_shard_transition_digest` expects `Root` as a fourth parameter 2020-05-25 18:45:38 +03:00
Danny Ryan 095b87c2a2
Merge branch 'dev' into v012x 2020-05-19 10:02:18 -06:00
Danny Ryan 665538253a
Merge pull request #1807 from ericsson49/ericcson49/fix_is_valid_fraud_proof
is_valid_fraud_proof bug fixes
2020-05-18 13:37:13 -06:00
Danny Ryan 6f685a97e2
Merge branch 'dev' into v012x 2020-05-18 09:29:47 -06:00
terence tsao 6f5cbe6182
Update shard-transition.md 2020-05-14 14:55:29 -07:00
Hsiao-Wei Wang aa436d91b2
Use NO_SIGNATURE (0x00...) approach 2020-05-14 22:25:55 +08:00
ericsson b41410eade lint problem fixed 2020-05-13 16:25:16 +03:00
ericsson 4431e399b1 Fix bugs:
- `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]`
2020-05-13 16:13:33 +03:00
Hsiao-Wei Wang cdd0ed0f7b
Update to IETF BLS draft-irtf-cfrg-bls-signature-02 2020-05-09 11:48:48 +08:00
Hsiao-Wei Wang 4558c7db4e
Reorg the file structure 2020-05-02 02:32:37 +08:00
Hsiao-Wei Wang b43e24acb6
specs/phase1/fraud-proofs.md -> specs/phase1/shard-transition.md 2020-05-02 02:32:37 +08:00