Commit Graph

59 Commits

Author SHA1 Message Date
Paul Hauner
c6fc4f0769 Fix bug in attestation production 2019-03-31 15:35:27 +11:00
Paul Hauner
b26f1f8e1c Add build_all_caches method to BeaconState
Also adds a few more cache builds in BeaconChain.
2019-03-31 13:42:49 +11:00
Paul Hauner
4e71ed6972 Fix produce_attestation bug.
It was referencing the wrong crosslink.
2019-03-31 12:54:42 +11:00
Paul Hauner
935c64deef Adds attestation validation to SimpleSync 2019-03-30 19:11:52 +11:00
Paul Hauner
dbcc88ad67 Ensure BitVec is initialized using a multiple of 8
I found it was panic-ing when supplied a non-power-of-zero len.
2019-03-30 17:13:23 +11:00
Paul Hauner
7b3f317abf Fix bug with attestation production
It was being produced with the wrong source root. I will raise an issue
on the spec as it's a tricky one.
2019-03-30 17:12:43 +11:00
Paul Hauner
397e104f9b Implement Attestation building in test harness 2019-03-30 16:02:09 +11:00
Paul Hauner
cd9494181c Push RwLock down into OperationPool
There used to be one massive lock on `BeaconChain.op_pool`, however that
would cause unnecessary blocking.
2019-03-30 12:26:25 +11:00
Paul Hauner
1840248af8 Remove old queues from BeaconChain 2019-03-30 12:00:31 +11:00
Paul Hauner
8bf7a83f37 Rename op processing methods on BeaconChain 2019-03-29 19:09:01 +11:00
Paul Hauner
2b53851062 Pass errors back from block ops processing 2019-03-29 18:54:01 +11:00
Paul Hauner
8b1a91e9ee Add process_attestation to BeaconChain 2019-03-29 18:40:50 +11:00
Paul Hauner
46a978a5a9 Implement op pool for all ops execpt attestations 2019-03-29 18:30:03 +11:00
Age Manning
6f0c0e47c3 Update Validator RPC and cache building 2019-03-28 14:32:02 +11:00
Paul Hauner
b006586d19 Add slot timer to beacon node 2019-03-27 10:36:20 +11:00
Paul Hauner
c82bad7602 Add cache builds when advancing chain slot 2019-03-27 10:34:52 +11:00
Age Manning
214fb5b8ff Merge RPC branch 2019-03-25 21:31:49 +11:00
Luke Anderson
4cdeb6abe5 Progress towards validator signing attestations.
- Added a 'beacon_attester' RPC endpoint, so the BeaconNode can supply attestation data.
 - Renamed 'attestation_data' to just 'attestation' throughout (except where it is actually just the data structure).
2019-03-25 18:32:27 +11:00
Paul Hauner
3dc5595a6f Fix last errors stopping full chain sync 2019-03-24 16:35:07 +11:00
Paul Hauner
5f4f67f46f Swap ImportQueue from a Map to a Vec
There's an edge case where different blocks can have the same block
body.
2019-03-24 14:22:12 +11:00
Paul Hauner
3eae7b3fc5 Add skip slot support to BeaconChain fns 2019-03-24 12:49:59 +11:00
Paul Hauner
a57a7c2394 Implement block imports for sync 2019-03-23 18:48:09 +11:00
Paul Hauner
4b5b5851a6 Allow sync to to request block bodies. 2019-03-23 13:23:44 +11:00
Paul Hauner
96ba1c8f77 Implement get_block_roots for syncing 2019-03-22 14:20:49 +11:00
Paul Hauner
7a75ee3d19 Merge branch 'master' into paul-sync 2019-03-22 07:11:04 +11:00
Paul Hauner
430702b38d Clean println's out of state processing 2019-03-21 18:21:26 +11:00
Paul Hauner
84f373fcc2 Fix clippy lints 2019-03-20 10:51:53 +11:00
Paul Hauner
71d95ee9db Add new field to test_harness YAML, remove prints 2019-03-18 18:08:53 +11:00
Paul Hauner
edeace9e75 Fix issues with building on genesis block 2019-03-18 16:53:59 +11:00
Paul Hauner
6df5eee7f4 Update beacon_chain crate with v0.5.0 updates 2019-03-17 18:10:20 +11:00
Paul Hauner
4b21252ce4 Refactor BeaconChain and BeaconState genesis
Now it more easily supports using pre-build validator registries.
2019-03-08 15:33:45 +11:00
Paul Hauner
60098a051d Fix/silence clippy lints 2019-03-08 09:23:57 +11:00
Paul Hauner
1ef2652cac Add transfer processing to BeaconChain 2019-03-07 17:23:11 +11:00
Paul Hauner
5a21e19a31 Fix all compile errors from v0.4.0 update 2019-03-07 12:53:15 +11:00
Paul Hauner
a4e604a41e Update BeaconChain to spec v0.4.0 2019-03-07 12:25:29 +11:00
Paul Hauner
93ce7b59e7 Merge branch 'master' into v0.4.0-types 2019-03-07 12:03:27 +11:00
Paul Hauner
663d39739f Do project-wide s/epoch_length/slots_per_epoch/g 2019-03-04 17:51:54 +11:00
Paul Hauner
f4d8b41a09 Add Exit inclusion queue to BeaconChain 2019-03-04 12:20:59 +11:00
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
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
Paul Hauner
a5de6a1915 Add caching to BeaconState.
Removes CachingBeaconState
2019-02-22 18:14:16 +13:00
Age Manning
4eddb47fd0 Updates all fork-choices to use ChainSpec for consts. 2019-02-18 17:49:05 +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