Commit Graph

2010 Commits

Author SHA1 Message Date
terence tsao
a84fd21cd7 Minor Cosmetic Updates to Validator Logging (#2377)
* update validator logs

* ops, revert mid point

* do it before the wait

* delta
2019-04-25 11:10:58 -04:00
Nishant Das
75be7be646
Handle Panics In Attestation and Disable Logging (#2380)
* Revert "Use State Instead of Cached Registry (#2372)"

This reverts commit 941810ee7b.

* handle panic

* fix logging

* add test

* gazelle
2019-04-25 21:11:07 +08:00
Preston Van Loon
8abd2e51bd
Update flags.go (#2376) 2019-04-25 07:59:12 -04:00
Preston Van Loon
66f3964c1b allow CORS from anywhere (#2375) 2019-04-24 15:57:06 -05:00
terence tsao
b81eeec374 Optimize block fetch with attestation target fetch (#2373)
* 1st attemp to optimize blk fetch w/ att tgt fetch

* test test test test
2019-04-24 12:21:00 -05:00
Nishant Das
941810ee7b Use State Instead of Cached Registry (#2372)
* fix state reads

* add method to retrieve validator from state

* lint

* batch update attestation

* handle nil case

* add test

* lint

* batch update attestation

* use state instead

* fix test
2019-04-24 10:46:06 -05:00
Nishant Das
54f6fffb58 Batch Attestations in Attestation Service (#2370)
* fix state reads

* add method to retrieve validator from state

* lint

* batch update attestation

* handle nil case

* add test

* lint

* batch update attestation
2019-04-24 09:28:52 -05:00
Nishant Das
89941eec97
Fix State Reads (#2368)
* fix state reads

* add method to retrieve validator from state

* lint

* gosec
2019-04-24 19:03:55 +08:00
shayzluf
6c1740eefc Add Caching to Tree Hashing Algorithm (#1929)
* added todo to hash file in ssz

* params and copy of block cache

* start hash cache

* Hash cache implementation

* fixed some comments

* fixed promatheus duplicate counter name

* removed TODO

* change to use special expiration cache

* function name fixes junk object generator

* naming changes

* gazzle fix

* added pruning last read data test

* fixed gometallinter errors

* fix benchmarks and no int64 not serializable

* move struct from test

* add feature flag

* fix merge issues

* add featureflag to beacon and validator

* featureflag init for tests

* added feature flag to all ssz dependent tests

* remove setter func

* replace k8s tweaked expiration cache to https://github.com/karlseguin/ccache

* remove else

* change request by preston

* added init featureflags to genesis_test

* Update shared/ssz/hash_cache.go

add dot

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

* Update shared/ssz/hash_cache.go

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

* Update shared/ssz/hash_cache.go

remove extra space

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

* Update shared/params/config.go

add dot

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

* Update shared/featureconfig/config.go

remove dot

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

* Update shared/featureconfig/config.go

remove dot

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

* remove powchain from prometheus hash cache name

* fixes fron change requests

* fix change requests

* remove faulty merge test

* gazelle fix

* fix fmt.sprintf

* remove debug binary

* fix gazelle
2019-04-24 13:39:02 +08:00
Raul Jordan
e7ec153390 Interactive Validator Client Onboarding (#2362) 2019-04-23 21:29:06 -07:00
Raul Jordan
64e7db6241
Resolve Contract Address Automatically via HTTP (#2361)
* automatically resolve contract address

* Update beacon-chain/node/node.go

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

* testnet contract endpoint

* fmt

* use config in msg
2019-04-23 16:33:47 -05:00
Preston Van Loon
376aacdad6 Use infura for http provider as well (#2363) 2019-04-23 16:17:02 -05:00
Raul Jordan
44bc1c1bc6
Suggest to ClearDB if Contract Mismatches Cluster (#2360)
* clear db by default

* revert changes

* comment

* run with clear db
2019-04-23 15:52:52 -05:00
Raul Jordan
e4bbf54f9f
Hardcoded Bootstrap + Relay Nodes (#2359)
* default bootstrap node and local network flag

* default relay node value

* Update shared/p2p/service.go

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

* use no discovery
2019-04-23 15:30:59 -05:00
Raul Jordan
e36714805a
Enable Ancestor Cache By Default (#2358)
* remove ancestor cache flag

* ancestor cache on by default
2019-04-23 13:15:58 -05:00
Nishant Das
4ed86566c1 Disable RPC while Syncing (#2353)
* handle nil block

* blocking rpc till synced

* remove unused field

* remove log

* fix tests
2019-04-23 10:57:10 -05:00
Nishant Das
a8ce61b387
Remove Proto Clone from State Reads (#2349)
* add cached serialized state to reduce use of proto clone

* review comments

* review comments

* comments on cache
2019-04-23 13:04:21 +08:00
Raul Jordan
7a27d9a227
Move Inclusion Maps to Epoch Processing (#2347)
* fix broken initial sync

* tests pass
2019-04-22 21:30:37 -05:00
terence tsao
41987b2035 Renovate Mega Updates (#2332)
* Update com_github_atlassian_bazel_tools commit hash to 31382b2

* Update io_bazel_rules_k8s commit hash to e7b408f

* Update libp2p

* fixed nat

* nat
2019-04-22 22:06:24 -04:00
Raul Jordan
2d8dd203f1
Optimize LMD-GHOST Vote Counting (#2333)
* use att targets

* risky head request

* timing lmd

* fixed ancestor cache hits

* tests pass

* comment on func

* advance state transition

* advance N empty state transitions

* imports

* imports

* use risky head state

* use validator registry

* revert timing

* imports
2019-04-22 19:59:02 -05:00
Raul Jordan
cfd3e548cd Use Map for Inclusion Distance in EpochProcessing (#2346) 2019-04-22 17:08:20 -07:00
terence tsao
cda3f178cb
Optimize Attestation Inclusion Calculations (#2344) 2019-04-22 15:52:56 -07:00
Raul Jordan
629626dbe6
Loop Once Over state.LatestAttestations in Epoch Processing (#2342)
* single loop for extracting attestations

* complete
2019-04-22 17:31:01 -05:00
Preston Van Loon
19c24ecbdf
remove unused method (#2337) 2019-04-22 13:11:44 -04:00
Preston Van Loon
d00350bf75 disable pubsub signatures and verification (#2339) 2019-04-22 09:44:36 -07:00
Raul Jordan
8ada0e56b7
Advance State Transitions in Update Latest Attestation (#2336)
* advance state transition

* advance N empty state transitions

* imports

* imports
2019-04-22 11:17:12 -05:00
Nishant Das
a5def315ae Separate Registry and Balances (#2334)
* all changes

* lint

* terence's review
2019-04-22 10:52:56 -05:00
Raul Jordan
51d4965388 Enable Committee Cache By Default (#2323) 2019-04-22 06:37:42 -07:00
Nishant Das
68a9a42611 Fix CPU Profiling (#2328)
* fix

* fix validator too
2019-04-21 20:42:34 -05:00
Raul Jordan
1df15f72c4
Ensure Block Processing Failures Return an Error (#2325)
* ensure block failed processing returns an error

* fixed test

* test assertion corrected

* comments

* fix tests

* imports
2019-04-21 17:38:14 -05:00
Raul Jordan
e9a8fc6d5e
Do Not Update Validator Registry on Nil Block (#2326)
* no registry update if block is nil

* regression test

* lint
2019-04-21 16:52:50 -05:00
Raul Jordan
0ff335f254
Fix Pending Attestations RPC Call (#2304)
* pending atts

* use proposal slot

* attestation inclusion fix

* lint

* advance state transitions

* gazelle

* lint tests pass
2019-04-21 16:12:03 -05:00
Raul Jordan
ccf7beb5f7 Prevent Canceling Goroutines in Validator Client (#2324)
* do not cancel assignments goroutines

* exclude rule

* disable lostcancel for now
2019-04-21 16:49:57 -04:00
Preston Van Loon
a5da9f2dd6
Add feature flag to toggle gossip sub in p2p (#2322)
* add feature flag to enable gossip sub in p2p

* invert the enable/disable logic

* add the flag in k8s and fix tests

* gazellle

* return empty config if nil
2019-04-21 13:31:23 -04:00
Nishant Das
2af49b5c55 Fix Assingments Bug (#2320)
* fix

* fix tests
2019-04-21 11:47:53 -05:00
Preston Van Loon
c69f1e83be
Exclude all third party code from unsafeptr (#2321) 2019-04-21 11:11:18 -04:00
Preston Van Loon
67cbf774f5 Add nogo to introduce built time linting (#2317)
* Add nogo and fix lint issues

* Run gazelle

* better gazelle

* ignore external struct tags
2019-04-21 22:14:34 +08:00
Nishant Das
0499da2b95 Only Update Head of Chain with Child Blocks (#2310)
* change block child loop

* remove redundant hashing

* wrap in conditional

* gazelle

* fix test
2019-04-20 10:17:08 -05:00
Nishant Das
1f4890adde
clean up test (#2309) 2019-04-20 19:24:40 +08:00
terence tsao
1602c5d0c5
Use Withfields for Logging (#2305)
* use with fields

* gaz
2019-04-19 21:09:01 -07:00
Preston Van Loon
79bc40dcbe Provide contract address via http (#2303)
* Add contract-address webserver

* add comment

* printf
2019-04-19 14:18:35 -05:00
terence tsao
b3742544ee
Better logging for "Produced attestation..." (#2301) 2019-04-19 11:52:41 -07:00
terence tsao
a1e4199e3a add slot to Proposed new beacon block (#2302) 2019-04-19 10:41:22 -05:00
terence tsao
cc730d17af Optimize Counting Target Votes using Ancestor Cache (#2279)
* use committee cache in UpdateLatestAttestation

* fmt

* gaz

* fixed existing tests

* verify cache miss works

* gaz

* added test for committee hit and update attestation target

* verify cache miss works

* Update beacon-chain/core/helpers/committee.go

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

* rm declaring err

* add feature flag

* fork choice vote count to use cached ancestor

* comments

* fmt

* spelling and grammer

* no extra space

* renamed vars & added a test for cache miss

* lint

* add cache hit test case : )

* gaz

* Remove Enableblock, it was a copy/paste typo

* refactor cached ancestor blk getter into its own function
2019-04-18 22:26:22 -05:00
Raul Jordan
a42bdc4b6f
Add HTTP Web3 Flag to Main.Go (#2300)
* use http logger

* using http logger for past logs

* replace by http logger

* added flag in main
2019-04-18 19:05:13 -05:00
Raul Jordan
9839753880
Use HTTP RPC Endpoint for Logger to Fetch Past Logs (#2299)
* use http logger

* using http logger for past logs

* replace by http logger
2019-04-18 18:53:37 -05:00
Raul Jordan
63549e9db9
Blacklist Bad Block Hashes (#2297)
* prevent blacklisted block hashes

* comments

* test passing blacklisted blocks

* bad blocks prom counter

* Update beacon-chain/sync/receive_block.go

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

* Update beacon-chain/db/block.go

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

* fix test
2019-04-18 16:57:19 -05:00
Preston Van Loon
4f120f8205 Remote caching with GCP (#2294)
* add remote caching

* google_default_credentials

* Revert "add remote caching"

This reverts commit 2493db95578c91d97b06b4835370ffb267ef0798.

* Revert "Revert "add remote caching""

This reverts commit 310ab4b47d49e23e0866476d2617443c31410852.

* do not use default creds?

* prysm specific remote-cache properties

* --disk_cache=

* 50 jobs
2019-04-18 16:29:09 -05:00
Preston Van Loon
2018d882f1 Handle error (#2296) 2019-04-18 13:37:50 -07:00
terence tsao
2325b979ab
s/powchain/validator (#2292) 2019-04-18 10:57:21 -07:00