Paul Hauner
749f2fcb5f
Unify EthSpecs in Mainnet
and Minimal
2019-06-08 08:49:04 -04:00
Paul Hauner
e74d49fc8a
Remove dupe info between ChainSpec and EthSpec
2019-06-08 07:57:25 -04:00
Paul Hauner
4cecf05198
Fix beacon chain block iters
2019-06-07 02:48:26 -04:00
Paul Hauner
591c8ae219
Reject re-processing the genesis block
2019-06-07 02:48:08 -04:00
Paul Hauner
f52d66a136
Fix bug in rev block iter
2019-06-06 00:31:18 -04:00
Paul Hauner
ed9f655877
Update BeaconChain
iters
2019-06-06 00:28:36 -04:00
Paul Hauner
df366f99dc
Add block iter to beacon chain
2019-06-05 13:33:32 +10:00
Paul Hauner
8ab1d28c9f
Fix attestation processing metrics
2019-06-04 17:10:25 +10:00
Paul Hauner
f530f5a848
Ensure committees are built for block processing
2019-06-04 13:13:38 +10:00
Paul Hauner
82202a7765
Update components to suit v0.6.1 API
2019-06-04 09:37:40 +10:00
Paul Hauner
39cb63e01e
Merge branch 'v0.6.1' into docker-env
2019-06-04 09:25:00 +10:00
Michael Sproul
6bde64bd6a
spec v0.6: update beacon_node, validator_client
2019-06-03 16:13:51 +10:00
Paul Hauner
e310bdd904
Merge branch 'master' into v0.6.1
2019-06-02 13:49:24 +10:00
Paul Hauner
997095fc43
Add attestations per block metric
2019-06-01 15:29:13 +10:00
Paul Hauner
244ffbc604
Store genesis root in beacon chain, fix fork bug
2019-06-01 15:02:19 +10:00
Paul Hauner
c8ba44b0b5
Create db-level alias for genesis block
2019-06-01 12:56:35 +10:00
Paul Hauner
8831db1e0f
Fix recently introduced errors for gRPC block prod
2019-06-01 12:36:10 +10:00
Paul Hauner
08bf5817c9
Update fork choice to take just. head
2019-05-31 17:51:32 +10:00
Paul Hauner
2f9f8bf772
Tidy BeaconChain
; del spec
, unify head updates
2019-05-31 17:32:20 +10:00
Paul Hauner
8acffcc0db
Make some BeaconChain
functions private
2019-05-30 18:38:41 +10:00
Paul Hauner
4851d8be03
Fix some metrics labels
2019-05-29 18:09:51 +10:00
Paul Hauner
42b6e0c8a9
Run fork-choice after every block import
2019-05-29 17:55:38 +10:00
Paul Hauner
9f1039a350
Add metrics to BeaconChain
, tidy fork choice
2019-05-29 17:52:43 +10:00
Paul Hauner
64fbc6bf3c
Add additional metrics to BeaconChain
2019-05-29 15:45:09 +10:00
Paul Hauner
345f7d5f18
Add global metrics registry, pass to BeaconState
2019-05-28 17:30:09 +10:00
Paul Hauner
b28fa3d20b
Save the BeaconChain
to store on state update
2019-05-27 17:58:15 +10:00
Paul Hauner
faa682a9b5
Implement saving BeaconChain
on client drop
2019-05-27 17:58:15 +10:00
Paul Hauner
9ed8a4d380
Implement basic BeaconChain
persistence.
2019-05-27 17:58:15 +10:00
Paul Hauner
76602a65fc
Add new
fns to ForkChoice
and SlotClock
2019-05-27 17:58:15 +10:00
Paul Hauner
ee8d13573f
Create BeaconChainTypes
, thread through runtime
2019-05-26 15:59:29 +10:00
Paul Hauner
3bcf5ba706
Rename db
crate to store
2019-05-21 18:20:23 +10:00
Paul Hauner
058829b64d
Update beacon_chain
to latest DB
2019-05-21 17:27:06 +10:00
Paul Hauner
f1584dada4
Update BeaconChain struct to use new store
2019-05-21 13:36:14 +10:00
Paul Hauner
658b425cce
Merge branch 'master' into disk-db
2019-05-20 16:56:04 +10:00
Paul Hauner
6660311b2b
Rename EpochCache
to CommitteeCache
2019-05-20 14:36:54 +10:00
Paul Hauner
fcabef91da
Use E
for EthSpec
trait, instead of B
2019-05-13 14:44:43 +10:00
Paul Hauner
ce8ebeccbc
Rename BeaconStateTypes
to EthSpec
2019-05-10 14:47:09 +10:00
Paul Hauner
2a938f2fd5
Fix clippy lints
2019-05-09 13:35:00 +10:00
Paul Hauner
49c92ef167
Remove attester, block_producer & test_harness
2019-05-09 11:48:14 +10:00
Paul Hauner
51dc97ee42
Allow fork_choice
and beacon_chain
to compile
2019-05-08 18:18:17 +10:00
Paul Hauner
05df7702d3
Merge branch 'master' into disk-db
2019-04-30 16:02:23 +10:00
Paul Hauner
a76b24e274
Disable running docs example for test harness
2019-04-25 12:25:01 +10:00
Paul Hauner
2527252248
Merge branch 'master' into 0.5.1-tests
2019-04-17 21:21:07 +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
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
Paul Hauner
89bc15f77e
Move some long-running tests to release-only
2019-04-15 09:59:35 +10:00
Paul Hauner
1913be0c6f
Fix clippy lints
2019-04-03 16:23:09 +11:00
Paul Hauner
08b1808745
Modify runtime to allow memory or disk db
...
DiskDB is not working yet, but we'll get there!
2019-03-31 18:57:48 +11:00
Age Manning
f03259991d
Merge remote-tracking branch 'origin/paul-gossip-test' into validator-enhancements
2019-03-31 15:37:23 +11:00
Age Manning
c85da612f6
Remove debugging statements
2019-03-31 15:35:54 +11:00
Paul Hauner
c6fc4f0769
Fix bug in attestation production
2019-03-31 15:35:27 +11:00
Age Manning
b4c21ccca3
Merge remote-tracking branch 'origin/paul-gossip-test' into validator-enhancements
2019-03-31 13:58:38 +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
Age Manning
ae8e470d21
Add patch for attestation crosslinks
2019-03-31 13:06:01 +11:00
Paul Hauner
4e71ed6972
Fix produce_attestation
bug.
...
It was referencing the wrong crosslink.
2019-03-31 12:54:42 +11:00
Age Manning
e0680f9771
Correct compile error
2019-03-31 11:04:50 +11:00
Age Manning
77fb738c78
Merge latest gossip branch
2019-03-31 11:02:57 +11:00
Age Manning
fc5142c09a
Registers the attester service to the beacon node RPC client
2019-03-30 19:32:32 +11:00
Paul Hauner
65ae8fda47
Remove old attestation aggregator
2019-03-30 19:15:15 +11:00
Paul Hauner
935c64deef
Adds attestation validation to SimpleSync
2019-03-30 19:11:52 +11:00
Paul Hauner
c2b6f949c0
Restrict blop pool from re-including attestations
2019-03-30 18:25:32 +11:00
Paul Hauner
64507950dd
Use committe_len in test_harness
2019-03-30 17:31:58 +11:00
Age Manning
a952acb86f
Add committee_len to attestation data
2019-03-30 17:20:33 +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
Age Manning
bc305cacc2
Merge branch 'blop-pool' into validator-enhancements
2019-03-30 16:16:30 +11:00
Paul Hauner
397e104f9b
Implement Attestation
building in test harness
2019-03-30 16:02:09 +11:00
Age Manning
6e254551af
Implement produce beacon block on gRPC beacon node server
2019-03-30 15:58:31 +11:00
Age Manning
ba771282fa
Merges in validator client branch
2019-03-30 13:17:24 +11:00
Paul Hauner
89cc92572a
Add test_harness
tests for attestation count
2019-03-30 13:03:05 +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
Luke Anderson
be592c86d1
Started migrating FreeAttestation to Attestation in the harnesses - doesn't compile yet.
2019-03-29 10:39:37 +11:00
Luke Anderson
87acaac8a0
Ran cargo fmt.
2019-03-28 21:01:47 +11:00
Luke Anderson
ba71e8adca
Merged age-validator-client into luke's changes on validator_client, and fixed all the merge conflicts.
2019-03-28 20:55:07 +11:00
Luke Anderson
c9e8fe53bc
Merged Age's changes and ripped out heaps of now obsolete stuff in the validator client.
...
- Replaced most instances of PublicKey with KeyPair, since they need to be passed into each validator thread now.
- Pulled out a bunch of FreeAttestations, and replaced with regular Attestations (as per Paul's suggestion)
- Started generalising pubkeys to 'signers' (though they are still just Keypairs)
- Added validator_index into a few structs where relevant
- Removed the SlotClock and DutiesReader from the BlockProducer and Attester services, since this logic is now abstracted to the higher level process.
- Added a Hash trait to the Keypair (rather than just pubkey) which assumes the Pubkey uniquely defines it.
2019-03-28 15:50:57 +11:00
Age Manning
6f0c0e47c3
Update Validator RPC and cache building
2019-03-28 14:32:02 +11:00
Luke Anderson
c9a7977d69
Renamed some functions, trying to get beaconnode attestation stuff to work.
2019-03-27 14:30:09 +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
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