Paul Hauner
7458022fcf
Fork choice bug fixes ( #449 )
...
* Change reduced tree for adding weightless node
* Add more comments for reduced tree fork choice
* Small refactor on reduced tree for readability
* Move test_harness forking logic into itself
* Add new `AncestorIter` trait to store
* Add unfinished tests to fork choice
* Make `beacon_state.genesis_block_root` public
* Add failing lmd_ghost fork choice tests
* Extend fork_choice tests, create failing test
* Implement Debug for generic ReducedTree
* Add lazy_static to fork choice tests
* Add verify_integrity fn to reduced tree
* Fix bugs in reduced tree
* Ensure all reduced tree tests verify integrity
* Slightly alter reduce tree test params
* Add (failing) reduced tree test
* Fix bug in fork choice
Iter ancestors was not working well with skip slots
* Put maximum depth for common ancestor search
Ensures that we don't search back past the finalized root.
* Add basic finalization tests for reduced tree
* Change fork choice to use beacon_block_root
Previously it was using target_root, which was wrong
* Make ancestor iter return option
* Disable fork choice test when !debug_assertions
* Fix type, removed code fragment
* Tidy some borrow-checker evading
* Lower reduced tree random test iterations
2019-07-29 12:08:52 +10:00
Pawan Dhananjay
db094022b9
Remove unused dependencies ( #456 )
2019-07-29 09:55:57 +10:00
John Adler
fec7168512
Fix lots of typos.
2019-07-26 15:26:06 -04:00
Grant Wuerker
5e3fe2467a
Merge branch 'master' into process-free-attestation
2019-07-25 13:35:39 +02:00
Grant Wuerker
b49d592eee
Copy paste error in comment fixed.
2019-07-24 18:06:18 +02:00
Grant Wuerker
51645aa9af
Correct process_attestation error handling.
2019-07-24 18:03:48 +02:00
Age Manning
b5af73d056
Merge pull request #441 from sigp/rpc-update
...
RPC Rewrite
2019-07-24 20:08:16 +10:00
Age Manning
ae96325c81
Allows Libp2p service to be read outside network thread
2019-07-24 17:45:31 +10:00
Age Manning
7d38cba252
Remove encoding error and redundant code
2019-07-24 15:17:44 +10:00
Grant Wuerker
b2471eca49
Checking if the an attestation contains a latest message
2019-07-23 20:50:18 +02:00
Age Manning
89ff7fb6b8
Complete initial testing of new RPC
2019-07-23 22:45:42 +10:00
Age Manning
b350a78fec
Update RPC. WIP
2019-07-22 14:13:18 +10:00
Grant Wuerker
bef7ca6bfb
Cleaned up get_attestation_state
2019-07-20 12:49:41 +02:00
Grant Wuerker
7cdfa3cc27
Looser check on beacon state validity.
2019-07-19 14:52:01 +02:00
b-m-f
e9671084af
Saves ENR to disk on every address update
...
Signed-off-by: b-m-f <max@ehlers.berlin>
2019-07-18 16:48:04 +01:00
Grant Wuerker
b90edaf7f6
Merge branch 'master' into process-free-attestation
2019-07-18 12:33:22 +02:00
Age Manning
b2a1b20e24
Merge latest master
2019-07-16 23:26:31 +10:00
Age Manning
414d41cb57
Shift changes into message handler and simple sync for rpc-rewrite
2019-07-16 22:32:37 +10:00
Kirk Baird
0513559252
Fix syncing bugs by recursively attempting to process parents in the … ( #429 )
...
* Fix syncing bugs by recursively attempting to process parents in the import queue, change BlockRootsIterator
* Swap from crossbeam channel to tokio mpsc
* Recursion fix
* Remove exess block processing
* Fix network lag, correct attestation topic
* Correct network poll logic
* Overhaul of SimpleSync and modify BlockRootsIterator to return start_slot
* Fix bug in tests relating to StateRootsIterator
* Remove old, commented-out heartbeat code.
* Tidy docs on import queue enum
* Change source logging msg in simple sync
* Rename function parameter in simple sync
* Use `BestBlockRootsIterator` in `reduced_tree`
* Update comments for `BestBlockRootsIterator`
* Fix duplicate dep in cargo.toml
2019-07-16 17:28:15 +10:00
Age Manning
704263e35f
Clean up Protocol types
2019-07-15 18:41:05 +10:00
Age Manning
15c99b5f37
RPC Update. WIP
2019-07-15 17:07:23 +10:00
Age Manning
15cdd2afb9
Initial codec module
2019-07-13 18:57:18 +10:00
Age Manning
d84780a339
Initial base codec
2019-07-13 18:35:33 +10:00
Grant Wuerker
40b166edcd
Retrieving state from store and checking signature
2019-07-11 16:32:01 +02:00
Age Manning
0292679f27
Improved error handling. Switching to codecs for easier encoding support
2019-07-11 15:11:31 +10:00
Kirk Baird
08069704c1
Add cli flag for logging to JSON file
2019-07-10 10:27:44 +10:00
Grant Wuerker
adf1d9c533
Processing attestation in fork choice
2019-07-09 12:36:59 +02:00
Grant Wuerker
e23726c0a1
Renamed fork_choice::process_attestation_from_block
2019-07-09 12:36:26 +02:00
Age Manning
4a84b2f7cc
Improved RPC handling. WIP
2019-07-09 15:44:23 +10:00
Age Manning
bb0e28b8e3
Improved rpc protocols handler. WIP
2019-07-06 23:43:44 +10:00
Age Manning
f1127e4e0d
Initial addition of an RPC Protocol Handler
2019-07-06 21:32:32 +10:00
Age Manning
cda61c1577
Adds basic inbound/outbound upgrades for eth2 rpc
2019-07-05 18:59:53 +10:00
Age Manning
746935fa41
Initial sub-protocol implementation
2019-07-04 15:26:02 +10:00
Age Manning
1aeec12b78
Improve error handling of default directory
2019-07-04 14:14:27 +10:00
Age Manning
dd410535cb
Remove Phase 1 TODO
2019-07-04 14:14:27 +10:00
Age Manning
bffe6c327f
Removes left-over debugging statements
2019-07-04 14:14:27 +10:00
Age Manning
177daf2609
Typo fixes
2019-07-04 14:14:27 +10:00
Age Manning
af28d5e20c
Add persistent network identification
2019-07-04 14:14:27 +10:00
Age Manning
7dc5e2f959
Update to latest libp2p
2019-07-04 14:14:27 +10:00
Age Manning
0952a36a21
Initial integration of discovery v5
2019-07-04 14:14:27 +10:00
Age Manning
44c9058477
Integrate discv5 into lighthouse
2019-07-04 14:14:27 +10:00
Age Manning
6ee2b4df34
Complete merging of network addition branch
2019-07-04 14:14:26 +10:00
Age Manning
c7e17c8641
Updates for latest master
2019-07-04 14:14:26 +10:00
Age Manning
43135484ca
Update to lastest libp2p
2019-07-04 14:13:43 +10:00
Age Manning
b33ce5dd10
Initial core grouping of libp2p behaviours
2019-07-04 14:13:43 +10:00
Age Manning
cb7d5eba1c
Discovery and gossip bug fixes
2019-07-04 14:12:06 +10:00
Age Manning
f80c34b74f
Builds on discovery. Adds identify to discovery
2019-07-04 14:11:17 +10:00
Age Manning
d2f80e3b2a
Adds env logger to output libp2p logs
2019-07-04 14:11:17 +10:00
Age Manning
e36fa3152d
Adds verbosity cli flag
2019-07-04 14:11:17 +10:00
Age Manning
a38f4c4cd1
Adds Kademlia for peer discovery
2019-07-04 14:08:48 +10:00
Age Manning
be6ebb5ffa
Add custom inactivity timeout to gossipsub
2019-07-04 14:08:48 +10:00
Age Manning
2d710f19fc
Update to latest libp2p
2019-07-04 14:08:48 +10:00
Age Manning
7920f8098f
Complete moving network logc into beacon node
2019-07-04 14:07:26 +10:00
Age Manning
64abd0bc5b
Removes network parameters from chain spec
2019-07-04 14:07:26 +10:00
Age Manning
a31d6bcb22
RPC methods get pubsub topics from chain spec
2019-07-04 14:07:26 +10:00
Age Manning
4e24c8e651
Add topics to chain id
2019-07-04 14:07:26 +10:00
Age Manning
c7bd02caaf
Propogate valid attestations accross the network
2019-07-04 14:07:26 +10:00
Paul Hauner
027f0a539d
Prepare ssz for publishing on crates.io
2019-07-03 16:06:20 +10:00
Paul Hauner
d395feb027
Merge pull request #418 from sigp/fix-syncing
...
Improve syncing, fix bugs
2019-07-03 13:48:44 +10:00
Age Manning
76371659e9
Improve error handling of default directory
2019-07-02 17:32:14 +10:00
Age Manning
6c18b417c3
Remove Phase 1 TODO
2019-07-02 11:15:35 +10:00
Age Manning
1f62221235
Removes left-over debugging statements
2019-07-01 17:23:14 +10:00
Age Manning
f8e20d8027
Typo fixes
2019-07-01 16:40:35 +10:00
Age Manning
5521c53d36
Add persistent network identification
2019-07-01 16:38:42 +10:00
Michael Sproul
73c4171b52
op_pool: finish persistence support
2019-07-01 10:55:55 +10:00
Michael Sproul
7fe458af45
op_pool: re-jig deposit handling (needs more work)
2019-07-01 10:55:55 +10:00
Michael Sproul
604fe2d97f
op_pool: partial persistence support
2019-07-01 10:55:55 +10:00
Paul Hauner
2a7122beaf
Partially refactor simple_sync, makes improvement
2019-06-27 18:05:03 +10:00
Age Manning
955574f469
Update to latest libp2p
2019-06-25 18:57:11 +10:00
Age Manning
a64a6c7d3a
Initial integration of discovery v5
2019-06-25 18:02:50 +10:00
Age Manning
81f0b6c238
Integrate discv5 into lighthouse
2019-06-25 18:02:50 +10:00
Age Manning
84ea5adffe
Complete merging of network addition branch
2019-06-25 18:02:50 +10:00
Age Manning
cf459b60a9
Updates for latest master
2019-06-25 18:02:50 +10:00
Age Manning
fc8dc6dfa7
Update to lastest libp2p
2019-06-25 18:02:50 +10:00
Age Manning
f7c2e4c5af
Initial core grouping of libp2p behaviours
2019-06-25 18:02:50 +10:00
Age Manning
75959cc9a2
Discovery and gossip bug fixes
2019-06-25 18:02:50 +10:00
Age Manning
25f37ad967
Builds on discovery. Adds identify to discovery
2019-06-25 18:02:50 +10:00
Age Manning
89282c1e09
Adds env logger to output libp2p logs
2019-06-25 18:02:49 +10:00
Age Manning
ad1438db53
Adds verbosity cli flag
2019-06-25 18:02:49 +10:00
Age Manning
8d5d228270
Adds Kademlia for peer discovery
2019-06-25 18:02:49 +10:00
Age Manning
dea6ac7923
Add custom inactivity timeout to gossipsub
2019-06-25 18:02:49 +10:00
Age Manning
7ad9805f02
Update to latest libp2p
2019-06-25 18:02:49 +10:00
Age Manning
c1d609902a
Complete moving network logc into beacon node
2019-06-25 18:02:49 +10:00
Age Manning
dd3a4f0b43
Removes network parameters from chain spec
2019-06-25 18:02:49 +10:00
Age Manning
f54bd79f84
RPC methods get pubsub topics from chain spec
2019-06-25 18:02:48 +10:00
Age Manning
e9181e120c
Add topics to chain id
2019-06-25 18:02:48 +10:00
Age Manning
95ce8ca6e6
Propogate valid attestations accross the network
2019-06-25 18:02:48 +10:00
Paul Hauner
906580be15
Attempt to catch edge case in syncing
2019-06-25 16:05:26 +10:00
Paul Hauner
8afe8b3569
Implement fixes from PR review
2019-06-24 15:31:36 +10:00
Paul Hauner
3a196f3fdc
Tidy, fix clippy lints
2019-06-24 09:34:56 +10:00
Paul Hauner
8e13237b7f
Only perform beacon chain tests on release
2019-06-24 09:34:56 +10:00
Paul Hauner
075c989375
Remove old fork_choice crate
2019-06-24 09:34:56 +10:00
Paul Hauner
77fba0b98e
Fix bugs in fork choice, add more tests
2019-06-24 09:34:56 +10:00
Paul Hauner
f8fb011d6c
Finish fork test for beacon chain
2019-06-24 09:34:55 +10:00
Paul Hauner
8ed03e391d
Allow harness to produce fork blocks
2019-06-24 09:34:55 +10:00
Paul Hauner
e904e0a5a8
Fix bug in operations for block production
2019-06-24 09:34:55 +10:00
Paul Hauner
fbb40485c1
Add additional chain tests
2019-06-24 09:34:55 +10:00
Paul Hauner
299b4cb207
Document beacon chain harness
2019-06-24 09:34:55 +10:00
Paul Hauner
723283bd01
Add attestation strategy to chain harness
2019-06-24 09:34:55 +10:00
Paul Hauner
46c0e17682
Add arbitrary attestation for beacon chain harness
2019-06-24 09:34:55 +10:00
Paul Hauner
7a4c3e26ac
Fix bug in reduced tree fork choice
2019-06-24 09:34:54 +10:00
Paul Hauner
0b2ad4d0a1
Mark reduced_tree fork choice as incomplete
2019-06-24 09:34:54 +10:00
Paul Hauner
d0037f49d8
Add progress on debugging fork choice
2019-06-24 09:34:54 +10:00
Paul Hauner
85b23f9f1b
Add incomplete progress on fork choice
2019-06-24 09:34:54 +10:00
Paul Hauner
41a36da765
Update BeaconChain
tests
2019-06-24 09:34:54 +10:00
Paul Hauner
55818e285a
Refactor block prod. to produce for forks
2019-06-24 09:34:53 +10:00
Paul Hauner
55196dff64
Remove iter mod from beacon chain
...
Now the iter mod in store is the only implementation
2019-06-24 09:34:53 +10:00
Paul Hauner
952e08ba38
Add state roots iter to store
2019-06-24 09:34:53 +10:00
Paul Hauner
c6e24572c7
Improve chain harness tests
2019-06-24 09:34:53 +10:00
Paul Hauner
9c2bbb6c05
Add stubbed-out block processing to fork choice
2019-06-24 09:34:52 +10:00
Paul Hauner
f6c86d0f7f
Add attestations to beacon chain harness
2019-06-24 09:34:52 +10:00
Paul Hauner
1638a7aa62
Alias zero hash to genesis in find head
2019-06-24 09:34:52 +10:00
Paul Hauner
8fb6ffffe2
Add new beacon chain test harness
2019-06-24 09:34:52 +10:00
Paul Hauner
1128de535d
Ignore attestations to zero hash
2019-06-24 09:34:52 +10:00
Paul Hauner
f4621a9f1a
Improve reduced tree fork choice
2019-06-24 09:34:52 +10:00
Paul Hauner
7756a658a7
Update fork choice find head fn
2019-06-24 09:34:51 +10:00
Paul Hauner
2ee71aa808
Add new fork choice struct to beacon chain
2019-06-24 09:34:51 +10:00
Paul Hauner
4a3d54761a
Add progress on reduced tree fork choice
2019-06-24 09:34:51 +10:00
Paul Hauner
25e93f60fd
Tidy comments
2019-06-17 10:01:23 -04:00
Paul Hauner
cf3d8b0688
Run cargo fmt --all
2019-06-13 12:21:09 -04:00
Paul Hauner
4c0724fba6
Refactor block processing results, some sync logic
2019-06-12 23:54:16 -04:00
Paul Hauner
059699736b
Return errors instead of panic in libp2p
2019-06-10 21:37:41 -04:00
Paul Hauner
e550c0218f
Add various fixes to clippy lints
...
Thou shalt appease clippy
2019-06-10 11:01:25 -04:00
Paul Hauner
a9284bec18
Fix type in default confi filename
2019-06-09 06:41:51 -04:00
Paul Hauner
4a871dbcc7
Change default config filenames
2019-06-09 06:35:36 -04:00
Paul Hauner
a662c3a940
Fix various compile errors and warnings
2019-06-09 06:26:34 -04:00
Paul Hauner
ab12787610
Update account manager config parsing
2019-06-09 04:34:56 -04:00
Paul Hauner
3487b16ce5
Add eth2_config
crate, integrate into val client
2019-06-08 20:21:50 -04:00
Paul Hauner
eb23b003b4
Ensure beacon node generates the right eth2 spec
2019-06-08 17:53:22 -04:00
Paul Hauner
d8fc5f31d8
Add Eth2Config to runtime
2019-06-08 13:17:03 -04:00
Paul Hauner
fd6766c268
Tidy beacon node runtime code
2019-06-08 09:46:04 -04:00
Paul Hauner
749f2fcb5f
Unify EthSpecs in Mainnet
and Minimal
2019-06-08 08:49:04 -04:00
Paul Hauner
caddeba81b
Remove genesis_epoch
from ChainSpec
2019-06-08 08:17:42 -04:00
Paul Hauner
e74d49fc8a
Remove dupe info between ChainSpec and EthSpec
2019-06-08 07:57:25 -04:00
Paul Hauner
f69d9093a3
Add concept of beacon node configuration TOML
2019-06-07 21:00:34 -04:00
Paul Hauner
e73a31c37f
Refactor ClientConfig, add serde to it
2019-06-07 19:44:27 -04:00
Paul Hauner
39ec96ad82
Run rustfmt
2019-06-07 02:55:43 -04:00
Paul Hauner
719dd72de6
Fix recently introduced sync bugs
2019-06-07 02:55:16 -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
c975828195
Merge branch 'rpc-fix' into docker-env
2019-06-06 09:51:48 -04:00
Paul Hauner
1707aa5bf3
Fix bug in RPC wire encoding
...
I broke this in a previous commit.
2019-06-06 09:47:21 -04:00
Paul Hauner
af96dd08c8
Simplify simple_sync
code
2019-06-06 00:32:09 -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
f4b4709999
Publish attestations from RPC to P2P
2019-06-04 16:33:35 +10:00
Paul Hauner
f95711c15a
Add present_epoch metric
2019-06-04 15:04:05 +10:00
Paul Hauner
67fdb4a7fb
Store beacon state committee cache in DB
2019-06-04 13:13:58 +10:00