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

core/scheduler: tweak clock sync #778

Merged
merged 3 commits into from
Jul 8, 2022
Merged

Conversation

corverroos
Copy link
Contributor

Few small tweaks to beacon node clock sync:

  • Remove waiting for minimum 10 samples.
  • Fix logging issue (mod vs div)
  • Update metric name
  • Add sync offset panel to Grafana dashboard

category: misc
ticket: #764
feature_flag: beacon_clock_sync

@codecov
Copy link

codecov bot commented Jul 8, 2022

Codecov Report

Merging #778 (fcbc776) into main (6a1fe3b) will decrease coverage by 0.48%.
The diff coverage is 60.00%.

@@            Coverage Diff             @@
##             main     #778      +/-   ##
==========================================
- Coverage   54.50%   54.02%   -0.49%     
==========================================
  Files         109      109              
  Lines       10668    10667       -1     
==========================================
- Hits         5815     5763      -52     
- Misses       3989     4039      +50     
- Partials      864      865       +1     
Impacted Files Coverage Δ
core/scheduler/metrics.go 100.00% <ø> (ø)
core/scheduler/scheduler.go 71.54% <0.00%> (-1.36%) ⬇️
testutil/compose/define.go 40.24% <0.00%> (ø)
core/scheduler/clocksync.go 80.00% <100.00%> (-0.40%) ⬇️
core/qbft/qbft.go 71.67% <0.00%> (-9.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a1fe3b...fcbc776. Read the comment docs.

@corverroos
Copy link
Contributor Author

image

@@ -257,7 +257,7 @@ func buildLocal(ctx context.Context, dir string) error {
log.Info(ctx, "Building local charon binary", z.Str("repo", repo), z.Str("target", target))

cmd := exec.CommandContext(ctx, "go", "build", "-o", target)
cmd.Env = append(os.Environ(), "GOOS=linux", "GOARCH=amd64")
cmd.Env = append(os.Environ(), "GOOS=linux", "GOARCH=amd64", "CGO_ENABLED=0")
Copy link
Contributor

Choose a reason for hiding this comment

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

discussion: why do we need to set CGO_ENABLED flag here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when building go programs, it is best practice to explicitly disable CGO if not required, otherwise some C libraries and stuff is included in the build which can impact compatibility.

Copy link
Contributor

@xenowits xenowits left a comment

Choose a reason for hiding this comment

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

Looks good!

Copy link
Contributor

@dB2510 dB2510 left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -47,7 +47,7 @@ var (
syncMedianGauge = promauto.NewGauge(prometheus.GaugeOpts{
Namespace: "core",
Subsystem: "scheduler",
Name: "clock_sync_median_seconds",
Name: "clock_sync_offset_seconds",
Copy link
Contributor

Choose a reason for hiding this comment

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

this can be "beacon_node_offset_seconds" maybe to be more specific what this metric actually means

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure

@corverroos corverroos added the merge when ready Indicates bulldozer bot may merge when all checks pass label Jul 8, 2022
@obol-bulldozer obol-bulldozer bot merged commit e672e33 into main Jul 8, 2022
@obol-bulldozer obol-bulldozer bot deleted the corver/clockimprove branch July 8, 2022 16:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge when ready Indicates bulldozer bot may merge when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants