Commit Graph

51 Commits

Author SHA1 Message Date
Raul Jordan
5374350a1c
Standardize Flags at Top Level and Remove Deprecated Utils (#3046)
* move shuffling to core

* remove old utils

* move flags to top level

* package lvl comment removal

* fix up references to flags

* revert node.go

* revert p2p_config.go

* revert main.go

* revert validator node.go

* revert validator main.go

* add flags pkg

* viz

* goimports
2019-07-23 08:58:20 -05:00
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
dd131561bf automaxprocs (#2770) 2019-06-13 07:53:42 -07:00
Nishant Das
d48e0925d0 Add gRPC Gateway Folder (#2793)
* add gateway proto files

* lint
2019-06-12 10:11:04 -05:00
Preston Van Loon
9e98e914a1 Add a gRPC gateway (#2604) 2019-06-02 08:33:44 -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
Preston Van Loon
9ce5de3d95 Add flag to whitelist certain connections (#2716) 2019-05-28 05:54:49 -07:00
Preston Van Loon
2d7dcfae61
fix joonix log after https://github.com/joonix/log/pull/13 (#2691) 2019-05-24 16:54:03 -04: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
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
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
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
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
Ivan Martinez
ca90acca77 Create feature config for selective testing (#1997)
* Create a feature flagging system

* Refactor how featureflags works and improve docs

* Gazelle and final touches

* Refactor, new flags in the package

* Remove old flags since they have been moved

* Fix bazel

* Update to comments

* Full coverage

* Fix formatting

* Align code with numbers

* Run bazel and fix docs

* Fix test for flag
2019-03-20 22:57:25 -04:00
Raul Jordan
7a83acf46d
Improve Validator Logging and Default Flags (#2013)
* improve validator logging significantly

* warn validator not yet assigned to epoch

* build added

* report validator logs

* validator performance logging

* all logging improvements

* validator attest better logs

* improved attester logging

* average balances

* dont hash useless hashes

* Update validator/client/validator_propose.go

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

* address some comments

* standardize with block root hash32, renamings

* gazelle

* builds

* improve average eth balance

* eth net gains/losses

* fix tests

* spacing

* goimports

* avg balance

* update pbs

* addressed preston comments

* imports

* gazelle
2019-03-18 09:45:28 -06:00
Nishant Das
04f4a7f156
Add Clear DB Flag (#2002)
* clearDB

* lint
2019-03-15 11:20:49 +08:00
Preston Van Loon
6af522986e
Enable POW chain by default (#1861)
* enable POW chain by default

* fix tests in node.go

* ignore ctx
2019-03-04 15:10:03 -05:00
James Towle
cfbbc9c61a Implemented the flag grouping logic (#1756)
* Implemented the flag grouping logic

* Added a usage file to the validator binary and fixed style issues

* Ran gazelle fix to fix the CI tests that failed
2019-03-01 14:48:05 -05:00
Preston Van Loon
c07b9bb456
remove old keystore flag (#1610) 2019-02-15 17:50:25 -05:00
Nishant Das
fa47e0fd95 Add ChainStart Delay Flag (#1591)
* add flag

* log formatting

* fix test

* do not process logs if flag is enabled
2019-02-14 11:11:03 -06:00
Raul Jordan
fb9d60c377
Update References to Deposit Contract, Update Flags (#1576)
* update readme

* rename k8 file
2019-02-13 13:08:28 -06:00
Raul Jordan
4d43f5128a Remove Simulator Service (#1392)
* remove all instances of simulator service

* fix flag decl

* fix lint
2019-01-27 12:51:44 -08:00
Preston Van Loon
b23ca60efd
Add simple version to binaries via golink (#1286)
* Add version linking to binaries via --workspace_status_command=./scripts/workspace_status.sh

* dont export some things

* lint and better date

* even better date
2019-01-09 23:19:33 -05:00
Jie Hou
aad64d113a Auto Clean Block Vote Cache (#972)
* WIP: Dummy db clean service

* [WIP. NOT READY FOR REVIEW] Add DB cleanup routine that cleans block vote cache

* Add missing bazel config

* Put DB clean behind a CLI flag

* Address review comments

* Fix error handling
2018-11-28 17:02:35 +08:00
Preston Van Loon
8587c637a0 Added flag for p2p port (#968)
* Added flag for p2p port

* Register flag with main

* lint

* Fix flag
2018-11-26 10:54:02 +08:00
Preston Van Loon
0559d01261
Add support for connecting via relay nodes (#827)
* Preliminary support for relay nodes

* lint

* Add comment, remove TODO

* work on relay address factory

* dial relay node, if available

* forgot new files

* fix service registry breakage

* added logging

* Added a peer count with prometheus

* always start mDNS

* fix lint
2018-11-25 11:55:02 -05:00
Leandro Lugaresi
d061c784e0 Added Prometheus Client and p2p Metrics (#673)
* Added prometheus client and p2p metrics

* Avoid run the adapter if the metrics are disabled

* fix visibility issue

* Fix invalid p2p.Message sent to Adapters

The middlewares (adapters) must receive the complete message to avoid
problems and the main Handler must get the values from middlewares

Also, added tests and comments for metrics package

* Added logrus hook collector

This collector is used to collect counters of log messages.
The main purpose of these metric is to know how many warnings and errors
the system are getting.

* Add hook when register the prometheus service

* update bazel builds

* fix emit tests and remove unused imports

* gazelle --fix

* remove unused logger

* move prometheus package to shared directory

* better metric names and fix metric paths

* improve metric tests and start to use promauto

* added prometheus initial documentation

* fix tests

* fix type differences with go get and bazel

* Fix service test
2018-11-15 07:54:45 -05:00
terence tsao
e1137e5801 Allow Beacon Node to Connect to Bootstrap Node for Peer Discovery (#740)
* start sequence for node to connect to bootstrap nodes

* lint

* maybe warning is more appropiate?

* fix gazelle

* preston's feedback

* add go-ipfs-addr to workspace

* move flag to shared

* removed routed host
2018-11-14 21:25:06 -05:00
Nishant Das
37bc1c67be
Adding Basic Private Key Management (#671)
* adding flags

* adding modified key utils

* adding more funcs

* more changes

* more changes

* documentation

* changes to node

* gazelle

* fixing bazel build

* gazelle

* adding tests

* more tests

* addressing terence's feedback

* adding geth header

* test

* changes

* fixedd it

* fixed marshalling

* adding more to tests

* gazelle

* adding more tests

* lint

* add cov

* cov

* fix imports
2018-11-08 11:22:31 +08:00
terence tsao
8dc3fb5c85
Removed Demo Debug Flags (#680) 2018-11-05 18:35:50 +01:00
Raul Jordan
1abed55bdd Update Beacon/Validator Flags to Disable Reward/Cross-Link Checking by Default (#597)
* flag updates

* enable att validity, cross links, rewards

* tests all pass

* fix race

* fix cov

* fix flag

* fix conf

* fix race

* fix gazelle
2018-10-02 10:04:37 +08:00
terence tsao
2566687db7
Validator Client Use Assignment Stream to Determine Responsibility (#566) 2018-09-27 14:46:07 -07:00
Raul Jordan
419cff2512
--Dev Mode Flag for Local Demo/Development (#537) 2018-09-21 16:02:17 -05:00
Divyank Katira
2a51ed3f39 P2P Message Execution Tracing (#517)
* Request execution tracing initial commit

* Resolve linter issues

* Run gazelle

* Make trace sampling configurable, clean up, update doc

* Document trace span creation

* Fix linter issue
2018-09-20 07:46:35 -04:00
terence tsao
e1f727cbb2
Implement Beacon Node Validator and Observer Entry Points (#414) 2018-08-20 08:50:11 -07:00
Ivan Martinez
390ac62ed8 Update docs client/beacon-chain wide (#386) 2018-08-09 11:25:48 -07:00
Ivan Martinez
0d0626a101 Add support to pass in TLS key/crt to use gRPC securely (#384) 2018-08-08 15:43:25 -07:00
Raul Jordan
29596bf862
beacon: Beacon Node gRPC Server and Client Services (#364) 2018-08-01 17:08:44 -05:00
Raul Jordan
cccd675a84
beacon: Initial Sync Network Simulator (#341) 2018-07-30 23:41:27 -05:00
Raul Jordan
b6cd890a67 Log Verbosity Flags + Logrus Package Level Logs With Fields (#304)
Former-commit-id: f7344b7d3fb2fa07f0fd421c5ed3721f6c7a9258 [formerly e678ab2f1681d9492c0e1b142cd06ee08a462fdb]
Former-commit-id: d942da3d5cfcde921bebb149c26edd5c4ed178dd
2018-07-21 12:51:18 -05:00
Raul Jordan
92af8bc351 Rename Entire Project to Repo, Change Import Paths and Readmes (#298)
Former-commit-id: b7b8bbd10777012ae6f7d30eb6b05c3b1c3ec5d3 [formerly 06e1112fa0e1092a7137186d3a386972daa2effe]
Former-commit-id: ff2bc760c9dafb6250f056606eb2cbf96b6afa5b
2018-07-20 16:31:26 -05:00
Raul Jordan
4d5d229f0f beacon: Define a Core Blockchain Package and Persisted Structure for Beacon (#278)
Former-commit-id: bbd5b46e7f64f762350d6fb496492207e70d7130 [formerly 43a37f7139b7d1d90f0c27a7406b63bdf390ad96]
Former-commit-id: bb7a2ff0a7619f8de0bd38cd2c9eb0de7c189edb
2018-07-19 11:31:50 -05:00
Preston Van Loon
77267169ea Add More Lint Rules With gometalinter (#284)
* turn up linter to 11

* Added extra linting rules and fixed all lint issues

* add deadline of 10m


Former-commit-id: 632999fcaa8370516d6fe76c28c503cb2e3319b7 [formerly d4354f631b1eb4f7918cde28bf063f756ae92a54]
Former-commit-id: 3aaf78a56b76850b0123d61551ac554ccecfe9ad
2018-07-15 15:06:36 -04:00
Raul Jordan
878a332913 beacon: Create a Subscription to Mainchain Head Events Via RPC as a Service in Beacon Node (#273)
Former-commit-id: a4677d647a959cbbbe9c4046e16fa6fa761133ac [formerly f775f6e9529e64cb1392a22f8ef15b186efa14ed]
Former-commit-id: 42350204f72fcba4626a39e61b6e64b6f0afba32
2018-07-14 14:48:42 -05:00
Raul Jordan
e305d58355 shared: reinclude debug.Exit() usefulness (#275)
Former-commit-id: 423052bc5858f3e5772b37bb9d0b4a05f9b131ac [formerly 869ca9c92bc215b0583953bb5ab2479927b15256]
Former-commit-id: bfd9353f0234864c9823ad3ee10d152d59af791c
2018-07-13 22:35:15 -05:00