Commit Graph

262 Commits

Author SHA1 Message Date
Paul Hauner
94122a7334
Add SignedRoot methods 2019-03-04 15:47:48 +11:00
Paul Hauner
4a57aec472
Unfinished progress 2019-03-04 14:24:29 +11:00
Age Manning
0e1a14a628
Merge pull request #264 from sigp/yaml-chain-tests
YAML-defined test_harness routines
2019-03-04 13:19:25 +11:00
Paul Hauner
ef549aa38b
Merge pull request #273 from mjkeating/tree_hash_container_fix
Brought algorithm in TreeHash macro up to spec
2019-03-03 20:01:47 +13:00
Paul Hauner
ec0e13b764
Add comments to new functions 2019-03-03 15:32:44 +11:00
Age Manning
60cfdf6e55
Convert bitwise ghost to use u64 block heights. 2019-03-03 13:35:15 +11:00
Paul Hauner
ede5685bc2
Fix warnings and clippy lints 2019-03-03 11:47:09 +11:00
Paul Hauner
76a0ba2d6c
Add attester slashing support to block processing
At spec v0.2.0
2019-03-03 11:18:12 +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
3561d44cbe
Update per-block processing for new AggPub wrapper
AggregatePublicKey newtype was introduced in previous commit
2019-03-03 11:12:18 +11:00
Paul Hauner
35ae1b6745
Add agg_pub to bls, add agg_sig.verify_multiple
- Adds a new-type wrapper for `AggregatePublicKey`, just like all the
other types.
- Adds the `verify_multiple` method to the `AggregateSignature` newtype,
as was introduced in a recent version of signature-schemes.
2019-03-03 11:10:38 +11:00
mjkeating
8a768819b0 brought algorithm in TreeHash macro to spec 2019-03-02 09:59:01 -08: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
Michael Sproul
6795aa42b2 Fix log_int implementation, removing floats
The cast from f32::MAX to u32 was undefined behaviour, and the use of floating
point logarithms would yield incorrect results due to rounding and truncation,
e.g. for the integer 16777206
2019-03-02 15:52:33 +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
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
1097c8089b
Add naive deposit-handling to BeaconChain 2019-03-01 16:56:27 +11:00
Paul Hauner
8671c5790c
Merge pull request #268 from sigp/fork-choice-corrections
Correct bitwise fork-choice rule.
2019-03-01 18:34:44 +13:00
Age Manning
c1f8ebeca1
Merge pull request #266 from sigp/faster-swap-or-not
Faster swap-or-not for full list shuffles.
2019-03-01 15:45:20 +11:00
Age Manning
13c957bef7
Correct bitwise fork-choice rule. 2019-03-01 14:38:07 +11:00
Paul Hauner
fe7c475207
Merge pull request #265 from sigp/more-readmes
Readme updates
2019-03-01 16:36:34 +13:00
Luke Anderson
3753782c40
Just some small gramatical improvements on READMEs 2019-03-01 13:10:50 +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
8842adb53b
Fix typos in READMEs 2019-03-01 00:25:11 +11:00
Paul Hauner
6fac35a7c5
Update main readme, add eth2/ readme 2019-03-01 00:18:53 +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
073be906da
Remove cache operations from epoch processing.
- Don't build the next cache at all.
- Call `advance_caches()` in per-slot processing.
2019-02-28 16:37:12 +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