Commit Graph

245 Commits

Author SHA1 Message Date
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
Paul Hauner
c27fdbe37f
Try to load keys from file when starting client 2019-03-27 10:28:27 +11:00
Luke Anderson
1584469b7c
Renamed attestation -> attestation_data for fetch, but not publish, to acknowledge the difference in the spec. Also started implementing the gRPC get_attestation_data functionality in the BeaconNode. 2019-03-26 17:41:43 +11:00
Paul Hauner
00b546e6b8
Update slot clock to use genesis slot 2019-03-26 15:44:28 +11:00
Paul Hauner
ca1eaf0b53
Merge branch 'paul-gossip-test' of github.com:sigp/lighthouse into paul-gossip-test 2019-03-26 09:47:38 +11:00
Paul Hauner
a145824c51
Set BeaconChainHarness to return block
This is useful if you want to inspect the block.
2019-03-26 09:46:26 +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
708d9b5674
Add basic Gossip sync handlers 2019-03-25 14:27:20 +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
4fc6e435d2
Add type alias to test_harness 2019-03-22 11:38:57 +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
ca18d4390a
Add first changes to syncing logic
- Adds testing framework
- Breaks out new `NetworkContext` object
2019-03-21 17:17:01 +11:00
Age Manning
4310f35b73
Merge branch 'master' into network-server 2019-03-20 14:31:35 +11:00
Paul Hauner
84f373fcc2
Fix clippy lints 2019-03-20 10:51:53 +11:00
Age Manning
41abdb7599
Remove sync crate, move into network crate 2019-03-19 00:05:06 +11:00
Age Manning
66f09e1b8e
Updates network branch to v0.5.0 2019-03-18 18:17:37 +11:00
Paul Hauner
71d95ee9db
Add new field to test_harness YAML, remove prints 2019-03-18 18:08:53 +11:00
Age Manning
2d52d2954d
Modify testnet spec to have few validators 2019-03-18 17:45:40 +11:00
Age Manning
6b5debe654
Organize beacon_chain typing
- Implements ClientTypes
- New network BeaconChain type for the networking service
2019-03-18 17:38:23 +11:00
Paul Hauner
edeace9e75
Fix issues with building on genesis block 2019-03-18 16:53:59 +11:00
Age Manning
bbad4bfa19
Starts initialisation of beacon chain in the client 2019-03-18 16:16:54 +11:00
Paul Hauner
446ff0c27e
Ensure test_harness crate compiles under v0.5.0 2019-03-17 19:19:52 +11:00
Paul Hauner
6df5eee7f4
Update beacon_chain crate with v0.5.0 updates 2019-03-17 18:10:20 +11:00
Paul Hauner
8cc89b9820
Fix clippy warnings 2019-03-14 18:08:21 +11:00
Paul Hauner
2bfc8ed4da
Fix failing doc test 2019-03-14 18:08:09 +11:00
Paul Hauner
6c4e457c8a
Fix test_harness tests
They were broken by changes to TestingBeaconStateBuilder and where the
keypairs file is stored.
2019-03-13 11:25:17 +11:00
Paul Hauner
2d2ba6576b
Remove old, superseded benches 2019-03-13 11:24:46 +11:00
Paul Hauner
f949919b9b
Add comments to epoch_processing 2019-03-12 18:02:53 +11:00
Paul Hauner
dc221f3220
Make attester/proposer slashing builders test-only
They didn't do anything useful or safe for production.
2019-03-12 17:30:00 +11:00
Paul Hauner
efd56ebe37
Ignore file-exists error. 2019-03-12 14:42:31 +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
Kirk Baird
25b08f0096
Run cargo fmt 2019-03-11 15:22:15 +11:00
Kirk Baird
191759dad0
Modify create_proof_of_possession, and verifying proof_of_possession in process_deposits 2019-03-11 15:18:45 +11:00
Paul Hauner
41844841c6
Update project tests to use new genesis structure 2019-03-11 11:52:16 +11:00
Paul Hauner
a77d1885a1
Refactor BeaconStateBuilder
Made it a production-only struct. All the testing stuff can be done with
BeaconStateBencher
2019-03-09 10:39:05 +11:00
Paul Hauner
ddac7540bc
Allow test_harness to load validators from file. 2019-03-08 16:10:21 +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
6efe2ad3e3
Add debug logs to test_harness prepare 2019-03-08 15:09:33 +11:00
Paul Hauner
e76b5e1c3a
Re-work deposit generation for memory efficiency
Helps ensure that variables are dropped after they're finished being
used.
2019-03-08 15:06:13 +11:00
Paul Hauner
ec9e0bbddf
Allow test_harness to load validators from file
Also adds a command to test_harness binary to generate validators
2019-03-08 13:18:02 +11:00
Age Manning
c5a7c62d5d
Updates to latest master. 2019-03-08 11:15:38 +11:00
Paul Hauner
b98f514d68
Break BeaconChainHarness validator gen into fn
Prepares for allowing for loading from file
2019-03-08 10:50:43 +11:00
Paul Hauner
9a964be58b
Update test_harness clap args structure
Prepares it for adding a new subcommand
2019-03-08 10:50:12 +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
195cb16a41
Update test_harness for spec v0.4.0 2019-03-07 14:29:21 +11:00
Paul Hauner
db3b6cba6d
Introduce Fork struct to block_producer
It's a pretty crappy solution, IMO. It shouldn't really belong in
"duties" but this gets the job done for now.
2019-03-07 13:54:56 +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
Age Manning
3b8f29a914
[Temp Commit] Implements more basic skeleton code. 2019-03-04 16:39:37 +11:00
Paul Hauner
ef006bfb2c
Add Exit support to test_harness 2019-03-04 12:21:24 +11:00
Paul Hauner
f4d8b41a09
Add Exit inclusion queue to BeaconChain 2019-03-04 12:20:59 +11:00
Paul Hauner
bc4acd9a5c
Re-work module structure in test_harness
Obeys the standard where structs live in files with the same name
2019-03-04 09:43:19 +11:00
Paul Hauner
3aaa3ea024
Use clearer types in test_harness::Config 2019-03-04 09:30:09 +11:00
Paul Hauner
9d77f2b1a8
Add README to test_harness 2019-03-03 16:38:25 +11:00
Paul Hauner
697d1ef626
Add CLI option for log-level to test_harness 2019-03-03 16:15:00 +11:00
Paul Hauner
58002f68e1
Move test_harness yaml file 2019-03-03 16:14:40 +11:00
Paul Hauner
a29eca57a1
Rename test_harness::manifest to test_case
I thing `TestCase` is better than manifest -- a manifest is more of a
list of items than a series of steps and checks. Plus it conflicts with
a Cargo manifest.
2019-03-03 15:12:19 +11:00
Paul Hauner
48fc709109
Fix failing test 2019-03-03 15:08:13 +11:00
Paul Hauner
7b72934943
Add comments to test_harness::Manifest 2019-03-03 15:07:54 +11:00
Paul Hauner
1703508385
Add comments to new BeaconChainHarness methods. 2019-03-03 12:02:58 +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
ede5685bc2
Fix warnings and clippy lints 2019-03-03 11:47:09 +11:00
Paul Hauner
87feeea1fd
Remove merkle_index from test_harness YAML
IMO, this is an implementation detail that shouldn't be covered in these
tests.
2019-03-03 11:31:08 +11:00
Paul Hauner
a8c3b5fdd8
Update test_harness yaml
- Checks for attester slashing, now it is included in the chain.
- Renames suite to be more specific, use normal Eth2.0 naming
2019-03-03 11:19:27 +11:00
Paul Hauner
9156aa2203
Add info log when building test_harness chain dump
It helps people know why they're waiting
2019-03-02 20:20:06 +11:00
Paul Hauner
4db2f082e1
Add state-checks to test_harness YAML
Runs tests against a state at some slot
2019-03-02 20:17:14 +11:00
Paul Hauner
f5614381e1
Re-organise test_harness binary
Moves manifest and components into separate files.
2019-03-02 18:59:47 +11:00
Paul Hauner
db28cc1b92
Fix warnings in test_harness/src/bin.rs 2019-03-02 18:43:27 +11:00
Paul Hauner
e59404f463
Change test_harness proposer_slashings YAML
Removes a lot of the detail from the `proposer_slashings` field -- IMO
this is not necessary in the test spec, the details of how a
proposer_slashing is created should be held in the program and the spec
should only define that one happens.
2019-03-02 18:37:21 +11:00
Paul Hauner
bb4d392a98
Add AttestationSlashingBuilder 2019-03-02 16:05:45 +11:00
Paul Hauner
ff2783a1cb
Add AttesterSlashing to test_harness
- Adds methods to BeaconChainHarness
- Adds YAML parsing
2019-03-02 15:35:02 +11:00
Paul Hauner
c885e36a93
Add fn to BeaconChainHarness validator signing
Signs some message using the priv key of some validator
2019-03-02 15:30:50 +11:00
Paul Hauner
ec5581ce1d
Shorten test_harness YAML to single test 2019-03-02 15:28:01 +11:00
Paul Hauner
7f1e40a8c6
Add proposer slashing support to test_harness
Test harness will now add signatures to a ProposerSlashing and submit it
to the BeaconChain
2019-03-02 11:25:55 +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
b0403707eb
Add support for deposits to test_harness 2019-03-01 16:59:55 +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
1479013bd0
Add skip_slots to test_harness yaml processor 2019-03-01 13:28:07 +11:00
Paul Hauner
8b06fa31da
Add basic YAML test_harness tests
Works, however ignores a lot of fields in the YAML.
2019-02-28 23:13:00 +11:00
Paul Hauner
af17fb1d03
Update BeaconStateBuilder API 2019-02-26 22:00:07 +13: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