Grant Wuerker
d3ec313b43
a few more quick changes and another range loop ignore
2018-10-20 17:38:32 -05:00
Grant Wuerker
869049d099
needless_range ignore and derive[default] tag on sszstream
2018-10-20 17:29:12 -05:00
Grant Wuerker
e714ec0489
cast_lossless warning supressed and better looking vectors
2018-10-20 17:04:17 -05:00
Grant Wuerker
9c1d34253a
refactoring of impl_decodable_for_uint
2018-10-20 15:15:58 -05:00
Grant Wuerker
ba65bdfc6a
redundant if and type conversion change
2018-10-20 14:20:23 -05:00
pinkiebell
5252b54a04
beacon_chain/utils/shuffling: Introduce test vectors from sigp/shuffling_sandbox
...
Also:
- return early if we shuffle an empty list
- change RAND_MAX as per spec
2018-10-20 18:44:39 +02:00
Paul Hauner
5d85c62f6e
Finish implementing genesis (without tests)
2018-10-20 21:42:07 +11:00
Paul Hauner
f17d6db5e9
Merge branch 'validator_induction' into genesis
2018-10-20 21:29:55 +11:00
Paul Hauner
f495ed845b
Change ValidatorInductor to own instead of borrow
2018-10-20 21:28:57 +11:00
Paul Hauner
a60fd784e6
Merge branch 'validator_induction' into genesis
2018-10-20 21:01:50 +11:00
Paul Hauner
a8179897a9
Add to_ref method for inductor
2018-10-20 21:01:35 +11:00
Paul Hauner
2e7d6c0af3
Merge branch 'validator_induction' into genesis
2018-10-20 19:18:39 +11:00
Paul Hauner
99ce9a2dd2
Add new method for ValidatorInductor
2018-10-20 19:18:16 +11:00
Paul Hauner
eaf1198ec4
Add more half-finished genesis code
2018-10-20 19:02:15 +11:00
Paul Hauner
bb75e30ff2
Fix error in CrystallizedState definition
2018-10-20 19:02:02 +11:00
Paul Hauner
7508bfca6a
Change error handining in validator_shuffling
2018-10-20 18:10:41 +11:00
Paul Hauner
a8d2b20570
Update CrystallizedState
as per new spec.
2018-10-20 17:15:53 +11:00
Paul Hauner
de8b84f9cd
Update ActiveState
as per new spec
2018-10-20 17:15:36 +11:00
Paul Hauner
073e3529e9
Add half-finished chain code
2018-10-20 16:34:08 +11:00
Paul Hauner
606c32950d
Move shuffling functions around
...
- Move `delegation` from the `transition` dir into its own dir:
`beacon_chain/validator_shuffling`
- Rename `beacon_chain/utils/shuffling` -> `vec_shuffle`
2018-10-20 16:30:32 +11:00
Paul Hauner
b4566a776a
Add validator induction functionality
2018-10-20 03:11:45 +11:00
Paul Hauner
d5675062c1
Add proof-of-possession hash fn
2018-10-20 03:09:42 +11:00
Paul Hauner
f00b39dd3c
Remove dynasty from delegation fn
2018-10-20 02:36:55 +11:00
Paul Hauner
725741307a
Update validator record to new spec
2018-10-20 02:16:52 +11:00
Paul Hauner
1acfb87e77
Merge branch 'master' into beacon_block
2018-10-18 10:14:55 +11:00
Paul Hauner
2fb9dfbf14
Merge pull request #33 from sigp/validation
...
Add block and attestation validation
2018-10-18 10:07:06 +11:00
Paul Hauner
fa705229aa
Fix clippy lints
2018-10-16 15:24:50 +11:00
Paul Hauner
c3d88a7e80
Update validation as per new spec
...
- Block -> BeaconBlock
- Updates to SszBeaconBlock
2018-10-16 13:59:45 +11:00
Paul Hauner
c45e05ca02
Update SszBeaconBlock as per new spec
2018-10-16 13:59:26 +11:00
Paul Hauner
f31d41e123
Implement SSZ decode for BeaconBlock, fix encode
2018-10-16 13:47:28 +11:00
Paul Hauner
1621901f0d
Update SSZ
...
- Implement generic list decoding>
- Expose `encode` mod.
- Add convenience encoding function.
2018-10-16 13:44:26 +11:00
Paul Hauner
e91317ca27
Change SpecialRecord to use u8 instead of enum
2018-10-15 16:26:40 +11:00
Paul Hauner
cd05616efa
Merge branch 'validation' into beacon_block
2018-10-15 15:29:29 +11:00
Paul Hauner
e289d8b5fd
Fix comment in attestation_validation
2018-10-15 15:08:43 +11:00
Paul Hauner
a862c82b37
Rename Block -> BeaconBlock
...
- Update types::block
- Update ssz_helpers::SszBlock
- Update db::stores::block_store
- Add new fields to types::Block
- Update SszBlock as per new Block fields
2018-10-15 14:57:14 +11:00
Paul Hauner
561167fa1e
Fix panic in ssz decode
2018-10-15 14:10:43 +11:00
Paul Hauner
064e87a347
Add SpecialRecord struct
2018-10-15 12:05:36 +11:00
Paul Hauner
90010ced55
Fix big in attestation validation
...
There was no check that the attestation is within an appropriate
distance from its parent block.
2018-10-13 09:39:10 +11:00
Paul Hauner
e8daca4c80
Ensure that parent_block.slot < block.slot
2018-10-12 20:54:33 +11:00
Paul Hauner
1f089d423e
Ensure attestation val. check parent.slot
...
As per comments by Danny Ryan on PR#33
2018-10-12 20:41:18 +11:00
Paul Hauner
b5441535ba
Add comment regarding tightening block val.
...
Comment was suggested by Danny R.
2018-10-12 19:30:52 +11:00
Paul Hauner
68ca51c7ac
Fix "indicies" type
2018-10-12 00:55:29 +11:00
Paul Hauner
3139d0e5da
Replace hashmap with hashset
2018-10-12 00:53:56 +11:00
Paul Hauner
6ef4268d6d
Verify attestation justified_block_hash.
...
Previously there was not a check that the hash was in the chain, just
that it was known (in the database in any chain)
2018-10-12 00:41:47 +11:00
Paul Hauner
9717698f7b
Break split function into its own crate.
...
- Added tests
- Remove it from the delegation dir
- Added it as a crate in utils
2018-10-10 16:09:00 +11:00
Age Manning
ddc8037487
Merge branch 'master' into shuffling
2018-10-10 14:41:49 +11:00
Age Manning
6417ecd464
Correct comments for rust docs
2018-10-10 14:04:42 +11:00
Paul Hauner
739abc0bbd
Merge branch 'master' into validation
2018-10-09 18:28:35 +11:00
Paul Hauner
cf9f8c1e85
Fix issue with last_justified_block_hash
...
Previously we were just checking it exists in the DB. This is incorrect
because the last_justified_block_hash _must_ be in the chain referenced
by the block.
I.e., it's not OK for a block to reference a justified block in another
chain.
2018-10-09 12:14:59 +11:00
Paul Hauner
f13a4fffea
Fix a type in sig. ver. comment
2018-10-09 11:09:37 +11:00
Paul Hauner
9a59908506
Rename voted_hashmap to voted_hashset
2018-10-09 11:08:09 +11:00
Paul Hauner
a998ac2a12
Add InvalidBitfieldEndBits tests
2018-10-09 11:05:40 +11:00
Age Manning
14e12db374
Updates validation tests for clippy modifications
2018-10-05 14:53:21 +10:00
Age Manning
fd01ffc2a1
Removes block_hash.rs and adds minor clippy fixes
2018-10-05 14:51:16 +10:00
Paul Hauner
e2d45eafae
Separate parent block checking and proposer checking
2018-10-04 15:43:17 +10:00
Age
fd0de57aa7
Remove dead code
2018-10-04 14:51:27 +10:00
Paul Hauner
c30a9a7565
Update comment for rejecting future block
...
As per Danny's request
2018-10-04 14:46:05 +10:00
Age
1858b2d32b
Corrects cycle tests
2018-10-04 13:21:16 +10:00
Age
874a0babbb
Converts split function into an iterable trait
2018-10-03 23:37:54 +10:00
Age
c8d5f00d7c
Improve split function
2018-10-03 21:57:21 +10:00
Age Manning
229351b38e
Adds list splitting function and begins delegation testing
2018-10-03 18:47:18 +10:00
Age Manning
57e3f8c465
Correct get_new_shuffling. Closes #25
2018-10-03 15:41:04 +10:00
Age Manning
e79a1341e9
add delegation logic to transition crate
2018-10-03 15:26:41 +10:00
Age Manning
d15b1d066d
Create transition crate
2018-10-03 15:25:15 +10:00
Age Manning
9fac739df1
Merge branch 'master' into shuffling
2018-10-03 15:05:18 +10:00
Paul Hauner
eca4448207
Remove test vectors
...
These will be added in a future PR.
2018-10-03 13:45:57 +10:00
Paul Hauner
6d4a3bba11
Update shuffling comments
2018-10-03 13:43:46 +10:00
Paul Hauner
2763f7bc00
Move shuffling to its own crate, update hash fn
...
Previously blake2s-256 was being used, now blake2b-512[:32] is being
used.
2018-10-03 13:43:28 +10:00
Age
2a1433d329
moved code from Paul's get_new_shuffling branch
2018-10-03 00:02:53 +10:00
Paul Hauner
49737fbc82
Add doc comments to attestation validation
2018-10-02 17:58:33 +10:00
Paul Hauner
50d7252cd0
Remove failing benchmarks
2018-10-02 17:45:37 +10:00
Paul Hauner
eaa694bced
Deleted some unnecessary files
2018-10-02 17:44:47 +10:00
Paul Hauner
117a207d49
Add pre-written validation code
...
This adds block and attestation validation code that was written
previously. There were many non-validation specific changes made whilst
building these functions (e.g., db, hashing, etc) -- these changes have
already been merged into master and this branch has been created just to
make it easy to review this code.
2018-10-02 17:35:03 +10:00
Paul Hauner
0fbe4179b3
Heavily restructure repo
...
Separate most modules into crates
2018-10-02 16:41:10 +10:00