Commit Graph

47 Commits

Author SHA1 Message Date
Michael Sproul
869b0621d6
Update benchmarks, add to CI (#988) 2020-04-06 20:16:08 +10:00
pscott
7396cd2cab Fix clippy warnings (#813)
* Clippy account manager

* Clippy account_manager

* Clippy beacon_node/beacon_chain

* Clippy beacon_node/client

* Clippy beacon_node/eth1

* Clippy beacon_node/eth2-libp2p

* Clippy beacon_node/genesis

* Clippy beacon_node/network

* Clippy beacon_node/rest_api

* Clippy beacon_node/src

* Clippy beacon_node/store

* Clippy eth2/lmd_ghost

* Clippy eth2/operation_pool

* Clippy eth2/state_processing

* Clippy eth2/types

* Clippy eth2/utils/bls

* Clippy eth2/utils/cahced_tree_hash

* Clippy eth2/utils/deposit_contract

* Clippy eth2/utils/eth2_interop_keypairs

* Clippy eth2/utils/eth2_testnet_config

* Clippy eth2/utils/lighthouse_metrics

* Clippy eth2/utils/ssz

* Clippy eth2/utils/ssz_types

* Clippy eth2/utils/tree_hash_derive

* Clippy lcli

* Clippy tests/beacon_chain_sim

* Clippy validator_client

* Cargo fmt
2020-01-21 18:38:56 +11:00
pscott
7eb82125ef Clippy clean (#536)
* Change into_iter to iter

* Fix clippy 'easy' warnings

* Clippy eth2/utils

* Add struct NetworkInfo

* Clippy for types, utils, and beacon_node/store/src/iters.rs

* Cargo fmt

* Change foo to my_foo

* Remove complex signature

* suppress clippy warning for unit_value in benches

* Use enumerate instead of iterating over range

* Allow trivially_copy_pass_by_ref in serde_utils
2019-09-30 13:58:45 +10:00
Paul Hauner
6311b13169
Add ssz benches to state processing 2019-09-08 13:42:38 -04:00
Paul Hauner
bcffe42712
Bulk signature verification (#507)
* Add basic block processing benches

* Start reviving state processing benches

* Fix old block builders

* Add optimization for faster pubkey add

* Tidy benches, add another

* Add extra block processing bench

* Start working on faster BLS scheme

* Add partially complete sig verify optimization

* Add .gitignore to state processing

* Add progress on faster signature verification

* Fix SignatureSet for fake_crypto

* Tidy attester slashings sig set

* Tidy bulk signature verifier

* Refactor signature sets to be cleaner

* Start threading SignatureStrategy through code

* Add (empty) test dir

* Move BenchingBlockBuilder

* Add initial block signature verification tests

* Add tests for bulk signature verification

* Start threading SignatureStrategy in block proc.

* Refactor per_block_processing errors

* Use sig set tuples instead of lists of two

* Remove dead code

* Thread VerifySignatures through per_block_processing

* Add bulk signature verification

* Introduce parallel bulk signature verification

* Expand state processing benches

* Fix additional compile errors

* Fix issue where par iter chunks is 0

* Update milagro_bls dep

* Remove debugs, code fragment in beacon chain

* Tidy, add comments to block sig verifier

* Fix various PR comments

* Add block_root option to per_block_processing

* Fix comment in block signature verifier

* Fix comments from PR review

* Remove old comment

* Fix comment
2019-08-29 11:34:25 +10:00
Paul Hauner
81a089aa8b
Remove old benches (#465)
* Remove cached_tree_hash benches

* Remove state_processing benches
2019-07-30 17:19:03 +10:00
Michael Sproul
a236003a7b Update to frozen spec ❄️ (v0.8.1) (#444)
* types: first updates for v0.8

* state_processing: epoch processing v0.8.0

* state_processing: block processing v0.8.0

* tree_hash_derive: support generics in SignedRoot

* types v0.8: update to use ssz_types

* state_processing v0.8: use ssz_types

* ssz_types: add bitwise methods and from_elem

* types: fix v0.8 FIXMEs

* ssz_types: add bitfield shift_up

* ssz_types: iterators and DerefMut for VariableList

* types,state_processing: use VariableList

* ssz_types: fix BitVector Decode impl

Fixed a typo in the implementation of ssz::Decode for BitVector, which caused it
to be considered variable length!

* types: fix test modules for v0.8 update

* types: remove slow type-level arithmetic

* state_processing: fix tests for v0.8

* op_pool: update for v0.8

* ssz_types: Bitfield difference length-independent

Allow computing the difference of two bitfields of different lengths.

* Implement compact committee support

* epoch_processing: committee & active index roots

* state_processing: genesis state builder v0.8

* state_processing: implement v0.8.1

* Further improve tree_hash

* Strip examples, tests from cached_tree_hash

* Update TreeHash, un-impl CachedTreeHash

* Update bitfield TreeHash, un-impl CachedTreeHash

* Update FixedLenVec TreeHash, unimpl CachedTreeHash

* Update update tree_hash_derive for new TreeHash

* Fix TreeHash, un-impl CachedTreeHash for ssz_types

* Remove fixed_len_vec, ssz benches

SSZ benches relied upon fixed_len_vec -- it is easier to just delete
them and rebuild them later (when necessary)

* Remove boolean_bitfield crate

* Fix fake_crypto BLS compile errors

* Update ef_tests for new v.8 type params

* Update ef_tests submodule to v0.8.1 tag

* Make fixes to support parsing ssz ef_tests

* `compact_committee...` to `compact_committees...`

* Derive more traits for `CompactCommittee`

* Flip bitfield byte-endianness

* Fix tree_hash for bitfields

* Modify CLI output for ef_tests

* Bump ssz crate version

* Update ssz_types doc comment

* Del cached tree hash tests from ssz_static tests

* Tidy SSZ dependencies

* Rename ssz_types crate to eth2_ssz_types

* validator_client: update for v0.8

* ssz_types: update union/difference for bit order swap

* beacon_node: update for v0.8, EthSpec

* types: disable cached tree hash, update min spec

* state_processing: fix slot bug in committee update

* tests: temporarily disable fork choice harness test

See #447

* committee cache: prevent out-of-bounds access

In the case where we tried to access the committee of a shard that didn't have a committee in the
current epoch, we were accessing elements beyond the end of the shuffling vector and panicking! This
commit adds a check to make the failure safe and explicit.

* fix bug in get_indexed_attestation and simplify

There was a bug in our implementation of get_indexed_attestation whereby
incorrect "committee indices" were used to index into the custody bitfield. The
bug was only observable in the case where some bits of the custody bitfield were
set to 1. The implementation has been simplified to remove the bug, and a test
added.

* state_proc: workaround for compact committees bug

https://github.com/ethereum/eth2.0-specs/issues/1315

* v0.8: updates to make the EF tests pass

* Remove redundant max operation checks.
* Always supply both messages when checking attestation signatures -- allowing
  verification of an attestation with no signatures.
* Swap the order of the fork and domain constant in `get_domain`, to match
  the spec.

* rustfmt

* ef_tests: add new epoch processing tests

* Integrate v0.8 into master (compiles)

* Remove unused crates, fix clippy lints

* Replace v0.6.3 tags w/ v0.8.1

* Remove old comment

* Ensure lmd ghost tests only run in release

* Update readme
2019-07-30 12:44:51 +10:00
John Adler
fec7168512
Fix lots of typos. 2019-07-26 15:26:06 -04:00
Paul Hauner
749f2fcb5f
Unify EthSpecs in Mainnet and Minimal 2019-06-08 08:49:04 -04:00
Paul Hauner
caddeba81b
Remove genesis_epoch from ChainSpec 2019-06-08 08:17:42 -04:00
Paul Hauner
e74d49fc8a
Remove dupe info between ChainSpec and EthSpec 2019-06-08 07:57:25 -04:00
Paul Hauner
6660311b2b
Rename EpochCache to CommitteeCache 2019-05-20 14:36:54 +10:00
Paul Hauner
b8c4c3308a
Update types to new tree_hash crate 2019-04-16 14:14:38 +10:00
Paul Hauner
96d96ba9ba
Remove assertion in benches 2019-03-14 20:54:30 +11:00
Paul Hauner
4fd8551e8b
Update loglevel, comments in benches 2019-03-14 17:49:39 +11:00
Paul Hauner
2535f47f13
Add builder for benches
Also adds a "sane" case for block processing
2019-03-14 16:44:56 +11:00
Paul Hauner
ed49023b87
Merge branch 'faster-rewards' into sane-case 2019-03-14 16:11:41 +11:00
Paul Hauner
fc0cdb8226
Start building non-worst case benches 2019-03-14 18:10:36 +13:00
Paul Hauner
10aee6214c
Tidy per_epoch_processing
Mainly renaming variables and files for readability.
2019-03-14 14:59:30 +11:00
Paul Hauner
95599ddc66
Update Attesters struct
- Renames variables
- Moves total balance calculation into struct
2019-03-14 12:49:48 +11:00
Paul Hauner
a319144835
Improve crosslink reward processing 2019-03-14 12:17:43 +11:00
Paul Hauner
6f919e6f7d
Add first iteration on faster rewards processing. 2019-03-14 11:53:50 +11:00
Paul Hauner
587be831b5
Add method for dropping pubkey cache. Add bench. 2019-03-13 16:49:32 +11:00
Paul Hauner
6cd3c4bd1a
Add a cache for public keys to BeaconState
This allows for a fast lookup of "is this public key already in the
validator registry".
2019-03-13 16:40:28 +11:00
Paul Hauner
fbfa233d36
Add debug messages to TestingBeaconStateBuilder 2019-03-12 17:16:12 +11:00
Paul Hauner
cce88c9923
Improve DX for loading validator keys from file 2019-03-12 14:39:16 +11:00
Paul Hauner
f34ae86cde
Add support for loading keypairs from file 2019-03-12 12:46:44 +11:00
Paul Hauner
9de6a0c733
Rename benching files 2019-03-12 09:57:00 +11:00
Paul Hauner
e81f1c31c9
Fix proof-of-possession issues.
These were introduced in an earlier commit
2019-03-11 19:47:33 +11:00
Paul Hauner
292991810d
Move state processing benches around 2019-03-11 19:46:22 +11:00
Paul Hauner
36085f63e9
Rename state trans benches 2019-03-11 14:52:21 +11:00
Paul Hauner
0b7082e2b9
Move benching_utils structs into types 2019-03-11 11:17:27 +11:00
Paul Hauner
6ae99a1462
Ensure drop times aren't included in benchmarks
Also moves to the new `iter_batched` method on criterion (instead of
`iter_with_setup`.
2019-03-11 10:56:31 +11:00
Paul Hauner
21d75ef0bd
Add tree hash benches 2019-03-10 18:31:14 +11:00
Paul Hauner
9cc8e2598f
Organise epoch benching file 2019-03-10 17:48:26 +11:00
Paul Hauner
89fc386264
Add extra checks for epoch benches finalization 2019-03-10 13:38:57 +11:00
Paul Hauner
c33e299176
Ensure epoch processing benches get new eth1 data 2019-03-10 12:56:37 +11:00
Paul Hauner
90d00773cb
Add slashings back into per-block processing.
I thought they would invalidate the attestations but I was wrong.
2019-03-10 08:30:36 +11:00
Paul Hauner
c1e386a0b1
Add deposits, transfers and exits to benches 2019-03-09 22:10:47 +11:00
Paul Hauner
f8ec1e0cfa
Add slashings and attestations to per block benching 2019-03-09 18:56:01 +11:00
Paul Hauner
73ebb4bc2e
Add incomplete per-block processing benchmarks
Still needs to fill block with operations
2019-03-09 14:11:49 +11:00
Paul Hauner
ca5d9658ce
Move epoch processing benches into separate file 2019-03-09 10:45:28 +11:00
Paul Hauner
63743a962c
Add per-epoch benchmarks, optimise function. 2019-03-09 10:38:53 +11: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
906131f882
Add tests and benches for epoch processing 2019-02-26 16:27:42 +13:00