Commit Graph

972 Commits

Author SHA1 Message Date
Nishant Das
ca0f61bf24 Change Ordering of Gossipsub Registration (#3330)
* fix ordering

* Add comment
2019-08-27 10:23:22 -05:00
Nishant Das
701c70ae3b add better logging (#3329) 2019-08-27 06:27:04 -07:00
terence tsao
f188609137 Implement GetHead for RPC (#3326)
* next compatible, tests pass

* terence feedback

* skip comment

* fixes

* misc fix

* on block

* Update RPC service to use chain info

* OOps

* All tests pass, run time with 8 validators work!

* Remove saving genesis validator

* Revert gensis count

* Move redundant headstate

* Comments

* Implemented GetChainHead

* Test works

* Moved mock package

* Fixed visibility for BUILD file

* Conflict
2019-08-26 15:59:17 -05:00
terence tsao
64d0826469
Update RPC service to use chain info (#3309) 2019-08-26 13:06:16 -07:00
terence tsao
a1020585fd Fix aggregation with new DB (#3323)
* Check legacy when aggregate

* Typo
2019-08-26 14:30:39 -05:00
Andrei Ivasko
f99e2bd7c9 Benchmark active indices (#3153)
* new branch off master

* bloomfilter + benchmarks done

* cfilter benchmarks

* comments added

* goimports and gofmt added

* linter issues

* bazel run //:gazelle -- fix

* workspace definitions fixed

* fixed tree_test.go

* Update workspace

* final commit

* gazelle

* updated workspace

* workspace

* reverted workspace changes

* workspace newline

* applied git checkout origin/master WORKSPACE
2019-08-26 11:30:28 -05:00
terence tsao
0b5b3865ef Update validators db during epoch boundary (#3307) 2019-08-26 11:02:17 -05:00
Nishant Das
5828278807 Fix Bolt Fatal Crash (#3320)
* add fix and reg test

* nogo

* nogo
2019-08-26 09:00:40 -05:00
Raul Jordan
9ad00ffafb
Use New Attestation Receiver Method in RPC (#3287)
* next compatible, tests pass

* terence feedback

* skip comment

* fixes

* misc fix

* on block

* resolved err
2019-08-25 15:45:55 -05:00
terence tsao
6bcb68f862
Fix save the correct head (#3306) 2019-08-24 18:39:40 -07:00
terence tsao
045badc5f3
Fix competing attestation check (#3305) 2019-08-24 16:56:40 -07:00
Nishant Das
919877f301 Ignore Messages From Local Peer (#3299)
* validate message coming into pipeline

* gaz

* add to deprecated p2p

* add new lib

* change lib
2019-08-24 14:41:24 -04:00
terence tsao
122166b317
Fix transition logging (#3303) 2019-08-24 11:51:00 -06:00
terence tsao
8870bcea64
Fix attestation pool clean up for new db (#3304) 2019-08-24 11:36:31 -06:00
Preston Van Loon
06c97256bc p2p --next: Register p2p peer count metrics (#3301) 2019-08-24 10:07:03 -06:00
Nishant Das
9d15196bed Runtime Fixes (#3300) 2019-08-24 07:26:25 -06:00
Nishant Das
111f225177 Remove IsAttCanonical From Operations Service (#3298) 2019-08-24 06:50:43 -06:00
terence tsao
a31057de83
Fixed a few more init beacon node bugs (#3297) 2019-08-23 22:02:34 -06:00
terence tsao
5294caf5e8
Save validators upon chainstart (#3295) 2019-08-23 19:59:09 -06:00
Preston Van Loon
a852d610e2 Add panic handler (#3296) 2019-08-23 19:15:02 -06:00
terence tsao
3b422cb9c6
fixed conflict att log (#3294) 2019-08-23 17:23:19 -06:00
Preston Van Loon
b04bfb87a8
only attempt discv5 listener when no-discovery is not present (#3293) 2019-08-23 17:59:59 -04:00
Preston Van Loon
0353cc533e p2p error logging (#3292) 2019-08-23 15:46:54 -06:00
Preston Van Loon
0c0ec97343
fixes (#3291) 2019-08-23 17:34:03 -04:00
terence tsao
4484558d87 Part 11 of update fork choice - tracing and spans (#3285)
* Add tracing in forkchoice service

* Gazelle
2019-08-23 15:04:06 -05:00
Preston Van Loon
ce65b11801 Beacon attestation pubsub subscriber (#3289)
* beacon attestation subscriber

* register beacon attestation handler

* fix tests
2019-08-23 14:46:04 -05:00
Raul Jordan
2e8a06d6d4
Use New Blockchain Service in RPC Package (#3286)
* new chain service usage via interface

* put in the new chain service in propose blk

* deprecate with new service for canonical block roots

* remove old chain serv absolutely in validator server

* full legacy code compatible in beacon server

* fully compliant

* full deprecation at service level

* no more mock chain serv

* fix beacon server tests

* add changes to prop server

* broken build

* --next compatible

* conditional register of chain service

* proper conversion

* nil deref
2019-08-23 13:53:07 -05:00
terence tsao
02ca2290e1
Added metrics for monitoring processed objects and competing chain (#3283) 2019-08-23 12:18:39 -06:00
terence tsao
15f052c48d Update sync to use chain info for head and finalized check point (#3288)
* Starting

* Fixed all the tests
2019-08-23 12:48:40 -05:00
Nishant Das
74df2aa0c3 Add Recent Blocks RPC Request Handler (#3281)
* add new rpc handler

* gaz

* add it back

* remove ok

* preston's comments
2019-08-23 13:10:25 -04:00
Nishant Das
22f4807e0b Implement GoodBye RPC Handler (#3282)
* add handler

* gaz and addition to main rpc method

* remove todo

* preston's comments

* gaz
2019-08-23 12:53:38 -04:00
Raul Jordan
7f475bee00
no cache tests (#3284) 2019-08-23 09:56:48 -05:00
Nishant Das
ebb0e398d3 Deposit Cache Fix (#3280)
* fix cache

* fix spacing
2019-08-22 22:49:03 -04:00
Raul Jordan
f342224410
Full RPC Package Compliance With New DB Interface (#3275)
* deprecate db

* fix build

* begin integrating new db

* gaz

* use more of the new db

* newest implementation uses head state

* remove more deprecated items

* setup validators in state helper

* fix up some tests with the new db

* resolve broken build

* gaz

* begin ensuring tests pass

* optional idx

* list validator balances passing

* default page size passing

* only two failing

* fixed most tests, found edge case

* allow nil return and add proper tests

* pass tests

* fix head block root problem

* working with the new db

* every ethereumapis method now compliant with both dbs

* pass in db into server

* proposer server all compliant

* validator service fully compliant

* fix broken build, tests pass

* spacing

* compute state root and propose block tests passing with new db

* complete proposer server tests revamp

* validator tests halfway through passing with new db

* more validator server tests

* more than halfway there

* so so close

* all validators tests done

* attester server tests fixing

* use new api

* attester server complete

* complete
2019-08-22 20:39:06 -05:00
terence tsao
c47598514c Part 9 of update fork choice - HeadBlock and HeadState getters (#3279)
* Headblock and headstate getters

* Moved mutex around
2019-08-22 20:13:56 -05:00
terence tsao
0d64f7b80e Part 6 of update fork choice - implement new ReceiveAttestation (#3246)
* Implemented new fork choice service and helpers

* Added rest of the tests

* Lint

* Add back helpers test

* Reformatted to doc, helpers and metrics.go

* include new getter for block

* create block filters from indices

* give every block index a unique bucket

* construct block indices by bucket mmap

* almost done save for the block filters

* include block filters, need a few more small touches for fetching the proper indices by bucket

* full functionality to filter by parent root

* tests pass when using the same logic as attestations

* todo

* proper todo formatting

* first minimum slot range filter

* slot range filters pass

* more filter criteria passing

* tests passing

* add todos

* all block tests pass and work

* rem fmt

* range retrieval test

* fixed test conditions

* instantiate the other buckets

* simplify bucket lookups

* deprecate non map code

* revamp to remove old index prefixes

* create indices from data

* create indices from data

* fetch block roots by slot range

* better abstractions

* simpler abstractions

* roots rename

* comment

* preston feedback

* Fixed existing tests

* allow blocks without parent root

* Cleaned up a few things

* Removed todo

* Lint

* Cleaned up a few things

* A few functions don't need to be exported

* Gaz

* Fixed visibility

* Review feedback

* Review feedback part1

* Raul's feedback, refactored OnBlock and OnAttestation to its own file

* Fixed grammar

* Lint

* Implemented ReceiveAttestation

* Use time.Time

* Implemented ReceiveAttestation

* All tests pass

* Lint

* Oooops

* Typo
2019-08-22 20:00:55 -05:00
Preston Van Loon
b59b3ec09c
P2P implement message send (#3278)
* return a stream with send, for reading response

* gofmt

* added sender impl

* fix imports
2019-08-22 19:02:46 -04:00
Raul Jordan
8f01b76366
Integrate DB Refactor Into Ethereum APIs Beacon Chain Server (#3245)
* deprecate db

* fix build

* begin integrating new db

* gaz

* use more of the new db

* newest implementation uses head state

* remove more deprecated items

* setup validators in state helper

* fix up some tests with the new db

* resolve broken build

* gaz

* begin ensuring tests pass

* optional idx

* list validator balances passing

* default page size passing

* only two failing

* fixed most tests, found edge case

* allow nil return and add proper tests

* pass tests

* fix head block root problem

* working with the new db

* every ethereumapis method now compliant with both dbs

* pass in db into server
2019-08-22 15:28:53 -05:00
Preston Van Loon
ce28feea45 Regular sync: pubsub subscriber for beacon blocks (#3220)
* add validation

* add block db check in validation

* merge

* in memory caching of seen blocks

* basic block processing

* Update BUILD.bazel

* use new receiveBlockNoPubsub

* fix build

* add TODO issue numbers

* add TODO issue numbers

* lint
2019-08-22 13:11:52 -05:00
terence tsao
2e352cf5ff Add getter for GenesisTime (#3274)
* Add getter for gensis time

* Lint

* Lint
2019-08-22 11:41:05 -05:00
Nishant Das
e0d3e78746 Add Support for Static Peering (#3272)
* add test and support for static peering

* gaz

* remove delay

* add log

* handle all peers
2019-08-22 10:23:16 -05:00
Raul Jordan
bb542d2032
Basic Block/LatestVote Caching in DB Refactor (#3249)
* add block caching layer

* runlock

* lockinggg

* latest votes map

* validator latest vote deletion method added to interface

* seguin cache working

* cache size

* impl interface

* initialize caches at struct layer
2019-08-22 10:04:13 -05:00
Nishant Das
36c9a5665d
Implement Proposer Slashing Handler (#3273)
* validate proposer slashing

* add commetn

* add handler

* add

* remove

* gaz
2019-08-22 20:01:56 +05:30
Nishant Das
83083b9c65
Fix BLS Aggregation Method (#3269)
* lint

* update to new method

* fix all tests
2019-08-22 11:45:02 +05:30
Nishant Das
c09a6b87c3
Implement Attester Slashing Handler in Sync (#3260)
* add validation

* add test

* add new changes

* fix lint

* Update beacon-chain/sync/validate_attetser_slashing_test.go

Co-Authored-By: shayzluf <thezluf@gmail.com>

* terence's comments

* change key
2019-08-22 11:04:25 +05:30
terence tsao
b91639a32e
Deprecate old block chain service (#3268)
* seperate out block chain services

* Fix blockchain service config

* Gazelle

* Fixed tests
2019-08-21 19:14:24 -06:00
Preston Van Loon
4b17711702 fix startup contract check (#3267) 2019-08-21 17:48:29 -06:00
Raul Jordan
de82956088
Include Voluntary Exits Definitions in DB Refactor (#3266)
* new interface methods

* support proposer slashings

* add in the new buckets

* all crud for propoer slashings

* attester slashings complete

* all slashings crud done

* right comment

* deposit contract tests pass

* delete out of scope methods

* conform old beacon DB

* comment

* include interface implementations

* deprecations

* pass lint
2019-08-21 16:32:44 -05:00
Raul Jordan
3ca4d6fd91
Add Deposit Contract Methods to DB Refactor (#3264)
* new interface methods

* support proposer slashings

* add in the new buckets

* all crud for propoer slashings

* attester slashings complete

* all slashings crud done

* right comment

* deposit contract tests pass

* delete out of scope methods

* conform old beacon DB

* comment

* deprecations

* pass lint

* Update deposit_contract.go
2019-08-21 16:11:50 -05:00
Preston Van Loon
01de412956
Minor runtime fixes for --next (#3265)
* some runtime fixes

* fixes

* fixes

* fixes

* fixes

* fixes
2019-08-21 16:58:38 -04:00