Commit Graph

1982 Commits

Author SHA1 Message Date
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
Raul Jordan
ffdc16a304
Use Parent State When Processing Blocks (#2291)
* parent fork fix

* tests
2019-04-18 12:40:46 -05:00
shayzluf
0732012459 Validator-multiple key (#2069)
* first version - broken

* working proto changes

* resolve review remarks

* fix goimport issues

* fix service issues

* first logic version-broken

* first running version - no new tests

* fix validator client test

* add wait group to goroutines

* remove unused var in function call

* fix review remarks and tests

* merge master changes and fix conflicts

* gazzele fix

* fix prestonvanloon requested changes

* merge and some of terenc3t remarks addressed

* _,pk bug fix in log

* fix account file name suffix and filter not active validator out

* merge with master and fix missing parameters

* run over all public keys in hasvalidators

* add test for error when no all the validators has index in the db and hasvalidators is called

* fix runner tests fail due to timing issues

* goimports

* smaller sleep time in proposer tests

* fix UpdateAssignments loging

* fix goimports

* added && false commented TestUpdateAssignments_DoesNothingWhenNotEpochStartAndAlreadyExistingAssignments

* hasvalidators without missing publickeys list

* fix some of prestone review remarks

* fixes for prestone comments

* review changes applied

* expect context call in TestWaitForActivation_ValidatorOriginallyExists

* changed hasvalidators to return true if one validator exists

* fix init problem to getkeys

* hasvalidators requiers all validators to be in db

* validator attest assignments update

* fix ap var name

* Change name to hasallvalidators

* fix tests

* update script, fix any vs all validator calls

* fix wait for activation

* filter validator

* reuse the reply block

* fix imports

* Remove dup

* better lookup of active validators

* better filter active vlaidators, still need to fix committee assignment tests

* lint

* use activated keys

* fix for postchainstart

* fix logging

* move state transitions

* hasanyvalidator and hasallvalidators

* fix tests with updatechainhead missing

* add tests

* fix TestCommitteeAssignment_OK

* fix test

* fix validator tests

* fix TestCommitteeAssignment_multipleKeys_OK and TestWaitForActivation_ValidatorOriginallyExists

* fix goimports

* removed unused param from assignment

* change string(pk) to hex.EncodeString(pk) fix change requests

* add inactive validator status to assignments

* fix logging mess due to multi validator setup

* set no assignment to debug level

* log assignments every epoch

* logging fixes

* fixed runtime by using the right assignments

* correct activation request

* fix the validator panic

* correct assignment

* fix test fail and waitforactivation

* performance log issue fix

* fix goimports

* add log message with truncated pk for attest

* add truncated pk to attest and propose logs

* Add comment to script, change 9 to 8

* Update assignment log

* Add comment, report number of assignments

* Use WithError, add validator as field, merge block proposal log

* Update validator_propose.go

* fix

* use entry.String()

* fix fmt
2019-04-18 12:23:38 -05:00
terence tsao
e51c2e5540 Use VerifyAttestation to Filter Attestation (#2281)
* use verify attestation to filter and tests

* fmt

* preston's feedback

* warn -> error

* Use WithError

* use WithError and Warn

* lint
2019-04-17 18:10:55 -05:00
Nishant Das
4e7eb21594 Fix Validator Store (#2277)
* add fix and tests

* fix lint

* lint
2019-04-17 13:57:13 -05:00
terence tsao
e4e6940c17
Update Latest Attestations Use Committee Cache (#2265) 2019-04-16 20:08:55 -07:00
Preston Van Loon
ecebea01c0 Fix recycling of cluster private keys (#2275)
* fix recycling of private keys

* Update cluster-manager.yaml
2019-04-16 21:23:31 -05:00
terence tsao
8a6b55e93c
test attestations are equal (#2274) 2019-04-16 17:09:31 -07:00
terence tsao
a9da23f444 Proposer Server Filters Attestation by Canonical (#2271)
* filter attestations by canonical

* fix test

* added mutex

* fixed rpc tests

* forgot to init map, all existing tests passing

* added test for filter non-canonical atts

* lint
2019-04-16 13:19:31 -05:00
Raul Jordan
3e525ebe8b
Block Deletion Upon Block State Transition Error (#2270)
* block deletion upon block state transition error

* include tests

* tests complete

* comment

* imports spacing
2019-04-16 13:06:53 -05:00
terence tsao
6b4396bbfd
Cache Block Ancestor for Fork Choice (#2269) 2019-04-16 08:36:02 -07:00
terence tsao
3e52287570 Major Renovate Updates (#2264)
* Update dependency com_github_spf13_cobra to v0.0.3

* Update dependency com_github_allegro_bigcache to v1

* Update dependency com_github_hashicorp_go_multierror to v1

* Update dependency com_github_x_cray_logrus_prefixed_formatter to v0.5.2

* Update dependency com_github_fd_go_nat to v1

* Update dependency com_github_matttproud_golang_protobuf_extensions to v1

* Update dependency com_github_grpc_ecosystem_go_grpc_middleware to v1

* Update io_bazel_rules_k8s commit hash to 8b2d62a

* Update prysm_testnet_site commit hash to 3d0a15d

* Update dependency build_bazel_rules_nodejs to v0.27.10

* Update dependency io_bazel_rules_go to v0.18.2

* Update dependency io_opencensus_go to v0.20.0

* Update libp2p

* Update WORKSPACE

* Update com_github_atlassian_bazel_tools commit hash to e31d79d

* Update io_bazel_rules_k8s commit hash to 50fb3c2

* Update dependency build_bazel_rules_nodejs to v0.27.12

* Update dependency com_github_coreos_go_semver to v0.3.0

* Update dependency com_github_prometheus_client_golang to v0.9.2

* Update dependency com_github_prometheus_common to v0.3.0

* Update dependency com_google_cloud_go to v0.37.4

* Update dependency io_bazel_rules_go to v0.18.3

* Update dependency io_opencensus_go to v0.20.2

* Update dependency org_golang_google_api to v0.3.2

* Update dependency solium to v1.2.4

* Update libp2p

* Update dependency com_github_beorn7_perks to v1

* Update dependency com_github_google_gofuzz to v1

* retry nat
2019-04-15 18:32:59 +08:00
Raul Jordan
fd5dac549d
Initialize Feature Config in Simulated Backend (#2240)
* init feature config in backend

* Gazelle
2019-04-14 23:26:55 -05:00
Preston Van Loon
2148a83b02
Update cluster pk manager to assign multiple keys to validators (#2112)
* checkpoint

* move lock

* checkpoint

* checkpoint

* chkpt

* update readme so i know what im supposed to do

* ckpt

* checkpoint

* checkpoint

* chkpt

* Fix image build

* handle errors

* add port to pod

* lint

* Update beacon-config.config.yaml

* lint
2019-04-14 17:53:34 -04:00
Preston Van Loon
4659b4a2da
Add database methods for has any or all validators (#2246)
*  add methods for has any or as hall validators

* gazelle
2019-04-14 20:02:14 +10:00
Ivan Martinez
62279489a3 Add deposit index to beacon state (#2232)
* Begin adding Deposit Index to beacon state

* Move deposit index increment to ProcessDeposit

* Fix initial deposits bug

* Fix bug in RPC

* More bug fixes

* Fix RPC bug, ensure deposits are processed in the right order

* Fix tests

* Fix merge

* Attempt to fix pruning deposits on regular sync

* Fix pending deposits on node restart

* Fix test

* Fix tests properly

* Gofmt

* Remove unneeded logs

* Fix build
2019-04-14 18:17:39 +10:00
Raul Jordan
19a5e35be9 Apply Fork Choice at End of Ancestor Block Fetching (#2244)
* recursively process blocks and apply fork choice at end

* no duplicate calls

* add back spans

* Update beacon-chain/sync/receive_block.go
2019-04-14 08:23:59 +10:00
Preston Van Loon
82bd94b42d
do not directly dial a peer we cannot reach (#2245) 2019-04-14 08:04:17 +10:00
Preston Van Loon
6ebd3a0319
--enable-committees-cache as default for beacon-chain (#2242) 2019-04-13 06:19:24 +10:00
terence tsao
ae3eb0f199 fixed comments (#2234) 2019-04-12 11:43:28 -05:00
terence tsao
5a1cfacc80 Use Committee Cache for Assignment (#2237)
* fixed comments

* fixed comments

* use committee cache for CommitteeAssignment

* added tests for using cache for assignment

* addressed preston's feedback

* addressed nishant's feedback
2019-04-12 10:31:01 -05:00
Nishant Das
cb0c08c285 Add Lock to Block Processing in Sync (#2239)
* add lock

* remove context

* add announcements lock

* fix test

* fix transition

* change ordering of return args
2019-04-12 10:11:15 -05:00
Preston Van Loon
fa5d627545
Remove too many spans in block/slot/epoch processing (#2236)
* remove too many spans

* gazelle
2019-04-12 00:55:07 -04:00
Jerry Fireman
c0cc5c0295 Update docs (#2173)
* Update docs

* Update docs
2019-04-11 14:50:16 -05:00
terence tsao
b6bd8ba63d Committee Cache for State Transition (#2228)
* starting to get feedback

* better name

* export the necessary variables

* finished implementation in AttestationParticipants

* refactor deopendency issue

* gaz and fixed cache test

* fixed all the tests and lint

* clean up part 1

* lint

* fixed test

* fixed visibility

* cache tests for AttestationParticipants
2019-04-11 14:34:23 -05:00
Nishant Das
7ffe928e87 Add Regression Test for Genesis ETH1Data (#2231)
* add regression test

* gazelle
2019-04-11 12:14:52 -05:00
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