Commit Graph

118 Commits

Author SHA1 Message Date
Paul Hauner
af1d44e8b0
Add shuffling to fuzzer, fixing a bug
We were being to strict on list length, it can be 2**24 as all index's
will need to be less than that.
2019-02-15 12:58:14 +11:00
Paul Hauner
210ec89b0b
Replace ssz_encode with int_to_bytes32
Only in the relevant places I can think of.. I might have missed some.
2019-02-15 12:21:19 +11:00
Paul Hauner
fc04286ae6
Use int_to_bytes in swap or not.
I also fixed an error I found through strict typing.
2019-02-15 12:13:57 +11:00
Paul Hauner
73484f04a1
Rename eth2_bytes to int_to_bytes 2019-02-15 11:19:25 +11:00
Paul Hauner
46673238b6
Add eth2_bytes crate
Is passing test vectors
2019-02-15 11:13:56 +11:00
Paul Hauner
8c54e55d99
Updates to permutated_index
- Add comments.
- Add more `None` conditions.
- Add more tests.
2019-02-15 00:28:24 +11:00
Paul Hauner
c98a9fdf3e
Update test vectors, align to test vectors. 2019-02-14 23:55:48 +11:00
Paul Hauner
18e85a3cf8
Add swap_or_not_shuffle and tests.
The implementation is not matching the EF implementation at this point.
2019-02-14 18:22:55 +11:00
Paul Hauner
c41b743d2d
Rename vec_shuffle to fisher_yates_shuffle
We're adding another shuffler so it's nice to be specific
2019-02-14 14:57:29 +11:00
Paul Hauner
35c914baa6
Revert "Merge pull request #200 from sigp/new-structure"
This reverts commit d7a3545be1, reversing
changes made to 1da06c156c.
2019-02-14 12:09:18 +11:00
Paul Hauner
1d5ff4359a
Strip out old code
All of these files have been moved to either:

- https://github.com/sigp/lighthouse-beacon
- https://github.com/sigp/lighthouse-validator
- https://github.com/sigp/lighthouse-common

For rationale, see: https://github.com/sigp/lighthouse/issues/197
2019-02-13 14:15:53 +11:00
Paul Hauner
492d4749d7
Fix clippy lint 2019-02-13 10:32:56 +11:00
Paul Hauner
683147035b
Fix clippy lints in block and epoch processing 2019-02-13 10:28:57 +11:00
Paul Hauner
4824b43808
Fix various clippy lints 2019-02-13 07:46:59 +11:00
Paul Hauner
05ed778ccc
Remove unused var from block_producer
It was made redundant when `proposer_slots` was removed.
2019-02-13 07:39:00 +11:00
Paul Hauner
5c1d0dcea5
Fix various clippy lints 2019-02-13 07:32:31 +11:00
Paul Hauner
fef22c31be
Update block_producer to spec v0.2.0 2019-02-12 17:00:10 +11:00
Paul Hauner
5fefc79521
Update BeaconChain for spec v0.2.0 2019-02-12 13:00:52 +11:00
Paul Hauner
36f441c968
Replace genesis crate with on-type defs
The methods in the `gensis` crate have been moved to `genesis` methods
on `BeaconState` and `BeaconBlock`.
2019-02-12 13:00:35 +11:00
Paul Hauner
cb97870c15
Add genesis() function to BeaconBlock 2019-02-12 11:57:34 +11:00
Paul Hauner
f27308e377
Tidy old comments 2019-02-12 11:57:20 +11:00
Paul Hauner
3b75e93122
Add genesis() to BeaconState 2019-02-12 11:54:02 +11:00
Paul Hauner
f3e556bca3
Remove validator_induction crate 2019-02-12 09:02:26 +11:00
Paul Hauner
ff2025ec5c
Update epoch processing to v0.2.0 2019-02-12 08:58:20 +11:00
Paul Hauner
c1f8c85ce9
Add un-finished, uncompiling state_processing 2019-02-11 17:25:23 +11:00
Paul Hauner
03e84a63ec
Tidy BeaconState 2019-02-11 17:24:56 +11:00
Paul Hauner
75a9e0f3de
Add verify_signature() to Attestation 2019-02-11 17:24:32 +11:00
Paul Hauner
25ae0f64c2
Tidy, fix & extend BeaconState impls. 2019-02-11 16:32:55 +11:00
Paul Hauner
d7f8c60f93
Fix un-annotated test in types crate 2019-02-11 16:31:33 +11:00
Paul Hauner
a13dd0d871
Update types defs, move processing out.
- Update `types` to v0.2.0 spec (not all functions upgraded too).
- Move slot/block/epoch processing out to a separate crate (not included
yet, it doesn't compile)
2019-02-11 14:02:59 +11:00
Paul Hauner
ba7137697c
Add impl_common to slot_epoch.rs 2019-02-07 13:53:30 +11:00
Paul Hauner
7583599e65
Add tests for Slot/Epoch types 2019-02-07 13:44:48 +11:00
Paul Hauner
85450ec254
Fix all compile errors from new Slot/Epoch types 2019-02-07 11:22:48 +11:00
Paul Hauner
b865768d3b
Update validator_inductor to use Slot newtype 2019-02-07 09:54:45 +11:00
Paul Hauner
a98c221447
Add new fn to Slot and Epoch 2019-02-07 09:53:53 +11:00
Paul Hauner
bd71304d73
Convert beacon_state to Slot/Epoch newtypes 2019-02-06 13:17:10 +11:00
Paul Hauner
2aa7d80a5f
Update types to use Slot newtype
All dependant functions haven't yet been updated.
2019-02-05 19:27:12 +11:00
Paul Hauner
dbe9112848
Add first impl of Slot and Epoch newtypes
Not tested yet.
2019-02-05 19:15:26 +11:00
Paul Hauner
6c6ee4320d
Fix block_producer naming to match attester 2019-02-05 16:47:59 +11:00
Paul Hauner
49dcb38c31
Fix naming consistency with attester crate.
Adjusted naming of files to ensure they match the name of the struct.
Also change the name of some structs so they don't look like tests.
2019-02-05 16:41:18 +11:00
Paul Hauner
da1498fc45
Remove validator_shuffling crate.
It has been replaced by the `beacon_state.get_shuffling` function.
2019-02-05 12:48:07 +11:00
Paul Hauner
87a326d8a2
Complete canonical_root for attestation_data 2019-02-05 12:41:56 +11:00
Paul Hauner
cbb84c0d69
Move all attestation_data fns into same file 2019-02-05 12:40:03 +11:00
Paul Hauner
05b890860a
Move all attestaion fns into same file 2019-02-05 12:38:58 +11:00
Paul Hauner
b9dc8437c9
Move all beacon_block fns into the same file 2019-02-05 12:33:52 +11:00
Paul Hauner
ade2460377
Move all beacon_state fns into single file. 2019-02-05 12:25:42 +11:00
Paul Hauner
0120082f6b
Merge branch 'master' into add-chain-benchmarks 2019-02-05 05:49:45 +11:00
Paul Hauner
bd1cfeeba9
Change bls import method for validator 2019-02-05 03:52:34 +11:00
Paul Hauner
dcb507ca18
Remove unused errors from genesis crate 2019-02-05 03:51:24 +11:00
Paul Hauner
aad3b3dc7a
Merge spec into types crate.
Also remove some pre-2018 `extern crate` calls.
2019-02-01 19:05:39 +11:00