Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stream Duties Client Implementation #5867

Merged
merged 213 commits into from
Jun 18, 2020
Merged
Show file tree
Hide file tree
Changes from 194 commits
Commits
Show all changes
213 commits
Select commit Hold shift + click to select a range
2da2e37
include validator client stream
rauljordan May 15, 2020
1832c6d
Update validator/client/validator_attest.go
rauljordan May 15, 2020
929c2ce
gazelle
rauljordan May 15, 2020
07090ed
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan May 15, 2020
735efba
Merge branch 'master' into client-stream-duties
rauljordan May 15, 2020
341c552
rem extraneous logs
rauljordan May 15, 2020
c915e29
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan May 15, 2020
b29dd21
fixing tests
rauljordan May 15, 2020
f8e0ae2
resolve most tests
rauljordan May 15, 2020
3fc8eaf
gaz
rauljordan May 15, 2020
2141a76
add lock
rauljordan May 15, 2020
dcac9ca
ivan feedback
rauljordan May 15, 2020
337d8cd
pass tests for update protect
rauljordan May 15, 2020
dd1428b
Merge branch 'master' into client-stream-duties
rauljordan May 16, 2020
10d360f
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 16, 2020
aa2a785
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 16, 2020
67f6817
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 16, 2020
817e8a5
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 17, 2020
c2ca798
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 17, 2020
c4b7dbd
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
a66fffa
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
76c1cf9
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
64fb758
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
a0dc414
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
e382d78
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
96044ae
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
951d298
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
f95438f
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
d35b682
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 18, 2020
64a4fe3
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
3d0339a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
1c873f6
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
e020e51
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
f809489
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
3f9c317
gaz
rauljordan May 19, 2020
ad0da88
duties gaz
rauljordan May 19, 2020
1979dd7
no need for canonical head slot
rauljordan May 19, 2020
efe921c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 19, 2020
1f4315a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
43d31bd
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
01cfd0c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
8c0e967
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
a2ad1fa
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
0d8d55a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
1d791ec
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
8ca68e3
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
fb78890
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 20, 2020
023a42b
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 21, 2020
3fe204a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 21, 2020
414f50e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
71fea1f
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
16019dc
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
bb7b80a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
019f513
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
d48c7a0
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 22, 2020
414b61c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 23, 2020
7163d9d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 23, 2020
0f4c993
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 25, 2020
2b05397
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 25, 2020
31903cc
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 25, 2020
c6179f6
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 25, 2020
39c33c5
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
183f1f9
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
da6563c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
c475276
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
bcb4683
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
6079f25
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
66508c7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
ad740f7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 26, 2020
176de3a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
bcaa965
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
e1a8ad5
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
6593cc7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
1b39303
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
7f688dc
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 27, 2020
2a93f9d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
3d3c0f8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
adcb379
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
a19b910
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
46ca4e1
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
ea64665
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
e4e608d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 28, 2020
50c2ae5
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
5a17569
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
ff474a8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
e39b839
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
30594c9
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
8390ca8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
e17c744
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
babc57b
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
b6efe08
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
f810191
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 29, 2020
e108349
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 31, 2020
caf15fb
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 31, 2020
f0e1c2e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] May 31, 2020
e4934eb
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
b8b781c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
2a4619e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
120adfe
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
5644a27
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
d8650be
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
5ba736d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
90fdb7e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
943c924
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
c2bd4a8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 1, 2020
ef3f1ef
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 2, 2020
3fd4467
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 2, 2020
ec6812c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 2, 2020
234d1e0
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 2, 2020
3c5ec64
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
cc54ea7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
e6a8be8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
37a8e3c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
e18fa92
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
6578a56
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
b906005
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
1d4d90e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
e8423a5
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 3, 2020
9d8790b
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
a338ae6
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
330c973
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
a0aa213
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
72ae827
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
afbd096
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
c0448e0
fix ctx leak
rauljordan Jun 4, 2020
aa58db7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
107102a
fmt
rauljordan Jun 4, 2020
5285e54
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 4, 2020
a46061d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
2c6dd47
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
d2f56dc
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
8a8c0a1
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
b6115a1
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
0a54e8d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
1be7970
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
bbf8ba8
add in feature flag
rauljordan Jun 5, 2020
8573407
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan Jun 5, 2020
b813562
add streaming subpackage
rauljordan Jun 5, 2020
5a98026
add polling/streaming separation
rauljordan Jun 5, 2020
2c039d8
able to build
rauljordan Jun 5, 2020
761330d
fix duplicate package names
rauljordan Jun 5, 2020
5b4c41d
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
9ddc97e
fix polling
rauljordan Jun 5, 2020
185345d
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan Jun 5, 2020
bf12680
imports
rauljordan Jun 5, 2020
89da83b
confirm it works
rauljordan Jun 5, 2020
d3d46cd
fixed up comment
rauljordan Jun 5, 2020
dd053dc
go lint comments
rauljordan Jun 5, 2020
3cdb202
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 5, 2020
3c6fa38
gaz
rauljordan Jun 5, 2020
d4c7401
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan Jun 5, 2020
4bba515
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 6, 2020
562e2bf
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 6, 2020
bd3960b
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 6, 2020
90c77a6
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 6, 2020
074dcfb
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 7, 2020
b55fa3c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 8, 2020
d463d71
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 8, 2020
b3c3522
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 8, 2020
ae6a321
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 9, 2020
e803a4e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 9, 2020
8803b83
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 9, 2020
f46ef34
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 9, 2020
b7e190e
resolve confs
rauljordan Jun 10, 2020
5f43eae
build
rauljordan Jun 10, 2020
ab96efd
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 10, 2020
f08c976
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
ab8fab4
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
09a5c57
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
3bf4351
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
5935a71
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
7164da3
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
82944e1
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
4dc8bad
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
63a0dd7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
ac9ceaf
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
e2ea6d3
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 11, 2020
fc0495a
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
3b7b87f
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
f621bc2
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
2f83d4c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
147a9dc
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
7f57cea
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
69c552c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
f5fc206
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
effb50e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 12, 2020
f910e89
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 13, 2020
a4b75df
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 14, 2020
409c35c
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 14, 2020
d73590b
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 14, 2020
db86068
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 14, 2020
e590eab
fix up confs
rauljordan Jun 15, 2020
eef02f0
Merge branch 'client-stream-duties' of github.com:prysmaticlabs/prysm…
rauljordan Jun 15, 2020
a031e74
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
e3239a7
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
6aef3ca
Update validator/client/streaming/service_test.go
rauljordan Jun 15, 2020
d830eb8
tidy
rauljordan Jun 15, 2020
75c3899
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
d0a9710
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
77279f8
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
321af4e
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
c65c3bb
fmt
rauljordan Jun 15, 2020
b9734ea
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
c9ca9b4
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 15, 2020
0e7c681
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 16, 2020
0656523
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 16, 2020
89d7697
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 16, 2020
c041355
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 16, 2020
4341481
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 16, 2020
c9f9fbc
add stream duties to e2e
rauljordan Jun 17, 2020
bbbeb44
Merge refs/heads/master into client-stream-duties
prylabs-bulldozer[bot] Jun 17, 2020
5cdca39
add stream duties to e2e flags
rauljordan Jun 18, 2020
892c279
Merge branch 'master' into client-stream-duties
rauljordan Jun 18, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion beacon-chain/state/stateutil/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ go_library(
"//slasher:__subpackages__",
"//tools/blocktree:__pkg__",
"//tools/pcli:__pkg__",
"//validator/client:__pkg__",
"//validator/client/streaming:__pkg__",
"//validator/client/polling:__pkg__",
],
deps = [
"//proto/beacon/p2p/v1:go_default_library",
Expand Down
62 changes: 0 additions & 62 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion nogo_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
},
"lostcancel": {
"exclude_files": {
"validator/client/runner.go": "No need to cancel right when goroutines begin",
"validator/client/streaming/runner.go": "No need to cancel right when goroutines begin",
"validator/client/polling/runner.go": "No need to cancel right when goroutines begin",
"external/.*": "Third party code"
}
},
Expand Down
5 changes: 5 additions & 0 deletions shared/featureconfig/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type Flags struct {
E2EConfig bool //E2EConfig made specifically for testing, do not use except in E2E.

// Feature related flags.
EnableStreamDuties bool // Enable streaming of validator duties instead of a polling-based approach.
WriteSSZStateTransitions bool // WriteSSZStateTransitions to tmp directory.
InitSyncNoVerify bool // InitSyncNoVerify when initial syncing w/o verifying block's contents.
DisableDynamicCommitteeSubnets bool // Disables dynamic attestation committee subnets via p2p.
Expand Down Expand Up @@ -272,6 +273,10 @@ func ConfigureValidator(ctx *cli.Context) {
complainOnDeprecatedFlags(ctx)
cfg := &Flags{}
cfg = configureConfig(ctx, cfg)
if ctx.Bool(enableStreamDuties.Name) {
log.Warn("Enabled validator duties streaming.")
cfg.EnableStreamDuties = true
}
if ctx.Bool(enableProtectProposerFlag.Name) {
log.Warn("Enabled validator proposal slashing protection.")
cfg.ProtectProposer = true
Expand Down
5 changes: 5 additions & 0 deletions shared/featureconfig/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,10 @@ var (
Name: "disable-reduce-attester-state-copy",
Usage: "Disables the feature to reduce the amount of state copies for attester rpc",
}
enableStreamDuties = &cli.BoolFlag{
Name: "enable-stream-duties",
Usage: "Enables validator duties streaming in the validator client",
}
enableKadDht = &cli.BoolFlag{
Name: "enable-kad-dht",
Usage: "Enables libp2p's kademlia based discovery to start running",
Expand Down Expand Up @@ -484,6 +488,7 @@ var ValidatorFlags = append(deprecatedFlags, []cli.Flag{
e2eConfigFlag,
enableProtectAttesterFlag,
enableProtectProposerFlag,
enableStreamDuties,
enableExternalSlasherProtectionFlag,
disableDomainDataCacheFlag,
waitForSyncedFlag,
Expand Down
5 changes: 3 additions & 2 deletions validator/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go_library(
"//shared/params:go_default_library",
"//shared/version:go_default_library",
"//validator/accounts:go_default_library",
"//validator/client:go_default_library",
"//validator/client/streaming:go_default_library",
"//validator/flags:go_default_library",
"//validator/node:go_default_library",
"@com_github_joonix_log//:go_default_library",
Expand Down Expand Up @@ -63,7 +63,8 @@ go_image(
"//shared/params:go_default_library",
"//shared/version:go_default_library",
"//validator/accounts:go_default_library",
"//validator/client:go_default_library",
"//validator/client/polling:go_default_library",
"//validator/client/streaming:go_default_library",
"//validator/flags:go_default_library",
"//validator/node:go_default_library",
"@com_github_joonix_log//:go_default_library",
Expand Down
12 changes: 12 additions & 0 deletions validator/client/metrics/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
load("@prysm//tools/go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["metrics.go"],
importpath = "github.com/prysmaticlabs/prysm/validator/client/metrics",
visibility = ["//validator/client:__subpackages__"],
deps = [
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
],
)
121 changes: 121 additions & 0 deletions validator/client/metrics/metrics.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
package metrics
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to review, just consolidated metrics into a shared folder


import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)

var (
// ValidatorStatusesGaugeVec used to track validator statuses by public key.
ValidatorStatusesGaugeVec = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "validator",
Name: "statuses",
Help: "validator statuses: 0 UNKNOWN, 1 DEPOSITED, 2 PENDING, 3 ACTIVE, 4 EXITING, 5 SLASHING, 6 EXITED",
},
[]string{
// Validator pubkey.
"pubkey",
},
)
// ValidatorAggSuccessVec used to count successful aggregations.
ValidatorAggSuccessVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "successful_aggregations",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorAggFailVec used to count failed aggregations.
ValidatorAggFailVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "failed_aggregations",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorProposeSuccessVec used to count successful proposals.
ValidatorProposeSuccessVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "successful_proposals",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorProposeFailVec used to count failed proposals.
ValidatorProposeFailVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "failed_proposals",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorProposeFailVecSlasher used to count failed proposals by slashing protection.
ValidatorProposeFailVecSlasher = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "validator_proposals_rejected_total",
Help: "Count the block proposals rejected by slashing protection.",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorBalancesGaugeVec used to keep track of validator balances by public key.
ValidatorBalancesGaugeVec = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "validator",
Name: "balance",
Help: "current validator balance.",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorAttestSuccessVec used to count successful attestations.
ValidatorAttestSuccessVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "successful_attestations",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorAttestFailVec used to count failed attestations.
ValidatorAttestFailVec = promauto.NewCounterVec(
prometheus.CounterOpts{
Namespace: "validator",
Name: "failed_attestations",
},
[]string{
// validator pubkey
"pubkey",
},
)
// ValidatorAttestFailVecSlasher used to count failed attestations by slashing protection.
ValidatorAttestFailVecSlasher = promauto.NewCounterVec(
prometheus.CounterOpts{
Name: "validator_attestations_rejected_total",
Help: "Count the attestations rejected by slashing protection.",
},
[]string{
// validator pubkey
"pubkey",
},
)
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ go_library(
"validator_metrics.go",
"validator_propose.go",
],
importpath = "github.com/prysmaticlabs/prysm/validator/client",
importpath = "github.com/prysmaticlabs/prysm/validator/client/polling",
visibility = ["//validator:__subpackages__"],
deps = [
"//beacon-chain/core/helpers:go_default_library",
Expand All @@ -28,6 +28,7 @@ go_library(
"//shared/params:go_default_library",
"//shared/roughtime:go_default_library",
"//shared/slotutil:go_default_library",
"//validator/client/metrics:go_default_library",
"//validator/db:go_default_library",
"//validator/keymanager:go_default_library",
"//validator/slashing-protection:go_default_library",
Expand All @@ -40,8 +41,6 @@ go_library(
"@com_github_grpc_ecosystem_go_grpc_prometheus//:go_default_library",
"@com_github_hashicorp_golang_lru//:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_prometheus_client_golang//prometheus:go_default_library",
"@com_github_prometheus_client_golang//prometheus/promauto:go_default_library",
"@com_github_prysmaticlabs_ethereumapis//eth/v1alpha1:go_default_library",
"@com_github_prysmaticlabs_go_bitfield//:go_default_library",
"@com_github_prysmaticlabs_go_ssz//:go_default_library",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package polling

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package polling

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package polling

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
// Package client defines the entire lifecycle of a validator in eth2 – it is responsible
// for interacting with a beacon node to determine and perform validator duties.
package client
package polling

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client
package polling

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// Package client represents the functionality to act as a validator.
package client
// Package polling represents a gRPC polling-based implementation
// of an eth2 validator client.
package polling

import (
"context"
Expand All @@ -17,8 +18,6 @@ import (
ptypes "github.com/gogo/protobuf/types"
lru "github.com/hashicorp/golang-lru"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
ethpb "github.com/prysmaticlabs/ethereumapis/eth/v1alpha1"
"github.com/prysmaticlabs/prysm/beacon-chain/core/helpers"
slashpb "github.com/prysmaticlabs/prysm/proto/slashing"
Expand All @@ -27,6 +26,7 @@ import (
"github.com/prysmaticlabs/prysm/shared/hashutil"
"github.com/prysmaticlabs/prysm/shared/params"
"github.com/prysmaticlabs/prysm/shared/slotutil"
"github.com/prysmaticlabs/prysm/validator/client/metrics"
"github.com/prysmaticlabs/prysm/validator/db"
"github.com/prysmaticlabs/prysm/validator/keymanager"
slashingprotection "github.com/prysmaticlabs/prysm/validator/slashing-protection"
Expand Down Expand Up @@ -67,18 +67,6 @@ type validator struct {
protector slashingprotection.Protector
}

var validatorStatusesGaugeVec = promauto.NewGaugeVec(
prometheus.GaugeOpts{
Namespace: "validator",
Name: "statuses",
Help: "validator statuses: 0 UNKNOWN, 1 DEPOSITED, 2 PENDING, 3 ACTIVE, 4 EXITING, 5 SLASHING, 6 EXITED",
},
[]string{
// Validator pubkey.
"pubkey",
},
)

// Done cleans up the validator.
func (v *validator) Done() {
v.ticker.Done()
Expand Down Expand Up @@ -249,7 +237,7 @@ func (v *validator) checkAndLogValidatorStatus(validatorStatuses []*ethpb.Valida
log := log.WithFields(fields)
if v.emitAccountMetrics {
fmtKey := fmt.Sprintf("%#x", status.PublicKey)
validatorStatusesGaugeVec.WithLabelValues(fmtKey).Set(float64(status.Status.Status))
metrics.ValidatorStatusesGaugeVec.WithLabelValues(fmtKey).Set(float64(status.Status.Status))
}
switch status.Status.Status {
case ethpb.ValidatorStatus_UNKNOWN_STATUS:
Expand Down Expand Up @@ -565,7 +553,7 @@ func (v *validator) logDuties(slot uint64, duties []*ethpb.DutiesResponse_Duty)
for _, duty := range duties {
if v.emitAccountMetrics {
fmtKey := fmt.Sprintf("%#x", duty.PublicKey)
validatorStatusesGaugeVec.WithLabelValues(fmtKey).Set(float64(duty.Status))
metrics.ValidatorStatusesGaugeVec.WithLabelValues(fmtKey).Set(float64(duty.Status))
}

// Only interested in validators who are attesting/proposing.
Expand Down