Commit Graph

3000 Commits

Author SHA1 Message Date
terence tsao
2cb8430ad4 Enhance attester logging (#4380)
* Add validator_log.go
* Use new logging scheme
* Go fmt
* Better name
* Tests
* Tests
* Merge refs/heads/master into better-logging
* Merge branch 'master' of git+ssh://github.com/prysmaticlabs/prysm into better-logging
* Add wg.done, moved logging before span end
* Merge branch 'better-logging' of git+ssh://github.com/prysmaticlabs/prysm into better-logging
2020-01-02 17:04:07 +00:00
Nishant Das
03356fc7b5
Add Ability to Resync Node (#4279)
* add resyncing functionality

* add more validation to status message

* lint and build

* jim's review

* preston's review

* clean up

* remove log

* remove no sync

* change again

* change back

* remove spaces

* Update shared/slotutil/slottime.go

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

* Apply suggestions from code review

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

* fix refs

* raul's review

* goimports

* goimports

* add counter

* removed condition

* change back

* gaz

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2020-01-02 16:09:28 +08:00
Preston Van Loon
bdc4045e23 Add eth1data deposit count metric (#4374) 2019-12-30 08:34:46 -08:00
Preston Van Loon
dc1bd1ef62 Revert 4372 and 4373 (#4375)
* Revert "only add chain start deposits up to min genesis active validator count (#4373)"

This reverts commit 35380dd9bf.
* Revert "Return an error if the wrong number of deposits are provided for genesis state (#4372)"

This reverts commit 9674575892.
2019-12-30 01:21:08 +00:00
Preston Van Loon
35380dd9bf only add chain start deposits up to min genesis active validator count (#4373) 2019-12-29 16:27:17 -08:00
Preston Van Loon
9674575892 Return an error if the wrong number of deposits are provided for genesis state (#4372)
* Return an error if the wrong number of deposits are provided for genesis state
* add regression test
2019-12-29 20:10:23 +00:00
Nishant Das
b7d0d7cbb6 Shift Deposit Contract Tools (#4357)
* move tools
* Merge refs/heads/master into shiftTools
* Merge refs/heads/master into shiftTools
2019-12-27 00:41:43 +00:00
Nishant Das
28eadac172 Fix Deposit Log Processing (#4352)
* fix log processing
* Merge branch 'master' into fixLogs
* Merge refs/heads/master into fixLogs
2019-12-26 17:44:56 +00:00
Nishant Das
d5181496c4 Add Docker image for slasher (#4356)
* add docker image for slasher

* load docker rules

* change to c base image

* switch off pure builds
2019-12-26 10:53:27 -06:00
Nishant Das
b337a5720c Handle Pubsub Panics (#4350)
* handle panics
* lint
* gaz
* preston's review
2019-12-24 04:59:08 +00:00
terence tsao
53b8eb57ee
Fuzz ProcessFinalUpdates (#4308) 2019-12-23 10:27:16 -08:00
terence tsao
30b4b045f5 Add justified check points to chain info getters (#4335)
* Add justified checkpoint getters

* Use it for chainhead

* Mock

* Fixed tests

* Fixed TestServer_StreamChainHead_OnHeadUpdated

* Caught a run time bug. Fixed

Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
2019-12-22 00:14:23 -06:00
Ivan Martinez
ec1e7ae005 Remove proto/sharding and move slashing to own dir (#4332)
* Clean proto and move slasher proto to own folder

* Change package name to match files

* Fix typo

* Fix tests

* Undo out of scope changes

* Run gazlle

* Fix build.bazel

* goimports
2019-12-20 21:47:00 -06:00
Preston Van Loon
a949673e33 Pubsub ignore messages from yourself (#4337)
* ignore messages from myself
2019-12-20 19:37:25 +00:00
terence tsao
996f4c7f5a
Clean up list beacon committees to not use head state (#4333) 2019-12-20 08:02:12 -08:00
Valentin Mihov
3915a6e15a Fix the links in the TOC (#4334)
The links for running the client, were pointing to wrong sections.
2019-12-20 18:44:03 +08:00
Preston Van Loon
961dd21554 Use libp2p gossipsub upstream validator framework (#4318)
* add reject all pubsub validator to stop automatic propagation of messages
* gaz
* Merge branch 'master' of github.com:prysmaticlabs/prysm into pubsub-validator
* refactor p2p validator pipeline
* add sanity check
* Merge branch 'pubsub-validator' of github.com:prysmaticlabs/prysm into pubsub-validator
* fixed up test
* rem
* gaz
* Merge refs/heads/master into pubsub-validator
* fix from self test
* ensure validator data is set
* resolve todo
* Merge refs/heads/master into pubsub-validator
* gaz
* Merge refs/heads/master into pubsub-validator
* Merge branch 'pubsub-validator' of github.com:prysmaticlabs/prysm into pubsub-validator
* Merge refs/heads/master into pubsub-validator
* remove all of the 'from self' logic. filed https://github.com/libp2p/go-libp2p-pubsub/issues/250
* Merge branch 'pubsub-validator' of github.com:prysmaticlabs/prysm into pubsub-validator
* gaz
* update comment
* Merge refs/heads/master into pubsub-validator
* rename "VaidatorData"
* Merge branch 'pubsub-validator' of github.com:prysmaticlabs/prysm into pubsub-validator
* refactor
* one more bit of refactoring
* Update beacon-chain/sync/validate_beacon_attestation.go

Co-Authored-By: terence tsao <terence@prysmaticlabs.com>
* skip validation on self messages, add @nisdas feedback to increment failure counter
* Merge branch 'pubsub-validator' of github.com:prysmaticlabs/prysm into pubsub-validator
* remove flakey
2019-12-20 03:18:08 +00:00
terence tsao
2e4908e7c4
Optimize committee helpers (#4328) 2019-12-19 15:40:51 -08:00
Preston Van Loon
da637668a8 Minor fixes to create keys errors (#4330)
* minor fixes
2019-12-19 19:44:06 +00:00
Jim McDonald
20168ad729 More complete validator metrics (#4327)
* More complete validator metrics
* Merge branch 'master' into metrics
* Merge branch 'master' into metrics
2019-12-19 16:14:44 +00:00
Jim McDonald
0b07a9f227 Migrate periodic function to use RunEvery (#4324) 2019-12-19 07:02:10 -08:00
Jim McDonald
5dca662d01 Comment typo (#4325) 2019-12-19 06:01:23 -08:00
Nishant Das
8c28d1080c Revert "Fix same deposits from same validator in same block" (#4321)
* Revert "Fix same deposits from same validator in same block (#4319)"

This reverts commit 908d220eb2.
2019-12-19 05:36:19 +00:00
Raul Jordan
6a54a430e1 Add Filter by Epoch in kv/blocks.go (#4303)
* allow for epoch based filtering
* modify repo to include filter by epoch
* resolve items
* revamped to use epoch filter
* Merge branch 'master' into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* gazelle rem unused
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Merge refs/heads/master into roots-by-epoch
* Update beacon-chain/db/kv/blocks_test.go

Co-Authored-By: shayzluf <thezluf@gmail.com>
* Update beacon-chain/db/kv/blocks_test.go

Co-Authored-By: shayzluf <thezluf@gmail.com>
* fmt
* lint res
2019-12-19 00:15:31 +00:00
terence tsao
908d220eb2 Fix same deposits from same validator in same block (#4319)
* Update dict

* Test helper

* Regression test

* Comment

* Reset test cache
2019-12-18 16:53:30 -06:00
Preston Van Loon
ff1fd77425 Build docker images for non-root user (#4320)
* build docker images as non-root user
* search and replace mistake
* buildifer
* Change uid to 1001
2019-12-18 20:52:25 +00:00
Nishant Das
e27bc8312f Persist ETH1 Information (#4305)
* add data structures
* generate proto
* add in new fields
* Merge branch 'master' of https://github.com/prysmaticlabs/geth-sharding into saveETH1Data
* add comments
* Merge branch 'master' into saveETH1Data
* remove file
* Merge branch 'saveETH1Data' of https://github.com/prysmaticlabs/geth-sharding into saveETH1Data
* Merge branch 'master' into saveETH1Data
* Merge branch 'master' into saveETH1Data
* Merge refs/heads/master into saveETH1Data
* Merge refs/heads/master into saveETH1Data
2019-12-18 05:57:54 +00:00
Jim McDonald
78968c1e29 Add individual p2p host counts (#4312)
* Add individual p2p host counts
* Merge branch 'master' into p2pmetrics
* Merge branch 'master' into p2pmetrics
* Merge branch 'master' into p2pmetrics
* Merge branch 'master' into p2pmetrics
2019-12-18 05:31:46 +00:00
terence tsao
fb431c11c1 Process slots exit early if same slot (#4314)
* skip process slot if it's same slots
* Merge branch 'master' into optimize-process-slots
* Merge refs/heads/master into optimize-process-slots
2019-12-18 04:37:28 +00:00
Raul Jordan
30ed59e9c8 Make Sure ChainHeadStream Remains Open (#4282)
* do not return from stream
* fix test
* Merge branch 'master' into no-stream-return
* Merge refs/heads/master into no-stream-return
2019-12-18 04:07:11 +00:00
Jim McDonald
2e2d5199e8 Remove ChainStartFeed mocks (#4310)
* Remove ChainStartFeed from interop service
* Remove final ChainStartFeed mocks
* Gazelle
* Merge branch 'master' into coldstart
* Merge branch 'master' into coldstart
* Merge branch 'master' into coldstart
2019-12-18 03:36:07 +00:00
Raul Jordan
4fe31cf1b3 Add Benchmarks for Custom SSZ Hash Tree Root (#4313)
* bench ssz tree root
* more benches
* Merge branch 'master' into ssz-bench
2019-12-18 02:57:40 +00:00
Preston Van Loon
e82e582cdf Config to exclude kafka dep at build time (#4309)
* add flag to exclude kafka
* Add config flag to exclude kafka
* Merge branch 'master' into buildtime-exclude-kafka
2019-12-18 02:07:49 +00:00
Jim McDonald
0b2d9d8576 Tidy up interop commands (#4311) 2019-12-17 15:49:21 -08:00
Preston Van Loon
65e3f3e007 Add pubsub message ID function (#4304)
* add pubsub message ID
* thanks linter
* Update rules_go, gogo protobuf, comment
* Merge branch 'master' into add-msg-fn-id
2019-12-17 05:17:54 +00:00
Preston Van Loon
2c28e4e7a3 Improvements to Committee Assignments for multiple key requests (#4294)
* Add committees helper, benchmark, results show 62ms for 8k validators which was previously 4 minutes
* Add regression test with same data
* fix epoch conversion
* lint
* undo and lint
* Merge branch 'master' of github.com:prysmaticlabs/prysm into zoom-zoom-assignments
* remove validaotr index span
* fix comment, add test to test against spec definition method for consistency.
* Deprecate CommitteeAssignment, delete unused reference to CommitteeAssignment
* Merge branch 'master' of github.com:prysmaticlabs/prysm into zoom-zoom-assignments
* remove new line
* make test be more complicated with validators activated in an epoch transition
* add feature flag for fast-assignments
* Merge branch 'master' of github.com:prysmaticlabs/prysm into zoom-zoom-assignments
* gaz, gofmt, add deprecated code back
* Update beacon-chain/core/helpers/committee.go

Co-Authored-By: Ivan Martinez <ivanthegreatdev@gmail.com>
* Merge refs/heads/master into zoom-zoom-assignments
* Merge refs/heads/master into zoom-zoom-assignments
* Merge refs/heads/master into zoom-zoom-assignments
2019-12-17 03:05:26 +00:00
Raul Jordan
642254daa6 Update README Instructions to Resolve Deposit Contract Address (#4302)
* dep addr resolver
* Merge refs/heads/master into update-read
2019-12-17 02:52:54 +00:00
Nishant Das
c41140e15a Optimize Insertion in Deposit Trie (#4299)
* current changes
* change algorithm for tree insert
* almost done with getting this to pass
* unit test passes
* tests now pass
* fix in repo
* Merge branch 'master' into optimizeDepositLogs
* fix build
* Merge branch 'optimizeDepositLogs' of github.com:prysmaticlabs/prysm into optimizeDepositLogs
* remove tautology
* fix tautology
* fix up sparsity
* Merge branch 'master' into optimizeDepositLogs
* further fixes
* Merge branch 'optimizeDepositLogs' of github.com:prysmaticlabs/prysm into optimizeDepositLogs
* Update shared/trieutil/sparse_merkle.go
* comments
* Merge branch 'optimizeDepositLogs' of github.com:prysmaticlabs/prysm into optimizeDepositLogs
* add bench for optimized
* gaz
* Merge refs/heads/master into optimizeDepositLogs
2019-12-17 02:19:12 +00:00
terence tsao
23a6c20dd4 Service as proper names (#4293) 2019-12-16 19:53:55 -06:00
Preston Van Loon
514f5f904f Add prometheus gRPC time histograms (#4300)
* Add grpc_prometheus.EnableHandlingTimeHistogram()
* Merge refs/heads/master into enable-prom-hist
2019-12-16 22:00:34 +00:00
Preston Van Loon
5844436716 Don't serialize bls signature just to deserialize it again (#4298)
* Don't serialize bls signature just to deserialize it again
* gaz
* Merge branch 'master' into minor-thing
* Merge branch 'master' into minor-thing
2019-12-16 19:01:40 +00:00
terence tsao
5879b26b4b
Hardening Committee Cache for Runtime (#4270) 2019-12-16 10:14:21 -08:00
terence tsao
566efaef89 Optimize aggregator process slots (#4297)
* Advance slots up to epoch start
* Merge branch 'master' into opt-process-slots-aggregator
* Merge branch 'master' into opt-process-slots-aggregator
2019-12-16 17:43:33 +00:00
Jim McDonald
d9062a7e30 Use RunEvery in place of custom tickers (#4290) 2019-12-16 11:00:15 -06:00
Preston Van Loon
3f344aee55
add a few fuzz tests (#4291) 2019-12-16 00:52:20 -06:00
Nishant Das
fd93751bf7 Fix Goerli Faucet (#4289)
* fix faucet

* minor fixes
2019-12-15 08:21:29 -06:00
Preston Van Loon
325a2503f7 AttestingIndices: Make beacon committee be an argument (#4284)
* make beacon committee be an argument
* remove state from ConvertToIndexed
* Merge branch 'master' into refactor-AttestingIndices-committee
* Merge branch 'master' into refactor-AttestingIndices-committee
* Merge branch 'master' into refactor-AttestingIndices-committee
* Merge refs/heads/master into refactor-AttestingIndices-committee
2019-12-15 05:02:50 +00:00
Preston Van Loon
2179ac683e Fuzz testing for custom state ssz (#4234)
* Add a random fuzz test to ssz to capture panics and compare the effectiveness of the cache. This comment shows a difference in state root calculation 52% of the time and what is even more concering is that spec tests pass with the flag on.
* added case for one
* bring down failure rate
* prevent caching operations if no cache enabled
* unit test and pretty printer
* identify further sources of problems
* no more panics
* not panicking anymore
* fix lint
* Merge branch 'master' into fuzz-ssz
* Merge branch 'master' into fuzz-ssz
* passing up to 68
* Merge branch 'fuzz-ssz' of github.com:prysmaticlabs/prysm into fuzz-ssz
* need to find the culprit for 100
* 100 passes, now only 16 out of 1000
* state roots being mutated
* one out of 10k
* fuzzing stuff
* fix up lint
* Merge branch 'master' into fuzz-ssz
* cleanup
* fixing more comments
* Merge branch 'master' into fuzz-ssz
2019-12-15 04:32:19 +00:00
terence tsao
0f4dabfad8
Fix cloning target state for check point state cache (#4288) 2019-12-14 16:06:30 -08:00
terence tsao
8724dcd41b Sort received atts by sig (#4287) 2019-12-14 10:51:27 -06:00