Commit Graph

1009 Commits

Author SHA1 Message Date
Paul Hauner
aad3b3dc7a
Merge spec into types crate.
Also remove some pre-2018 `extern crate` calls.
2019-02-01 19:05:39 +11:00
Paul Hauner
cb85fbcdb2
Tidy and add docstring to chain test harness. 2019-02-01 18:48:37 +11:00
Paul Hauner
4cc88c8cc7
Tidy benches 2019-02-01 18:22:43 +11:00
Paul Hauner
efc0902abb
Run cargo fmt 2019-02-01 18:20:42 +11:00
Paul Hauner
5ca53190b5
Add comments to beacon chain fork choice 2019-02-01 18:18:39 +11:00
Paul Hauner
865919e398
Improve attester errors, move info -> helpers
- Ensured one can distingush between a committee error and an invalid
validator index when using `validator_attesation_slot_and_shard`.
- Renamed the `info.rs` file to `getters.rs`, for clarity.
2019-02-01 17:56:49 +11:00
Paul Hauner
a71e1031ce
Add docstrings to finalized_head 2019-02-01 17:07:59 +11:00
Paul Hauner
b99e4ed9f4
Tidy slot_dump, remove SlotDump, use CheckPoint 2019-02-01 17:04:25 +11:00
Paul Hauner
4d062d77f9
Move CheckPoint into file, tidy canonical_head 2019-02-01 16:58:12 +11:00
Paul Hauner
942ef4b002
Move advance_slot to its own file. 2019-02-01 16:30:42 +11:00
Paul Hauner
db230475d7
Remove SlotClock error from block production, tidy. 2019-02-01 16:21:18 +11:00
Paul Hauner
9d1f98ba8f
Delete SlotClock errs from block_processing, tidy. 2019-02-01 16:07:59 +11:00
Paul Hauner
1e6f85a5eb
Tidy BlockGraph, use parking_lot, add doc comments 2019-02-01 15:59:12 +11:00
Paul Hauner
d4757f2e09
Drop test repetitions down to 100 2019-02-01 15:39:30 +11:00
Paul Hauner
d50a8b03f8
Set BeaconChain present_slot to read from state.
It used to read from the slot_clock, that has been replaced with
`read_slot_clock`.
2019-02-01 15:37:43 +11:00
Paul Hauner
92753fa24e
Tidy attestation_production and create docstrings 2019-02-01 15:26:36 +11:00
Paul Hauner
2ed5f69448
Tidy attestation_processing, add docstrings. 2019-02-01 15:19:50 +11:00
Paul Hauner
a86f7fa51b
Tidy AttestationAggregator, add docstrings. 2019-02-01 15:16:24 +11:00
Paul Hauner
20e45b3369
Refactor block_processing
- Add the rayon library for parallelization
- Move from std::sync::Rwlock to rayon::RwLock
- Add `state` field to BeaconChain
- Fix major bug in attestation validator where justified slot was
incorrectly looked up.
2019-02-01 14:48:09 +11:00
Paul Hauner
c1c5311ea0
Merge pull request #168 from Feng94/protos-build-dir-separator-fix
Fix hardcoded string to use system constant for directory separator
2019-02-01 12:09:27 +11:00
Paul Hauner
10fec4919b
Merge pull request #175 from sigp/tree_hash
Merkle hashing chunk size fix
2019-02-01 12:08:17 +11:00
Paul Hauner
8b84b741dc
Merge pull request #173 from g-r-a-n-t/sig-lib-version
added version to signature-schemes dependency
2019-02-01 12:06:48 +11:00
Paul Hauner
b6b738e83a
Improve test_harness efficiency for attesatations
Reduce the amount of attester.poll() calls by using a hashset
2019-01-31 20:27:15 +11:00
Paul Hauner
becb81d842
Fix memory blow-up with Arc<ChainSpec>
Previously it was cloning the ChainSpec, now it shares an Arc.
2019-01-31 20:24:37 +11:00
Paul Hauner
02a962d35d
Ensure per_epoch trans. happens before per_slot. 2019-01-31 18:32:23 +11:00
Paul Hauner
c1b3d1b63e
Tidy up and add some logs 2019-01-31 18:32:01 +11:00
Paul Hauner
e1239a1ecc
Ensure attestation_participants is deduped 2019-01-31 18:31:20 +11:00
Paul Hauner
d6adfc7655
Refactor justified_slot fn
Now it reads from the head state
2019-01-31 18:30:43 +11:00
Paul Hauner
3f13c25c05
Fix issues with per_epoch block_root calls
They were being called with the wrong slot.
2019-01-31 18:28:54 +11:00
Paul Hauner
5c44f97fba
Fix bug with committee index for attester duties
It was returning the validator_index instead of the `committee_index`.
2019-01-31 16:42:53 +11:00
Paul Hauner
48801e4674
Re-enable signature checking for validations 2019-01-31 16:42:31 +11:00
Paul Hauner
a1cdc0402d
Tidy attestation_participants function.
It was using a map where it could use a find.
2019-01-31 16:41:54 +11:00
Paul Hauner
5da955e3ce
Ensure harness produces block before attestations. 2019-01-31 16:41:17 +11:00
Paul Hauner
c5a0170a0a
Tidy out some verbose debugs 2019-01-31 16:40:44 +11:00
Paul Hauner
8073296f5d
Ensure per_epoch processing always runs.
Previously, it was running _after_ a state transition, not before it
with the slot processing.
2019-01-31 16:39:44 +11:00
Paul Hauner
ae39a24e71
Add committee_index to aggregator
Fixes a bug where the validator index bit was set on the bitfield,
instead of the committee index
2019-01-31 14:16:28 +11:00
Paul Hauner
5ec9d82e40
Minor bug fixes and formatting changes. 2019-01-31 10:04:40 +11:00
Paul Hauner
2fc6dbb02a
Fix bug with inclusion_distance 2019-01-31 08:49:50 +11:00
Paul Hauner
7d94cfb0e4
Refine state transition to allow first transition 2019-01-31 00:39:34 +11:00
Kirk Baird
73ba4d3cfc
Minor modification to merkle hashing 2019-01-29 09:27:40 +11:00
Paul Hauner
6a4252b8c6
Add state helpers from #148 2019-01-28 19:12:20 +11:00
Paul Hauner
f92b9d618a
Add get_shuffling to state 2019-01-28 17:45:54 +11:00
Paul Hauner
2882110525
Add attesatation aggregation to test harness 2019-01-28 17:07:13 +11:00
Paul Hauner
be7e326c33
Add FreeAttesation type 2019-01-28 16:21:33 +11:00
Paul Hauner
5bbffcb053
Add attester to beacon chain test harness 2019-01-28 15:50:42 +11:00
Grant Wuerker
0cbc2936ea
added version to signature-schemes dependency
using tag instead of branch

changed signature-schemes tag to 0.3.0
2019-01-27 21:12:00 -06:00
Paul Hauner
e1698102e0
Add attestation aggregation to BeaconChain 2019-01-28 13:04:50 +11:00
Paul Hauner
e9abf06364
Add attestation production to BeaconChain 2019-01-28 13:00:45 +11:00
Paul Hauner
d1ac7c037d
Add chain.justified_head 2019-01-28 13:00:08 +11:00
Paul Hauner
b516fd472e
Rename chain.canonical_head to head 2019-01-28 12:58:20 +11:00