Commit Graph

1935 Commits

Author SHA1 Message Date
Raul Jordan
249ec8751b Revert "Implement Cache Committee for RPC Server (#2151)" (#2227) 2019-04-11 07:50:01 +10:00
terence tsao
c2deace3f4 Implement Cache Committee for RPC Server (#2151)
* add committees cache

* Hook committee cache to rpc service

* fixed TestCommitteeAssignment_OK

* comments for ValidatorAssignment

* added tests for committees cache

* more updates to committee_cache_test.go

* new tests in validator_Server_test for cached/uncached scenearios

* removed ????

* gaz

* fmt

* added feature flags

* fmt

* remove hello

* uncomment

* lint

* Update beacon-chain/rpc/validator_server.go

Co-Authored-By: terenc3t <terence@prysmaticlabs.com>

* preseton's feedback

* better err handling

* fixed tests
2019-04-10 03:36:49 -04:00
Nishant Das
98042c613d
Update State to Include Current and Previous Justified Roots (#2186)
* update protos

* Revert "Use DB to Fetch Justified Block (#2172)"

This reverts commit 60c254d818.

* use justified root and previous justified root across the repo

* change attester server to use state justified root

* remove commented code

* fix build issues

* fix test

* fix all tests

* fix merge issues
2019-04-10 14:52:06 +08:00
skillful-alex
9165706805 Verify State Root in Block Processing (#1964)
* Verify State Root in Block Processing

* separated tests

* try to fix the goimports

* fix unit test error

* goimports

* fix merge error

* deleted commented lines of code

* formating

* Update block_processing_test.go

* fix merge error

* fix more merge error

* fix language error in comment
2019-04-10 02:30:17 -04:00
Nishant Das
a45b23f990
Add in Committee size to Set Bitfield (#2225)
* fix for incorrect bitfield in large committee sizes

* spacing

* Update shared/bitutil/bit.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* Update shared/bitutil/bit_test.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* Update validator/client/validator_attest.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* fix build

* fix merge issues

* fix test

* fix test

* gazelle

* Update bit_test.go
2019-04-10 13:07:06 +08:00
terence tsao
83e5492e55 Save State during Init Genesis State (#2193)
* added spans and save state during init state

* fix other svcs

* tests

* Delete saving hist state
2019-04-09 15:06:23 -04:00
Nishant Das
1ff3d7ea66 add fix (#2221) 2019-04-09 14:43:29 -04:00
Nishant Das
90fed79610 Fix Initial Sync in Restarts (#2197)
* set chainstart value

* revert change in IsSynced and add regression test

* change status

* make a better status query

* allow status check to work on restarts

* spacing
2019-04-09 14:18:23 -04:00
Nishant Das
f2b9269650 Add Withdrawal Credentials to Validator Record (#2216)
* add fix and unit test

* Update beacon-chain/core/validators/validator_test.go

Co-Authored-By: nisdas <nish1993@hotmail.com>
2019-04-09 14:03:31 -04:00
frederickalcantara
24dd4cc1e0 FIx Run Beacon Chain docs (#2201) 2019-04-09 15:16:24 +08:00
Nishant Das
775f4d64a5
Update Travis (#2215)
* update travis

* update binutils

* upgrade binutils version

* remove cache

* none of this works

* upgrade ubuntu version

* lint fixes
2019-04-09 09:57:09 +08:00
terence tsao
97b5ef0cc2
remove unused funcs and vars (#2214) 2019-04-08 16:29:02 +10:00
Preston Van Loon
97b184e5c7
Historical pruning by flag only (#2210)
* add flag

* use flag

* fixes
2019-04-07 22:46:55 -04:00
terence tsao
771c4c0b0f
Renovate Big Update (#2209) 2019-04-08 12:24:27 +10:00
Nishant Das
b2f3449b96 remove unused method (#2198) 2019-04-07 11:50:11 -05:00
terence tsao
65631f1829
fml, swapped genesis slot with epoch... (#2185) 2019-04-05 21:14:15 -07:00
Raul Jordan
3704126533
Improve Beacon Node Logging (#2175)
* improve beacon node logging

* better info logging

* much nicer balance logging

* lint

* tests
2019-04-05 22:37:46 -05:00
Preston Van Loon
c925632cc9
Add a span to block-by-slot (#2184)
* Add a span to block-by-slot

* /goroutinez
2019-04-05 19:19:27 -05:00
Preston Van Loon
9a6a275d3d
Use /healthz for liveness and readiness probes in beacon chain (#2180)
* lower the p2p peer count minimum for a successful status

* add liveness and health probes

* 5m instead of 2m
2019-04-05 17:05:28 -05:00
terence tsao
56210fd81f Export Attestations Votes via Prometheus (#2170)
* starting metrics

* finished vote metrics

* if block is nil
2019-04-05 16:55:11 -05:00
Raul Jordan
0d2d7a558f If At Genesis or !ChainStarted, Return Healthy Sync Status (#2183)
* genesis or not chainstarted

* is synced

* lint

* tests pass
2019-04-05 16:40:53 -05:00
Raul Jordan
de0f4ad278
Correct Sync Status for Healthz (#2182)
* is synced status

* is synced

* Update beacon-chain/sync/service.go
2019-04-05 16:06:04 -05:00
Preston Van Loon
3ec9fc0b8f lower the p2p peer count minimum for a successful status (#2179) 2019-04-05 15:09:05 -05:00
Preston Van Loon
0bd4489bc3 add span tag (#2176) 2019-04-05 15:00:35 -05:00
Raul Jordan
60c254d818
Use DB to Fetch Justified Block (#2172)
* builds

* db tests in core

* spacing

* Gazelle

* fix lint

* iterative block root loop

* Update beacon-chain/core/blocks/block_operations_test.go

Co-Authored-By: rauljordan <raul@prysmaticlabs.com>

* imports
2019-04-05 14:48:49 -05:00
Preston Van Loon
55ca5cc2c3
do bootstrap p2p (#2177) 2019-04-05 14:30:41 -05:00
terence tsao
674074cd16 Handle skip blocks when fetching justified block for producing attestations (#2174)
* recursive get !nil blocks

* update test
2019-04-05 14:15:08 -05:00
Preston Van Loon
f16e54ee96 Update go-ethereum upstream and resolve API changes (#2171) 2019-04-05 10:54:38 -07:00
Preston Van Loon
d7488b9a1e
Support multiple pubkeys for committee assignments (#2164)
* support multiple pubkeys

* a bit of refactoring to avoid calling db.state multiple times

* Add test for supporting multiple keys

* rename proto field
2019-04-05 10:10:13 -05:00
Preston Van Loon
e94838e9ec
Revert removal of state root computation (#2168)
* Revert "disable state root computation"

This reverts commit ba7368ac57f3ecd3cb710049e677ba60a820dd82.

* Revert "tests fixed"

This reverts commit 1141af27c253ca000de0a63f0e1c91d983078ebc.

* Fix build, skip test until https://github.com/prysmaticlabs/prysm/issues/2167
2019-04-05 09:58:33 -05:00
Preston Van Loon
d19775dff9
Update rollout strategy for validators to 5% max unavailable with no surging (#2169)
* use better rollout strategy

* fix
2019-04-05 09:51:38 -05:00
terence tsao
a19f08f7b6 Attestation Using Head State instead of Latest State (#2156)
* headRoot is a better name

* yay merged with master

* fixed attester server returning incorrect attestation field values

* revert stupid mock changes

* fixed and updated all the tests

* uncomment

* head start should handle skip blocks

* Raul's feedback
2019-04-05 09:41:49 -05:00
Preston Van Loon
9abefc386d Remove redundant assignments request in validator attesting routine (#2166)
* remove redunant assignments request in validator attesting routine

* fix test
2019-04-05 14:29:13 +08:00
Preston Van Loon
83130358a9
Rollback state to handle side chain with skip blocks (#2147)
* Add initial test

* chkpt

* add failing test

* add span to historical state lookup

* use db.HighestBlockSlot()

* fix comment

* update comment

* i wrote a test like a good programmer.

* add test back

* add assertion and unskip test, something new failing tho

* trying to fix test

* remove -1, not sure if i need it yet

* Revert "remove -1, not sure if i need it yet"

This reverts commit 2cfcbb8108b28bb3d7135a993d9053150d5f1e6e.

* save historical state on every save state

* fix hsitorical states

* set historical state in initialize state

* change to a bool

* fix error with empty retrieval of states

* Add missing import

* fix test

* lock in receive block

* remove state generator

* Revert "lock in receive block"

This reverts commit 151b10829d70b2dad3055a8db36d0e1269a853f2.

* Fix Initial Sync Not Processing Canonical Block to Produce Canonical State (#2152)

* fix init sync

* fatal if highest observed root does not match

* proto fields

* Update beacon-chain/sync/initial-sync/service.go

* confirm canonical state root

* fix most tests

* failing test

* fix PR tests

* lint

* no simbackend changes

* logf revert

* add todo

* fix off by one

* fix test with deleted property

* merge #2157

* passing tests :)
2019-04-04 22:39:51 -05:00
Nishant Das
687f797dd8 Post Chainstart Fix (#2158)
* fixed seed and correct epoch

* fix test and add comments
2019-04-04 20:13:49 -07:00
Preston Van Loon
47e631d4ff Update the pending deposits metrics on pruning (#2163)
* update the pending deposits on prune

* use float64 *facepalm*
2019-04-05 10:28:00 +08:00
Preston Van Loon
f670a134a0
More span tags in validator (#2162)
* add more tags to spans when proposing a block

* more stuff tags on attestation span

* add slot
2019-04-04 20:23:48 -05:00
Preston Van Loon
ae4425ac2d add more tags to spans when proposing a block (#2161) 2019-04-04 18:07:15 -07:00
Preston Van Loon
92eeed4c05
Handle skip blocks when fetching justified block for producing attestations (#2160)
* Use DB for fetching justified state

* enhance test
2019-04-04 15:56:20 -05:00
Preston Van Loon
40ade64ffa
don't use c.ctx, use argument ctx instead (#2157) 2019-04-04 08:30:23 -05:00
Preston Van Loon
cdab78e979 Look up justified state from database rather than state block roots (#2154)
* failing test

* passing test
2019-04-03 17:50:35 -05:00
Preston Van Loon
252b2ec3e5 Use db.HighestBlockSlot() for fork choice children reading (#2150)
* use db.HighestBlockSlot()

* fix comment

* update comment

* i wrote a test like a good programmer.
2019-04-03 10:32:59 -05:00
Raul Jordan
eb900a8193
Refactor Initial Sync, Enable Catching Up to Chain (#2111)
* refactor initial sync to prevent reorg infinite loops

* lint

* fixed build

* passing tests

* tests passing

* terence suggestion

* new attempt

* clean up and refactor sync service

* complete the new initial sync logic

* revert head

* init sync working

* config for blockchain receive block

* all works

* builds

* fix a few more tests

* init sync tests pass

* revert scripts

* revert accounts changes

* lint

* lint2

* travis lint

* fix build

* fix single use argument

* any peer

* imports spacing

* imports

* ready for a rolling restart

* add todo

* fork choice in blocks when exiting sync

* readd finalized state root to requests

* successful build

* revert blockchain config

* old config reversion

* initial sync tests pass

* initial sync full test works

* lint

* use the new block processing api

* new proto defs

* init sync functions again

* remove sync polling

* tests fixed

* fixed catching up with chain

* tests pass

* spacing

* lint

* goimports

* add changes

* add lock and conditional to prevent multiple goroutines

* make reg sync synchronous

* add

* fixed the parent block issue

* fix errors in chain service

* tests pass

* check nil block

* typo

* fix nil state

* merge & conflicts

* revert synchronus reg sync

* add more spans to state db

* fix lint

* lint
2019-04-03 10:13:19 -05:00
terence tsao
fa063c85ca
Remove unused service fields (#2139) 2019-04-03 07:59:18 -07:00
Ivan Martinez
89531c1667 Fix bash scripts for initializing beacon-chain (#2080)
* Fix bash scripts for chain

* Fix flag

* Change sendDeposits.go to handle multiple keys

* Fix scripts for startup
2019-04-02 15:45:40 -05:00
Raul Jordan
a057c07830 Reduce State Size (#2144)
* reduce state size

* lint

* fork data

* addressed broken build

* make values 5x slots per epoch

* 5 epochs worth of arrays

* add back slash balances

* rem items

* test

* imports
2019-04-03 02:04:51 +08:00
terence tsao
1a6d2e0114
Efficient logging for attestations (#2146) 2019-04-02 09:54:13 -07:00
Preston Van Loon
8ff30a6620
Add more spans to state db (#2145)
* add more spans to state db

* clone on save too
2019-04-02 11:33:27 -05:00
Preston Van Loon
76e30200fe Pass ctx to saveState (#2141)
* pass ctx to saveState

* add span
2019-04-02 16:49:45 +08:00
Preston Van Loon
ff1a6f0b62 use infura for now (#2140) 2019-04-01 21:41:31 -05:00