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
ff2783a1cb
Add AttesterSlashing to test_harness
...
- Adds methods to BeaconChainHarness
- Adds YAML parsing
2019-03-02 15:35:02 +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
c885e36a93
Add fn to BeaconChainHarness validator signing
...
Signs some message using the priv key of some validator
2019-03-02 15:30:50 +11:00
Paul Hauner
ec5581ce1d
Shorten test_harness YAML to single test
2019-03-02 15:28:01 +11:00
Paul Hauner
22d59a70cc
Add debug message when validator is penalized
2019-03-02 11:27:12 +11:00
Paul Hauner
867dce34cd
Remove domain constants from block_processable
...
The information is gather from the `spec` object, not the constants.
2019-03-02 11:26:39 +11:00
Paul Hauner
7f1e40a8c6
Add proposer slashing support to test_harness
...
Test harness will now add signatures to a ProposerSlashing and submit it
to the BeaconChain
2019-03-02 11:25:55 +11:00
Paul Hauner
fd819fb7ca
Set BeaconChain block propose failure log to warn
...
It think it's more suitable to a warn
2019-03-02 11:24:41 +11:00
Paul Hauner
1de723b275
Add proposer/attester slash queues to BeaconChain
...
Allows for storing and including AttesterSlashing and ProposerSlashing
objects in blocks.
2019-03-02 11:23:37 +11:00
Paul Hauner
b0403707eb
Add support for deposits to test_harness
2019-03-01 16:59:55 +11:00
Paul Hauner
c278c08e34
Remove unnecessary clone.
2019-03-01 16:57:24 +11:00
Paul Hauner
eeeff9ef02
Ensure chain-dumps come with earliest block first
...
Previously dump.first() was the latest block. IMO, this is
counter-intuitive
2019-03-01 16:56:52 +11:00
Paul Hauner
1097c8089b
Add naive deposit-handling to BeaconChain
2019-03-01 16:56:27 +11:00
Paul Hauner
1479013bd0
Add skip_slots to test_harness yaml processor
2019-03-01 13:28:07 +11:00
Paul Hauner
8b06fa31da
Add basic YAML test_harness tests
...
Works, however ignores a lot of fields in the YAML.
2019-02-28 23:13:00 +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
Age Manning
ed032dddea
Merge pull request #261 from sigp/epoch-benches
...
Move epoch benches to 16k validators
2019-02-27 12:39:31 +11:00
Age Manning
274458d41e
Merge pull request #260 from sigp/shuffle-bench
...
Add benchmarks to shuffling crates
2019-02-27 12:37:30 +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
3ff8f6ebb3
Update epoch trans. tests to us 16,384 validators
2019-02-26 22:25:29 +13:00
Paul Hauner
af17fb1d03
Update BeaconStateBuilder
API
2019-02-26 22:00:07 +13:00
Paul Hauner
5cfc9cb21d
Test state processing with and w/o caches
2019-02-26 20:18:59 +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
Paul Hauner
a8ebc0e19c
Add benchmarks for fisher_yates_shuffle
2019-02-26 19:32:32 +13:00
Paul Hauner
0fe3a81c9e
Add benches to swap_or_not_shuffle
2019-02-26 19:30:51 +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
906131f882
Add tests and benches for epoch processing
2019-02-26 16:27:42 +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
Paul Hauner
45c6e0395f
Merge pull request #250 from thojest/lighthouse-246
...
Lighthouse 246 - Create derive macro for TestRandom
2019-02-26 15:14:48 +13:00
thojest
6e8fc1b6d0
resolved merge conflicts due to Treehash macro implementation (lighthouse-246)
2019-02-25 23:20:24 +01:00
Paul Hauner
87ea95ce35
Merge pull request #251 from mjkeating/tree_hash_macro
...
Use Hashtree macro for most struct types
2019-02-26 09:14:37 +13: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
Paul Hauner
26827c60a3
Merge pull request #240 from sigp/signature-scheme-update
...
Signature scheme update
2019-02-25 20:56:26 +13: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
Paul Hauner
548d768b02
Merge pull request #249 from sigp/beacon-state-caching
...
State caching as a first-class citizen
2019-02-25 08:35:36 +13:00
Age Manning
27e7bbd72f
Fix typo in BeaconState
...
Co-Authored-By: paulhauner <paul@paulhauner.com>
2019-02-25 08:35:21 +13:00