Commit Graph

79 Commits

Author SHA1 Message Date
Paul Hauner
f5e4fe29d7
Add comments to new BeaconChain methods
- Adds comments
- Also drops a message from `warn` down to `debug`. It was giving
warnings even on an Ok result.
2019-03-03 11:54:51 +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
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
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
5ca7c9929a
Merge branch 'master' into beacon-state-caching 2019-02-24 19:14:05 +13:00
Paul Hauner
ab10cbbdb5
Fix clippy lints, small typos 2019-02-24 18:52:12 +13:00
Kirk Baird
9f9b466f95
Modify attestion_aggregation to use frok version in domain 2019-02-23 14:39:54 +11:00
Kirk Baird
a5cbda0b60 Merge branch 'master' into signature-scheme-update 2019-02-23 13:34:57 +11:00
Paul Hauner
a5de6a1915
Add caching to BeaconState.
Removes CachingBeaconState
2019-02-22 18:14:16 +13:00
Age Manning
846cbdd7f7
Generalise fork choice tests. 2019-02-19 14:37:17 +11:00
Age Manning
4eddb47fd0
Updates all fork-choices to use ChainSpec for consts. 2019-02-18 17:49:05 +11:00
Kirk Baird
2c8aa17e0d Merge branch 'master' into signature-scheme-update 2019-02-18 10:54:26 +11:00
Kirk Baird
9c4a1f1d1f
Update to signature-scheme 0.5.2 2019-02-18 10:50:40 +11:00
Paul Hauner
b0513b1ec1
Add and update logs 2019-02-16 15:08:33 +11:00
Paul Hauner
3b92b69028
Apply CachedBeaconState to some functions
- Attestation aggregation
- Getting attestation duties
2019-02-16 11:04:12 +11:00
Paul Hauner
7c920cfb96
Add incomplete progress on fixing test harness 2019-02-15 19:23:22 +11:00
Paul Hauner
ec4a658fe7
Add beacon state test builder, tidy errors 2019-02-15 16:12:24 +11:00
Kirk Baird
977f3edfb6
Add domain to all signature funcitons, modify validate_proof_of_possession() 2019-02-15 13:58:14 +11:00
Paul Hauner
35c914baa6
Revert "Merge pull request #200 from sigp/new-structure"
This reverts commit d7a3545be1, reversing
changes made to 1da06c156c.
2019-02-14 12:09:18 +11:00
Paul Hauner
1d5ff4359a
Strip out old code
All of these files have been moved to either:

- https://github.com/sigp/lighthouse-beacon
- https://github.com/sigp/lighthouse-validator
- https://github.com/sigp/lighthouse-common

For rationale, see: https://github.com/sigp/lighthouse/issues/197
2019-02-13 14:15:53 +11:00
Paul Hauner
d2a1000520
Fix clippy lints in beacon_chain 2019-02-13 10:28:38 +11:00
Paul Hauner
61bbbab33d
Fix clippy lints in lmd_ghost 2019-02-13 09:27:09 +11:00
Paul Hauner
5fefc79521
Update BeaconChain for spec v0.2.0 2019-02-12 13:00:52 +11:00
Paul Hauner
85450ec254
Fix all compile errors from new Slot/Epoch types 2019-02-07 11:22:48 +11:00
Paul Hauner
9b1d8cd3c1
Update BeaconChain to use Slot newtype 2019-02-07 10:03:55 +11:00
Paul Hauner
d83bafae10
Fix compiler errors from BeaconChain refactor.
I accidentally forgot to include this in the last commit, my bad!
2019-02-05 05:26:47 +11:00
Paul Hauner
c1ed5cd2d8
Refactor beacon_chain.
Moves all the `BeaconChain` impls into the same file that the struct is
defined in.
2019-02-05 05:08:40 +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
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
c1b3d1b63e
Tidy up and add some logs 2019-01-31 18:32:01 +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
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