Commit Graph

214 Commits

Author SHA1 Message Date
Paul Hauner
6258abfa9f
Tidy per_slot_processing fn 2019-04-29 07:34:01 +10:00
Paul Hauner
4dd1239b24
Add caching to state transition 2019-04-28 11:33:48 +10:00
Darren Langley
773227d627 removed printlns 2019-04-19 07:09:20 +10:00
Darren Langley
010d319fdf invalid randao signature test implemented 2019-04-18 07:00:40 +10:00
Paul Hauner
745d360566
Store state roots during slot processing 2019-04-17 17:17:43 +10:00
Paul Hauner
343909ef31
Fix boolean-bitfield serialization 2019-04-17 17:17:07 +10:00
Paul Hauner
c3779caede
Add extra info to block proc. error message 2019-04-17 13:59:40 +10:00
Michael Sproul
f592183aa9
Fix signed_root vs tree_hash_root in per_slot 2019-04-17 12:00:24 +10:00
Michael Sproul
d95ae95ce8
spec: update tags to v0.5.1 2019-04-17 12:00:23 +10:00
Michael Sproul
2914d77cd3
spec: update to v0.5.1 2019-04-17 12:00:23 +10:00
Michael Sproul
32547373e5
spec: simplify cache_state
The `latest_block_root` input argument was unnecessary as we were always setting it to something
almost equivalent to `state.latest_block_root` anyway, and more importantly, it was messing up the
caching of the state root. Previously it was possible for the function to update the state's latest
block root, and then hash the outdated block root that was passed in as an argument.
2019-04-17 12:00:23 +10:00
Michael Sproul
0a02567440
bitfield: fix bit ordering issue with YAML parsing 2019-04-17 12:00:22 +10:00
Michael Sproul
8da8730dca
spec: check ProposalSlashing epochs, not slots
As per v0.5.{0,1} of the spec, we only need to check that the epochs of two proposal slashings are
equal, not their slots.
2019-04-17 12:00:21 +10:00
Paul Hauner
49d066015b
Make genesis beacon state return a beacon state 2019-04-17 10:33:31 +10:00
Paul Hauner
f69b56ad60
Add new tree_hash crate project wide. 2019-04-16 14:25:43 +10:00
Paul Hauner
b8c4c3308a
Update types to new tree_hash crate 2019-04-16 14:14:38 +10:00
Darren Langley
d76246e600 invalid block signature test 2019-04-15 10:38:13 +10:00
Darren Langley
bb0500f11d process_block_header tests 2019-04-10 21:58:27 +10:00
Darren Langley
f9c1800c00 process_block_header tests 2019-04-10 21:56:31 +10:00
Darren Langley
8366352aaa mapped out invalid states... 59 2019-04-10 21:07:56 +10:00
Darren Langley
e1c08b1d02 mapped out invalid states... 59 2019-04-10 21:06:25 +10:00
Darren Langley
3e030c78a8 copied builder and setup tests 2019-04-10 14:42:31 +10:00
Paul Hauner
bd860eb3e1
Fixes bug in epoch processing.
- Was using the wrong slot to determine relative epoch.
- Added a non-related test I build during the search
2019-03-31 15:30:09 +11:00
Paul Hauner
b5f176a152
Merge branch 'master' into blop-pool 2019-03-29 17:49:33 +11:00
Paul Hauner
b887509607
Fix double advance-cache calls bug 2019-03-27 10:35:46 +11:00
Michael Sproul
99dbed86f1
types: PendingAttestation::from_attestation 2019-03-26 18:20:01 +11:00
Michael Sproul
518359e898
op-pool: implement attester slashings 2019-03-25 16:58:20 +11:00
Michael Sproul
e512f7c0e1
op-pool: validate_attestation_time_independent_only 2019-03-25 11:29:03 +11:00
Michael Sproul
95ed402228
op-pool: rename to verify_*_time_independent_only 2019-03-25 11:29:03 +11:00
Michael Sproul
b2fe14e12c
Operation pool: refactor verify_deposit/exit 2019-03-25 11:29:03 +11:00
Michael Sproul
8f4a2fbde1
Implement transaction pool basics 2019-03-25 11:29:03 +11:00
Paul Hauner
84f373fcc2
Fix clippy lints 2019-03-20 10:51:53 +11:00
Paul Hauner
baca2c90ab
Add last of 0.5.0 upgrades. Woo! 2019-03-19 19:43:31 +11:00
Paul Hauner
35b90728c7
Push more epoch processing fns to 0.5.0 2019-03-19 19:27:10 +11:00
Paul Hauner
61f6fe25e7
Tidy reward processing 2019-03-19 17:26:20 +11:00
Paul Hauner
d20fb93f0c
Update rewards processing to v0.5.0 2019-03-19 17:16:51 +11:00
Paul Hauner
37b8e9f39a
Move get_active_validator_indices to state 2019-03-19 09:09:57 +11:00
Paul Hauner
1028acf3f1
Move state trans fns into state_processing 2019-03-18 21:34:42 +11:00
Paul Hauner
7503f31ddc
Fix bug with per-block processing 2019-03-18 18:09:31 +11:00
Paul Hauner
edeace9e75
Fix issues with building on genesis block 2019-03-18 16:53:59 +11:00
Paul Hauner
191761f356
Allow epoch cache with zero validators. 2019-03-17 23:32:27 +11:00
Paul Hauner
816c2c651b
Modify genesis processing process.
- Removed BeaconStateBuilder
- Added genesis code to `state_processing`.
2019-03-17 23:11:07 +11:00
Paul Hauner
8677b9e9cc
Fix bug with epoch caches, add tests 2019-03-17 21:07:19 +11:00
Paul Hauner
3a384d93f8
Allow state processing to compile under v0.5.0 2019-03-17 17:47:12 +11:00
Paul Hauner
3b8c1df5da
Fix bug in per block processing. 2019-03-17 12:49:55 +11:00
Paul Hauner
6bd2055a0a
Update block processing to v0.5.0 2019-03-17 12:25:37 +11:00
Paul Hauner
ed49023b87
Merge branch 'faster-rewards' into sane-case 2019-03-14 16:11:41 +11:00
Paul Hauner
1c1c15a122
Tidy per epoch processing
- Add comments to ValidatorStatuses
- Add some checks to guard against a bad statuses list
- Remove unused attester_sets.rs file.
2019-03-14 16:00:22 +11: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
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
f949919b9b
Add comments to epoch_processing 2019-03-12 18:02:53 +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
e81f1c31c9
Fix proof-of-possession issues.
These were introduced in an earlier commit
2019-03-11 19:47:33 +11:00
Paul Hauner
0b7082e2b9
Move benching_utils structs into types 2019-03-11 11:17:27 +11:00
Paul Hauner
53456a6c79
Remove last inclusion_slot(..) call 2019-03-10 21:06:40 +11:00
Paul Hauner
f27b62d410
Add optimisation for epoch processing 2019-03-10 17:49:06 +11:00
Paul Hauner
89fc386264
Add extra checks for epoch benches finalization 2019-03-10 13:38:57 +11:00
Paul Hauner
3f98849362
Optimise attester slashing processing. 2019-03-10 08:55:45 +11:00
Paul Hauner
e7fba3a473
Process transfers in parallel. 2019-03-10 08:36:49 +11:00
Paul Hauner
1ca99b8c4c
Optimise deposits processing. 2019-03-10 08:33:17 +11:00
Paul Hauner
6250c81bb9
Fix bug in attestation verification
We were ensuring that a validator was present on the aggregation
bitfield before adding their signature to the agg pub
2019-03-09 20:09:17 +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
63743a962c
Add per-epoch benchmarks, optimise function. 2019-03-09 10:38:53 +11:00
Paul Hauner
f479beb87e
Implement deposit merkle root verification.
It is currently disabled, but it's there for later.
2019-03-08 09:26:03 +11:00
Paul Hauner
1ef2652cac
Add transfer processing to BeaconChain 2019-03-07 17:23:11 +11:00
Paul Hauner
15e4aabd8a
Add deposit processing, fix clippy lints 2019-03-07 16:15:38 +11:00
Paul Hauner
195cb16a41
Update test_harness for spec v0.4.0 2019-03-07 14:29:21 +11:00
Paul Hauner
20ac1bf1f0
Remove unused files
They were accidentally introduced by a merge
2019-03-07 13:53:17 +11:00
Paul Hauner
93ce7b59e7
Merge branch 'master' into v0.4.0-types 2019-03-07 12:03:27 +11:00
Paul Hauner
e6526c9895
Refactor winning root logic 2019-03-07 11:32:53 +11:00
Paul Hauner
5a225d2983
Update per-slot processing to v0.4.0 2019-03-07 08:37:13 +11:00
Paul Hauner
8a25fd48cf
Fix per_epoch_processing so it compiles again 2019-03-06 18:57:41 +11:00
Paul Hauner
17210faf3a
Start reorg of per_epoch_processing 2019-03-06 17:14:54 +11:00
Paul Hauner
521d48d37c
Break per-block-processing into smaller fns
Will enable benchmarking of each individual fn
2019-03-06 17:03:18 +11:00
Paul Hauner
599948b26b
Add comments to block_processing code 2019-03-06 16:24:56 +11:00
Paul Hauner
40f74c9b26
First compiling version of per-block-proc refactor 2019-03-06 15:22:45 +11:00
Paul Hauner
a15ed0acd3
Start new Error structure in state_processing 2019-03-06 10:22:19 +11:00
Michael Sproul
6253167cac
Update ethereum-types to 0.5 2019-03-06 10:08:35 +11:00
Paul Hauner
262e9cf0bc
Additional spec updates 2019-03-05 09:51:29 +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
ec0e13b764
Add comments to new functions 2019-03-03 15:32:44 +11:00
Paul Hauner
ede5685bc2
Fix warnings and clippy lints 2019-03-03 11:47:09 +11:00
Paul Hauner
76a0ba2d6c
Add attester slashing support to block processing
At spec v0.2.0
2019-03-03 11:18:12 +11:00
Paul Hauner
3561d44cbe
Update per-block processing for new AggPub wrapper
AggregatePublicKey newtype was introduced in previous commit
2019-03-03 11:12:18 +11:00
Paul Hauner
e2dd753f05
Merge branch 'master' into yaml-chain-tests 2019-03-02 20:18:09 +11:00
Paul Hauner
867dce34cd
Remove domain constants from block_processable
The information is gather from the `spec` object, not the constants.
2019-03-02 11:26:39 +11:00
Paul Hauner
1097c8089b
Add naive deposit-handling to BeaconChain 2019-03-01 16:56:27 +11:00
Paul Hauner
073be906da
Remove cache operations from epoch processing.
- Don't build the next cache at all.
- Call `advance_caches()` in per-slot processing.
2019-02-28 16:37:12 +11:00
Paul Hauner
af17fb1d03
Update BeaconStateBuilder API 2019-02-26 22:00:07 +13:00
Paul Hauner
906131f882
Add tests and benches for epoch processing 2019-02-26 16:27:42 +13:00
Kirk Baird
f72b45147a
Merge conflicts from master 2019-02-25 10:36:54 +11: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
Kirk Baird
2c8aa17e0d Merge branch 'master' into signature-scheme-update 2019-02-18 10:54:26 +11:00
Paul Hauner
b79f0cdf68
Fix bug with reward quotient in epoch processing 2019-02-16 15:09:14 +11:00
Paul Hauner
c5158e2974
Fix bug with total_balance in epoch processing 2019-02-16 15:08:57 +11:00
Paul Hauner
b0513b1ec1
Add and update logs 2019-02-16 15:08:33 +11:00
Paul Hauner
2f8c4536a0
Merge branch 'int_to_bytes' into implement-shuffle 2019-02-15 16:40:32 +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
210ec89b0b
Replace ssz_encode with int_to_bytes32
Only in the relevant places I can think of.. I might have missed some.
2019-02-15 12:21:19 +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
683147035b
Fix clippy lints in block and epoch processing 2019-02-13 10:28:57 +11:00
Paul Hauner
4824b43808
Fix various clippy lints 2019-02-13 07:46:59 +11:00
Paul Hauner
5c1d0dcea5
Fix various clippy lints 2019-02-13 07:32:31 +11:00
Paul Hauner
5fefc79521
Update BeaconChain for spec v0.2.0 2019-02-12 13:00:52 +11:00
Paul Hauner
f27308e377
Tidy old comments 2019-02-12 11:57:20 +11:00
Paul Hauner
ff2025ec5c
Update epoch processing to v0.2.0 2019-02-12 08:58:20 +11:00
Paul Hauner
c1f8c85ce9
Add un-finished, uncompiling state_processing 2019-02-11 17:25:23 +11:00