Kirk Baird
611a0c7d19
Arbitrary trait for eth2/types ( #1040 )
...
* Add the arbitrary type to eth2/types and their deps
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Wrap arbitrary in a feature flag
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Fix feature for types
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Fix comment
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Patch versioning
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Allow expanded crate reference for arbitrary 0.4.3
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Add arbitrary to remaining types
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* use cmp::min
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Derive Arbitrary trait for ValidatorStatus, TotalBalances and InclusionInfo
* Add CI check for state processing arbitrary faetures
Signed-off-by: Kirk Baird <baird.k@outlook.com>
* Fix indentation
Signed-off-by: Kirk Baird <baird.k@outlook.com>
Co-authored-by: Mehdi Zerouali <mehdi@sigmaprime.io>
2020-05-06 09:12:28 +10:00
Paul Hauner
7f6ae4c2f5
Refactor tree hashing ( #861 )
...
* Pre-allocated tree hash caches
* Add SmallVec to tree hash cache
* Avoid allocation for validator.pubkey
* Avoid iterator which seems to be doing heap alloc
* Add more smallvecs
* MOAR SMALLVEC
* Move non-test code to Hash256 tree hash
* Fix byte ordering error
* Add incomplete but working merkle stream impl
* Fix zero hash error
* Add zero hash fn
* Add MerkleStream comments
* Add smallvec, tidy
* Integrate into tree hash derive
* Update ssz_types tree hash
* Don't heap alloc for mix in length
* Add byte-level streaming to MerkleStream
* Avoid recursion in write method
* Update BLS to MerkleStream
* Fix some not-compiling tests
* Remove debug profiling
* Remove code duplication
* Move beacon state tree hash to new hasher
* Fix failing tests
* Update comments
* Add some fast-paths to tree_hash::merkle_root
* Remove unncessary test
* Rename MerkleStream -> MerkleHasher
* Rename new_with_leaf_count -> with_leaves
* Tidy
* Remove NonZeroUsize
* Remove todo
* Update smallvec
2020-03-05 08:07:27 +11:00
Michael Sproul
c1a2238f1a
Implement tree hash caching ( #584 )
...
* Implement basic tree hash caching
* Use spaces to indent top-level Cargo.toml
* Optimize BLS tree hash by hashing bytes directly
* Implement tree hash caching for validator registry
* Persist BeaconState tree hash cache to disk
* Address Paul's review comments
2019-11-05 15:46:52 +11:00
Paul Hauner
8cfa36fedd
Publish ssz_types (and deps) to crates.io ( #468 )
...
* Rename `hashing` crate to `eth2_hashing`
* Add license, desc to eth2_hashing Cargo.toml
* Remove merkle root from eth2 hashing
* Remove old benches folder (zombied from old branch)
* Add docs to eth2_hashing
* Prepare tree_hash for publishing on crates.io
* Update deps to use crates.io instead of paths
* Update all crates to pull ssz from crates.io
* Remove cached_tree_hash, add patches to manifest
* Fix compile error in benches
* Remove unused code
* Fix fake_crypto compile error
2019-08-08 11:39:47 +10:00
Pawan Dhananjay
88e89f9ab2
Update ethereum types ( #489 )
...
* Update ethereum-types to version 0.6
* Fix tests
* Run rustfmt
2019-08-06 14:41:42 +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
Paul Hauner
f20314bd87
Fix clippy lints, impl treehash for slices
2019-04-29 15:32:41 +10:00
Paul Hauner
a4559e798d
Add benches, examples for cached hashing.
...
Ignore flamegraph files
2019-04-28 11:38:32 +10:00
Paul Hauner
b213a5ade4
Create cached_tree_hash
crate.
2019-04-26 09:55:03 +10:00