Commit Graph

317 Commits

Author SHA1 Message Date
Dan
9ac950f480 Added the 'enable-upnp' flag to the list of command line args (#2860)
* Added the 'enable-upnp' flag to the list of supported command line arguments.

If the user specifies this feature flag (adds --enable-upnp as an argument) - the Beacon-chain and Validator services, when started, will initialize libp2p with the UPNP options.

* Added the new arg to usage.go due to test failure

* Update shared/p2p/service.go

Changed the logging according to Preston's recommendation.

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Code review changes:

1. File formatting.
2. Command line arg more detailed description.
2019-06-26 12:59:37 -07:00
Preston Van Loon
9bd6147027
BLS spec tests (#2826)
* bls spec tests

* add more bls tests

* use ioutil instead of bazel runfiles

* dont read bytes

* skip tests that overflow uint64

* manually fix input data

* add tests

* lint and gaz

* add all new changes

* some refactoring, cleanup, remove new API methods that only exist for tests

* gaz

* Remove yamls, skip test
2019-06-25 12:57:47 -04:00
Preston Van Loon
cebefde335
Update config.go to fix BLS issue (#2821)
* Update config.go

* fix test
2019-06-18 18:02:01 -04:00
Hsien-Tang Kao
3a167e54b5 Properly log and handle HTTP server error (#2685) 2019-06-12 19:58:49 -04:00
Nishant Das
663490ee1f Update Phore Dependency to the latest version (#2792)
* add new changes

* fix typos
2019-06-12 11:06:39 -05:00
Preston Van Loon
d9ee55013d
Use generalized examples in test (#2786) 2019-06-10 14:29:15 -04:00
renovate[bot]
9793de59a6 Update libp2p (#2783)
* Update libp2p

* Update libp2p, remove unused WORKSPACE go_repositories, fix test
2019-06-10 12:17:42 -04:00
Preston Van Loon
fbac09c1f6
Add go maxprocs metric (#2765) 2019-06-07 15:43:22 -04:00
Preston Van Loon
55bedd0745 Move go-ssz to external repo under MIT license (#2722) 2019-05-29 18:04:25 -07:00
Antoine Toulme
932e68571b expose p2p private key for static peering (#2719)
* expose p2p private key for static peering

* Review revisions

* Use testutil.TempDir()

* Use testing.T to report fatal errors
2019-05-29 15:43:23 -04:00
Antoine Toulme
fcc54317a3 Fix static peering (#2725)
* Fix static peering

* Fix import and use a slice to assemble peers to watch for

* Add a check for zero-length

* Fix duplicate import
2019-05-29 15:30:26 -04:00
Preston Van Loon
9ce5de3d95 Add flag to whitelist certain connections (#2716) 2019-05-28 05:54:49 -07:00
Dan
b040ac909e Persistent logs (#2660)
* added file log feature

* moved the logic to one central location (shared/logutil/logutil.go), removed new line chars from file logs

* removed a resdundant temp file refrences that went into beachon-chain/BUILD.bazel by mistake

* Update shared/cmd/flags.go

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

* Update shared/cmd/flags.go

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

* manually added loguitl dep to the go image target

* Manaully added the logutil dep to the go image target

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

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

* Update shared/logutil/logutil.go

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

* syntax and styling changes required by code reviewers

* Update beacon-chain/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update beacon-chain/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* changed the return type of 'ConfigurePersistentLogging' from bool, error to error based on recommendation from code review

* ran goimports in beacon-chain/main.go after tests have failed

* Update beacon-chain/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update beacon-chain/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update beacon-chain/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update shared/logutil/logutil.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Update validator/main.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>

* Changes requested by code reviewer

* Added a mandatory comment (linter required)  to the 'Fire' event

* Changed the beacon-chain and validator to support only same format stdout and file logging due to complications in the outputs when using different formats.

* Had to run gazelle --fix due to check failure
2019-05-22 09:22:11 -04:00
Raul Jordan
50063912a8 Remove Expensive Participation Rate Prometheus Gauge (#2636)
* rem expensive prom gauge

* rem prom
2019-05-17 19:57:13 -04:00
Preston Van Loon
bdf4590b86 Fix config value, yaml fixes (#2634)
* minor fixes

* go back to 8
2019-05-17 19:27:13 -04:00
Preston Van Loon
208c5dfea6 Revert "Disable libp2p TLS security protocols for now (#2622)" (#2633) 2019-05-17 18:59:01 -04:00
Nishant Das
25ce3a3676 Add Excess Deposit Flag to allow Validator Balances more than 32 ETH (#2625)
* add flags and code

* adding tests

* gaz

* Update shared/featureconfig/config.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
2019-05-17 17:10:34 -04:00
terence tsao
3349fb4cba increase slots per epoch to 16 (#2627) 2019-05-17 14:41:49 -04:00
Preston Van Loon
15cac0c0b1
Disable libp2p TLS security protocols for now (#2622)
* Disable security protocols for now

* Enabling security for test only. See https://github.com/libp2p/go-libp2p-swarm/issues/124

* Fix spacing
2019-05-17 13:29:25 -04:00
terence tsao
b9fe8b172c Filter Canonical Attestation by Default (#2626)
* exclusive of finalized block

* filter canonical attestations by default
2019-05-17 13:17:29 -04:00
Preston Van Loon
d20c3d6cf7 Add better, incremental reputation (#2618)
* add better, incremental reputation

* remove space

* Lint
2019-05-17 22:04:38 +08:00
Preston Van Loon
4837629091 Add timestamp metadata to p2p messages (#2611) 2019-05-15 21:28:02 -07:00
Nishant Das
64ce41f9fc Add Check for Goroutines Count (#2608)
* changes

* revert ide

* goimports

* Update shared/cmd/flags.go
2019-05-15 10:38:27 -04:00
Preston Van Loon
fd4c7ffc07
Add new log formats and set fluentd as default for cluster (#2594)
* Add new log formats and set fluentd as default for cluster

* fix image build
2019-05-13 20:43:04 -04:00
Antoine Toulme
c9ce8b5246 Allow discovery to be removed, and add peers explicitly to peer store (#2557)
* Allow discovery to be removed, and add peers explicitly to peer store

* Changes after code review

* Update shared/cmd/flags.go

Co-Authored-By: Preston Van Loon <preston@prysmaticlabs.com>
2019-05-11 18:02:58 -04:00
Preston Van Loon
9f7f7d6cff
Tracing improvements (#2570)
* some improvements

* fix

* gazelle

* disable lostcancel
2019-05-11 17:43:55 -04:00
Nishant Das
678ffa607e Fix Bitfield in Attestations (#2565)
* fix bitfield

* test

* fix reference

* fix tests

* remove test

* fix test

* add new helper

* add test

* fix tests

* fix test

* gaz

* add continue
2019-05-11 16:49:09 -04:00
Preston Van Loon
fc1fbf8017
Use a prysm specific DHT protocol (#2558)
* use a prysm specific DHT

* gazelle

* space
2019-05-10 11:56:30 -04:00
Preston Van Loon
9a82845c3c Fix lint issues (#2554)
* fix broadcast debug message

* feedback

* imports

* lint
2019-05-10 11:59:30 +08:00
Preston Van Loon
65f4c78750
Only marshal broadcast debug message when actually logging debug (#2553)
* fix broadcast debug message

* feedback
2019-05-09 22:57:47 -04:00
terence tsao
13e9bb5020 Filter Canonical Attester for RPC (#2551)
* exclusive of finalized block

* add filter to only include canonical attestation

* comments

* grammer

* gaz

* typo

* fixed existing tests

* added test for IsAttCanonical

* add nil blocks test
2019-05-09 18:53:19 -05:00
Preston Van Loon
991ee7e81b "Super sync" and naive p2p reputation (#2550)
* checkpoint on super sync with reputation

* ensure handling only expected peers msg

* exclusive of finalized block

* skip block saved already

* clean up struct

* remove 2 more fields

* _

* everything builds, but doesnt test yet

* lint

* fix p2p tests

* space

* space

* space

* fmt

* fmt
2019-05-09 16:02:24 -05:00
Preston Van Loon
e5a00fdca9
Add GCP test configuration and p2p-host-ip flag (#2510)
* Add GCP startup script

* add flag for external IP

* specify that it must be for linux

* /deploy/create

* gofmt
2019-05-06 13:33:19 -04:00
Raul Jordan
679493c786
issue warn log on disconnecting peer instead of error (#2491) 2019-05-05 11:22:04 -05:00
terence tsao
7f4eafb7b4
3.175 (#2482) 2019-05-03 16:57:37 -07:00
Raul Jordan
f876df42d7
ValidatorStatus Estimating Activation RPC Server (#2469)
* fix spacing

* working on position in queue

* fmt

* spacing

* feedback

* tests

* rename
2019-05-02 14:14:25 -05:00
Zak Cole
8b510e7fad typo (#2464)
negotiation was spelled wrong and it confused me for a second.
2019-05-01 16:49:59 -07:00
terence tsao
669ad3ee71
raise ejection bal to 3.15 (#2451) 2019-04-30 10:17:23 -07:00
terence tsao
63998b92aa Add and Use Truncate Hash Library (#2417)
* add truncate lib

* use trunc

* spaces
2019-04-29 13:11:51 -05:00
terence tsao
4a90f82bcc Fix Validator Ejection for Testnet (#2438)
* set ejection threshold and add gauge

* spaces

* gaz
2019-04-29 09:39:31 -05:00
Raul Jordan
63633a3bee Enable Historical State Pruning By Default (#2433)
* disable historical state pruning

* imports

* lint
2019-04-29 10:53:03 +08:00
terence tsao
85daf6e807
update to 3.2ETH (#2415) 2019-04-28 14:39:05 -07:00
Preston Van Loon
80d47468e4 Add a temporary commenting for issue #2408 (#2409) 2019-04-27 21:56:28 -05:00
Preston Van Loon
5167fadbd7 Serve pprof http (#2406)
* serve pprof http

* add comment for linter
2019-04-27 13:41:46 -07:00
Preston Van Loon
769fcb50ab
use Network, not Peerstore (#2404) 2019-04-27 16:05:19 -04:00
Preston Van Loon
210edfc940 P2P handshake handling (#2306)
* proto: illegal wireType 7 :(

* set addr to todo for now so somethign gets sent

* push latest progress

* Add feedback from @raulk. Stream never connects

* working handshake handler

* add exclusions for relay/bootstrap node

* fix tests, still need to add new ones

* remove race, fails coverage

* Add test for negotiation

* gazelle

* regen pb

* Update shared/p2p/handshake_handler.go

Co-Authored-By: prestonvanloon <preston@prysmaticlabs.com>
2019-04-27 14:08:27 -05:00
Raul Jordan
81c8b130c6
Only Sync With the Peer With the Highest Observed Slot (#2280)
* only accept the highest finalized slot from peers

* use best peer for state requests

* peer id

* rem old tests

* req peers tests pass

* warn level support for peer not having the same protocol

* pretty

* best peer

* comments

* req peers done

* tests passing

* fully functional

* enforce receiving from the best peer

* comments

* lint fixes
2019-04-26 10:18:43 -05:00
frederickalcantara
a170c69653 upgrading linter from gometalinter to golangci-lint (#2100)
* upgrading linter from gometalinter to golangci-lint

* fixed golangci-lint linting

* removed linting before_script command

* removed disable-all command

* Fixed golang config file

* fixed golang config file v2

* removed gosec issue rule

* formatting

* fixed travis build to run golangci-lint

* Add install golangci-lint command

* fixing golangci-lint script

* removed https://

* Added golangci-lint cmd script

* added go get for local lint install

* created a before_script

* add install before script

* Added get script

* added go mod download

* removed go mod downloads

* changed

* removed before script

* Added before script go get lint

* added exit zero to see what went wrong

* removed golang run script

* removed before script

* change lint command

* verbose output

* removed verbose

* change linter enable and disable configuration

* Update .golangci.yml

Removed gotype as a linter

* Update .golangci.yml

Added typecheck linter

* Update .golangci.yml

Added fixed lint version

* Update .golangci.yml

Added gotype

* Update .golangci.yml

Added typecheck

* removed env:lint

* Added env lint

* fixing lint upgrade

* Changing travis configuration

* FIxed spelling errors

* disabled typecheck

* Enabled typecheck

* remove binary

* Deleting lib binary

* adding more linters

* fixed constants

* fix spelling

* fixed all lint issues

* Revert "Changing travis configuration"

This reverts commit 334afe9d05e96261b01f275aa3ada20e7f36aac4.

* Merge branch 'master' of https://github.com/prysmaticlabs/prysm into update-linter

* Changed from Infof to Info

* Fixing commits

* fixing commits with linter config

* added install

* Fixing

* fix log statement
2019-04-26 14:24:01 +08:00
Nishant Das
89600e8978
Remove Duplicated Functions in the Slice Package (#2389)
* remove duplicated funcs

* lint

* remove duplicated tests
2019-04-26 12:31:27 +08:00
Raul Jordan
706aa9b82f
Update Jaeger Export Tracing (#2382)
* added exporter

* fixed jaeger export

* lint

* imports
2019-04-25 10:59:18 -05:00