Paul Hauner
ede5685bc2
Fix warnings and clippy lints
2019-03-03 11:47:09 +11:00
Paul Hauner
59128f842a
Add verify_slashable_attestation
spec method
...
As per v0.2.0 spec
2019-03-03 11:16:59 +11:00
Paul Hauner
e2dd753f05
Merge branch 'master' into yaml-chain-tests
2019-03-02 20:18:09 +11:00
Paul Hauner
4db2f082e1
Add state-checks to test_harness YAML
...
Runs tests against a state at some slot
2019-03-02 20:17:14 +11:00
Paul Hauner
c975d49ead
Copy SlashableVote.. tests to SlashableAttestation
...
SlashableVoteData tests were just copied directly across
2019-03-02 18:39:52 +11:00
Paul Hauner
8e1380d7c4
Add ProposerSlashingBuilder
...
It is capable of producing double votes
2019-03-02 18:36:44 +11:00
Paul Hauner
bb4d392a98
Add AttestationSlashingBuilder
2019-03-02 16:05:45 +11:00
Paul Hauner
f3a3cfcc45
Add surround/dbl vote fns to SlashableAttestation
...
Copied from `SlashableVoteData`
2019-03-02 15:33:52 +11:00
Paul Hauner
22d59a70cc
Add debug message when validator is penalized
2019-03-02 11:27:12 +11:00
Paul Hauner
c3b2f802a7
Add fast full-list shuffle for swap-or-not
...
- Passes test vectors
- Implemented in beacon state
- Added more docs
2019-03-01 12:19:05 +11:00
Paul Hauner
8aa7f25bbc
Introduce faster swap-or-not whole-list shuffle
2019-03-01 01:47:40 +11:00
Paul Hauner
e0926dcd8d
Change log msgs in BeaconState
...
Make it louder when shuffling happens, also when deposits are being
processed.
2019-02-28 23:10:40 +11:00
Paul Hauner
7108d057fb
Set BeaconState
to process deposits in parallel
...
Provides a large speed improvement.
2019-02-28 23:09:21 +11:00
Paul Hauner
04f179243e
Fix type in BeaconStateBuilder
comments
2019-02-26 22:35:51 +13:00
Paul Hauner
c2fb095759
Add docstrings to BeaconStateBuilder
2019-02-26 22:34:41 +13:00
Paul Hauner
af17fb1d03
Update BeaconStateBuilder
API
2019-02-26 22:00:07 +13:00
Paul Hauner
931da13545
Add drop_cache
fn to BeaconState
...
Permits clearing an epoch cache.
2019-02-26 20:18:20 +13:00
Paul Hauner
f82c4268e2
Split BeaconState::genesis
into two functions
...
This allows us to build a genesis state without inducting all the
validators. This will be a signigicant speed up for tests as we can
avoid generating keypairs and checking proof-of-possessions.
2019-02-26 20:16:14 +13:00
Age Manning
d140563545
Merge pull request #259 from sigp/bench-epoch-trans
...
Add benching and test for epoch processing
2019-02-26 16:43:24 +11:00
Paul Hauner
65d303c500
Fix failing tests
2019-02-26 17:20:43 +13:00
Paul Hauner
e97b554485
Run rustfmt
2019-02-26 16:50:04 +13:00
Paul Hauner
9f846eda26
Fix clippy lint
2019-02-26 16:49:17 +13:00
Paul Hauner
53663e54b5
Fix error with get_permutated_index.
...
Error types were modified. Error involved shuffling with the _value_of
active validator indicies, not an _index_.
2019-02-26 16:26:06 +13:00
Paul Hauner
59d6b1fdd0
Move BeaconStateBuilder
out of test mods
...
This allows it to be accessed by other crates/tests.
2019-02-26 16:25:08 +13:00
thojest
6e8fc1b6d0
resolved merge conflicts due to Treehash macro implementation (lighthouse-246)
2019-02-25 23:20:24 +01:00
mjkeating
c688e37693
merged master
2019-02-25 09:46:49 -08:00
mjkeating
d7184345b8
renamed the macro Hashtree to TreeHash
2019-02-25 09:17:17 -08:00
thojest
9a892bbdfd
removed TestRandom import in beacon_state (lighthouse-246)
2019-02-25 09:26:43 +01:00
thojest
cd4346962a
Merge branch 'master' into lighthouse-246
2019-02-25 09:24:47 +01:00
mjkeating
2ce316235f
merged master and resolved beacon_state conflict
2019-02-24 16:54:26 -08:00
Kirk Baird
4c3b0a6575
Formatting
2019-02-25 10:38:04 +11:00
Kirk Baird
f72b45147a
Merge conflicts from master
2019-02-25 10:36:54 +11:00
Age Manning
27e7bbd72f
Fix typo in BeaconState
...
Co-Authored-By: paulhauner <paul@paulhauner.com>
2019-02-25 08:35:21 +13:00
Paul Hauner
5ca7c9929a
Merge branch 'master' into beacon-state-caching
2019-02-24 19:14:05 +13:00
Paul Hauner
ab10cbbdb5
Fix clippy lints, small typos
2019-02-24 18:52:12 +13:00
Paul Hauner
c49f425fe8
Tidy, add comments to BeaconState
2019-02-24 18:25:17 +13:00
Paul Hauner
779b6266a5
Ensure shuffling is cached between slot calcs
...
Previously it was being re-built for every slot, now it is being
generated once-per-epoch.
2019-02-23 18:45:32 +13:00
Kirk Baird
a5cbda0b60
Merge branch 'master' into signature-scheme-update
2019-02-23 13:34:57 +11:00
mjkeating
f95a0134e6
now using the Hashtree macro for most struct types
2019-02-22 13:07:04 -08:00
thojest
66b5accdc2
replaced manual TestRandom implementation with macro when possible; fixed typo in TestRandom macro (lighthouse-246)
2019-02-22 17:10:26 +01:00
Paul Hauner
7a28893bab
Fix bug in Epoch.slot_iter()
...
It wasn't running the whole range, plus it could get into a loop when
used near the u64::max_value
2019-02-22 18:48:35 +13:00
Paul Hauner
89ab0f683e
Change "few_validators" spec to be 8 shards.
...
A bug arises when the number of shards is less than the slots in an
epoch.
2019-02-22 18:19:47 +13:00
Paul Hauner
a5de6a1915
Add caching to BeaconState.
...
Removes CachingBeaconState
2019-02-22 18:14:16 +13:00
Paul Hauner
cdc03f1749
Remove FastBeaconState
2019-02-22 17:55:36 +13:00
Paul Hauner
c040ed7b11
Merge pull request #243 from sigp/fork-choice-tests
...
Fork choice tests
2019-02-22 13:34:58 +13:00
Paul Hauner
b211e39331
Add progress on FastBeaconState
2019-02-21 19:00:55 +13:00
Kirk Baird
673c8ea388
Merge current master
2019-02-20 13:59:11 +11:00
Age Manning
2fbdc53147
Add asserts to ensure block heights are not too large.
2019-02-20 12:36:54 +11:00
Paul Hauner
586bb09e02
Set ssz_derive to import from ssz::
...
Previously it was expecting `Encodable`, `Decodable`, etc to be in
scope, now it uses `ssz::Encodable`.
2019-02-20 11:06:03 +13:00
Paul Hauner
a78256c778
Merge branch 'master' into ssz-derive
2019-02-19 20:46:47 +13:00