Commit Graph

4981 Commits

Author SHA1 Message Date
terence tsao
c0ed43d920
Refactor head info for better usages for lock (#7432)
* Refactor head info for better usages for lock

* Fix headroot test to use [32]byte{}

* go fmt: issue introduced in #7429

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-06 10:57:18 +00:00
Victor Farazdagi
842c15856b
Apply go fmt + tidy: issue introduced in #7429 (#7446) 2020-10-06 09:05:32 +00:00
Potuz
20ac925ee4
Add a journald log format option. (#7429)
* Add a journald log format option.

Add an accepted value "journald" for the --log-format flag so that
logs are directed to journald with the correct error level.

* fix docker images

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-06 04:37:16 +00:00
Raul Jordan
6e8ff10003
deep source toml (#7439) 2020-10-05 14:07:49 -07:00
Victor Farazdagi
419fad07cd
Handle nil header properly in powchain service tests (#7435) 2020-10-05 10:10:31 +00:00
Ivan Martinez
cf1c346beb
Eth2 API: Add outline for beacon endpoints (#7408)
* Start Beacon API outline

* Rename to v1

* Add impl

* Change to outline

* Add comments

* Remove unneeded items

* Fix linting

* tidy

* Fix visibility

* go.sum

* Fix deps

* Tidy

* Add check for interface type and fix pointers

* Fix pointer name

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-05 00:15:27 +00:00
Radosław Kapka
3e0b20529b
Miscellaneous code quality improvements (#7414)
* anti-patterns

* performance issues

* handle skipped defer

* gazelle fix

* misc bug risks

* make logging of proposer slashings more robust

* simplify calling span.End()

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-04 15:03:10 +00:00
Raul Jordan
d9ae2073e2
Pagination Added to ListAccounts Validator RPC Call (#7422)
* Pagination tests to list accounts

* fetch all

* gaz

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-03 17:26:39 -05:00
terence tsao
7b3efcf62b
Move read lock after hasHeadState (#7427)
* Move read lock before hasHeadState

* Export the locked version

* Update beacon-chain/blockchain/head.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* Update beacon-chain/blockchain/chain_info.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* Update beacon-chain/blockchain/chain_info.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

* Update beacon-chain/blockchain/chain_info.go

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-03 20:53:05 +00:00
terence tsao
c7d01fd73c
Add lock around fork choice store votes (#7426)
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-03 05:48:34 +00:00
Preston Van Loon
2916d183e8
Pubsub: ensure better TopicIDs validation (#7418)
* Ensure better topicIDs validation, add tests

* go mod tidy

* fix tests

Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-10-03 01:51:58 +00:00
terence tsao
c24fb792cb
Add locks around head getters (#7423) 2020-10-03 00:45:59 +00:00
Raul Jordan
70f3fcdbd9
Implement Create Account via RPC (#7400)
* add ssz rules

* regenerate protos to include deposit message

* built to match the deposit cli

* derived test

* fix up nil item

* fix up more nil items

* preston suggestion

* comment

* add missing tests to build file

* fix busted tests

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-02 16:35:28 -05:00
Victor Farazdagi
ecfdb354a7
Add new static analyzer: ineffassign (#7413)
* test defined

* first working impl

* register analyzer

* cleanup

* removes unused code

* secure rand in slasher/detection/testing

* Updates test

* fixes ineffassign type checks

* one more

Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-02 23:56:18 +03:00
terence tsao
690fa12f1a
Check block attestation length for operation pool (#7420)
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-02 20:08:06 +00:00
Nishant Das
63c1057ae6
add bootnode (#7415)
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: Preston Van Loon <preston@prysmaticlabs.com>
2020-10-02 12:28:09 -07:00
Preston Van Loon
1eee1948bb
Fall back to ValidationIgnore in the event of a validation panic (#7419)
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
2020-10-02 11:33:45 -07:00
Victor Farazdagi
e36e9250f1
enable cryptorand analyzer in slasher (#7417) 2020-10-02 19:32:21 +03:00
Nishant Das
b589ddd774
use full hash (#7416) 2020-10-02 23:08:51 +08:00
Nishant Das
ba01abbc8f
use valid build tags (#7411) 2020-10-02 12:45:58 +03:00
Nishant Das
fa82b09cec
Optimize Fetching of Eth1 Blocks (#7386)
* optimize fetching

* tests and clean up

* improve comment

* more cleanup

* lint

* dont terminate lookup

* shay and radek's review

* fix test

* Update beacon-chain/powchain/block_reader.go

* gofmt

* cleanup

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
Co-authored-by: Victor Farazdagi <simple.square@gmail.com>
Co-authored-by: rkapka <rkapka@wp.pl>
2020-10-02 15:31:05 +08:00
dv8silencer
7d9a706cfa
Warn if user is not using a supported platform (#7381)
* Add prereqs package

* Incorporate prereq check into the clients

* gazelle

* gazelle fix

* linter

* Add tests

* minor change in test

* finish up tests

* gazelle

* error during platform detection does not cause client to fail fast

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-10-02 09:45:34 +03:00
Raul Jordan
437bab7df0
Update EthereumAPIs (#7409)
* handle unknown validator

* tests passing

* tidy
2020-10-01 22:04:48 -04:00
bidlocode
ee747ca6d4
add display contract (#7407)
* add display contract
2020-10-01 22:55:49 +00:00
terence tsao
de93551332
Ensure span ends (#7405)
* Ensure span ends
* Merge refs/heads/master into span-ends
* Merge refs/heads/master into span-ends
* Add missed span end
* Merge branch 'span-ends' of github.com:prysmaticlabs/prysm into span-ends
* Merge refs/heads/master into span-ends
2020-10-01 21:13:27 +00:00
terence tsao
0839f10dbc
Add lock around feature config (#7406)
* Add lock
2020-10-01 20:35:44 +00:00
Victor Farazdagi
d169b490fa
Fix ineffectual assignments (#7403)
* update rpc/beacon
* more fixes to beacon-chain/rpc
* update beacon-chain/sync
* Merge refs/heads/master into fix-ineffectual-assignments
* updates beacon-chain/p2p
* Merge branch 'fix-ineffectual-assignments' of github.com:prysmaticlabs/prysm into fix-ineffectual-assignments
* update beacon-chain/*
* fix imports
* update beacon-chain/blockchain
* more updates
* Merge refs/heads/master into fix-ineffectual-assignments
* Merge branch 'master' into fix-ineffectual-assignments
* Merge refs/heads/master into fix-ineffectual-assignments
* next round of updated
* Merge branch 'fix-ineffectual-assignments' of github.com:prysmaticlabs/prysm into fix-ineffectual-assignments
* wrap up remaining items
2020-10-01 18:53:36 +00:00
terence tsao
490cf9b7ba
Remove logging of password if fails (#7404)
* Remove logging of password if fails
2020-10-01 17:41:23 +00:00
Victor Farazdagi
95a5b4945b
Fixes incorrect checks for errors in several tests (#7392)
* fixes TestServer_ListAssignments_Pagination_InputOutOfRange
* fixes TestServer_ListValidatorBalances_PaginationOutOfRange
* fix TestServer_ListAttestations_Genesis
* remove redundant TestServer_GetValidatorParticipation_DoesntExist and TestGetDuties_NextEpoch_CantFindValidatorIdx
* Merge branch 'master' into fix-invalid-errcheck-tests
* remove unnecessary import
* fix TestStore_OnAttestation
* fix TestStore_OnAttestationUsingCheckptCache
* fix TestVerifyBlkDescendant
* fix pagination tests
* fix account v2 tests
* fix account v2 tests (remote)
* fix TestServer_JWTInterceptor_BadToken
* Merge refs/heads/master into fix-invalid-errcheck-tests
2020-10-01 14:38:53 +00:00
Victor Farazdagi
4aea039324
Remove unused constant in round robin (#7402)
* remove unused constant
2020-10-01 13:02:47 +00:00
Raul Jordan
23181c8629
Implement Backup and Delete Accounts via RPC (#7397)
* begin with delete accounts impl

* delete tests passing

* started backup, delete tests all passing

* implement backup using zip

* backup implementation done with unzip tests

* full tests done

* used proper error codes

* remove comment

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-30 22:37:38 -05:00
Preston Van Loon
d23b247a82
DB: Return error when saving nil eth1data (#7396)
* Return an error on saving nil eth1data
* gofmt
* Merge branch 'master' into return-error-on-nil
* Merge refs/heads/master into return-error-on-nil
* Merge refs/heads/master into return-error-on-nil
2020-09-30 23:23:22 +00:00
terence tsao
5178474280
Check err for filterAttestationsForBlockInclusion (#7398)
* Check err for
* Merge refs/heads/master into check-err
2020-09-30 22:45:17 +00:00
terence tsao
d5caee35fa
Update min genesis time for Zinken (#7395)
* Update min genesis time
* Merge refs/heads/master into update-zinken-config
2020-09-30 22:09:23 +00:00
bidlocode
558ee2678b
Optional services flags (#7358)
* add DisableMonitoringFlag(--disable-monitoring) to validator
* add EnableRPCFlag(--rpc) to validator (now rpc and grpc-gateway disabled by default)
* add DisableMonitoringFlag(--disable-monitoring) to slasher
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into optional-services-flags
* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into optional-services-flags
* Merge branch 'master' into optional-services-flags
2020-09-30 20:55:56 +00:00
Raul Jordan
e1f8a37710
Import Accounts RPC Implementation (#7389)
* implement the import function

* begin tests for import keystores and add preconditions

* import implementation done

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-30 14:03:54 -05:00
terence tsao
e07b71b81d
Add Zinken config (#7391) 2020-09-30 11:19:05 -07:00
Victor Farazdagi
db92d90309
Removes unused validator flags (#7388)
* removes unused validator flags
* Merge branch 'master' into remove-unused-validator-flags
2020-09-30 16:55:18 +00:00
terence tsao
e2eb2fb0d8
Ensure genesis state retrieval doesn't use zero hashes root (#7378)
* Cover genesis zero hashes case
* Merge branch 'master' into genesis-zero-hashes
* Cover an edge case pre genesis with fresh db
* Move state by root outside of the if
* Merge refs/heads/master into genesis-zero-hashes
* Clarify comments on why zero hashes used
* Merge branch 'genesis-zero-hashes' of github.com:prysmaticlabs/prysm into genesis-zero-hashes
* Merge refs/heads/master into genesis-zero-hashes
* Merge refs/heads/master into genesis-zero-hashes
* Merge refs/heads/master into genesis-zero-hashes
2020-09-30 15:41:09 +00:00
Shay Zluf
953960c860
Add slasher support for different testnets (#7385)
* Add slasher support for different testnets
* Merge branch 'master' into slasher_testnet_support
2020-09-30 15:08:03 +00:00
dv8silencer
7664eab32d
Introduce checks for existing wallets into two edge cases (#7349)
* Add check for preexisting wallet

* Reminder

* Create another check.  Adjust tests

* Wording in comment

* Remove unnecessary logic.  Add another regression test.

* Spacing

* Prepare to merge master

* Refactor wallet checks

* Fixed test

* Revert back to original location of check

* Fix test

* Fix test

* Address linter feedback

* Align CreateWallet() with recent changes

* Align RecoverWallet with recent changes

* Correct test error message

* Refactor test to minimize duplication

* rename to isValid and adjust function code

* refactor

* Improve IsValid()

* Fix tests

* Remove comment

* Fix documentation of IsValid()

* Align behavior of OpenWalletOrElseCli

* Fix tests

* Realigning error msg with prior behavior

* Fix another test

* Correct logic

* small change in logic

* Fix err messages

* Create consts for repeated strings

* Add comments to new constants

* gofmt

* Adjust WalletConfig behavior so it is closer to prior-to-PR.  Adjust test accordingly

* adjust error messages

Co-authored-by: dv8silencer <15720668+dv8silencer@users.noreply.github.com>
2020-09-30 16:13:37 +02:00
Raul Jordan
16cdcf5dec
Remove Deposit Command from Validator Client (#7379)
* remove deposit code
* Merge refs/heads/master into remove-deposit
2020-09-30 06:42:16 +00:00
Nishant Das
3b5ef50733
Fix Finalized Epoch Checks (#7364)
* fix up epoch checks

* build

* comp tests

* preston's comment
2020-09-30 08:25:25 +08:00
George Carder
529554f3f9
accommodate systems that use sha256sum (#7370)
* accommodate systems that use sha256sum
* cleaner use of checkSum
* Merge branch 'master' into shell_script_support4_sha256sum
* Merge branch 'master' into shell_script_support4_sha256sum
2020-09-29 12:22:35 +00:00
Radosław Kapka
fe9921457c
Fix failing static analyzer tests (#7363)
* add "want" expectations
* add build step with analyzer tests
* add colon to yml
* Merge refs/heads/master into fix-analyzer-test-expectations
* Merge refs/heads/master into fix-analyzer-test-expectations
* Merge refs/heads/master into fix-analyzer-test-expectations
* Merge refs/heads/master into fix-analyzer-test-expectations
* remove tests from CI
* readme file
* change header size
2020-09-29 11:29:40 +00:00
terence tsao
bedb16cfb0
Update badge to v0.12.3 (#7367)
* Update badge to v0.12.3
* Merge refs/heads/master into terencechain-patch-1
* Merge refs/heads/master into terencechain-patch-1
2020-09-29 06:10:11 +00:00
Preston Van Loon
0921c00094
Remove processSlots from slashing check (#7357)
* Remove processSlots from slashing check

* imports

* imports

* PR feedback from @nisdas

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-09-29 13:22:55 +08:00
Raul Jordan
6ef4995329
Remaining Proto Definitions for Validator RPC Methods (#7368)
* import, delete, backup, and create acct
* Merge branch 'master' into rpc-changes
* impl methods
* Merge branch 'rpc-changes' of github.com:prysmaticlabs/prysm into rpc-changes
* wallet import comment
2020-09-29 01:58:14 +00:00
Victor Farazdagi
1e0b4e150e
Fixes NotNil assertion (#7365)
* fixes NotNil assertion
* cover case of basic types
* removes redundant line
* Update TestStore_UpdateCheckpointState
* fixes TestPruneHistoryBlkHdr
2020-09-28 21:32:58 +00:00
Radosław Kapka
951c139cff
Fix URL to voluntary exit documentation (#7361)
* fix documentation URL
2020-09-27 22:12:28 +00:00