diff --git a/app/app.go b/app/app.go index 114443708..3be32cf98 100644 --- a/app/app.go +++ b/app/app.go @@ -936,7 +936,6 @@ func wireTracing(life *lifecycle.Manager, conf Config) error { } // setFeeRecipient returns a slot subscriber for scheduler which calls prepare_beacon_proposer endpoint at start of each epoch. -// TODO(dhruv): move this somewhere else once more use-cases like this becomes clear. func setFeeRecipient(eth2Cl eth2wrap.Client, feeRecipientFunc func(core.PubKey) string) func(ctx context.Context, slot core.Slot) error { onStartup := true var osMutex sync.Mutex diff --git a/app/eth2wrap/synthproposer.go b/app/eth2wrap/synthproposer.go index ab92655cd..cd0b1567b 100644 --- a/app/eth2wrap/synthproposer.go +++ b/app/eth2wrap/synthproposer.go @@ -78,7 +78,6 @@ func (h *synthWrapper) getFeeRecipient(vIdx eth2p0.ValidatorIndex) bellatrix.Exe // ProposerDuties returns upstream proposer duties for the provided validator indexes or // upstream proposer duties and synthetic duties for all cluster validators if enabled. func (h *synthWrapper) ProposerDuties(ctx context.Context, opts *eth2api.ProposerDutiesOpts) (*eth2api.Response[[]*eth2v1.ProposerDuty], error) { - // TODO(corver): Should we support fetching duties for other validators not in the cluster? duties, err := h.synthProposerCache.Duties(ctx, h.Client, opts.Epoch) if err != nil { return nil, err diff --git a/app/health/checks.go b/app/health/checks.go index ca70ef394..a80cfe289 100644 --- a/app/health/checks.go +++ b/app/health/checks.go @@ -40,7 +40,6 @@ type query func(name string, selector labelSelector, reducer seriesReducer) (flo // checks is a list of health checks. var checks = []check{ { - // TODO(corver): Change this to critical on any error once we aligned with only logging errors when human intervention is required. Name: "high_error_log_rate", Description: "High rate of error logs. Please check the logs for more details.", Severity: severityWarning, diff --git a/app/log/config.go b/app/log/config.go index ab6a8dd57..08369b887 100644 --- a/app/log/config.go +++ b/app/log/config.go @@ -460,7 +460,7 @@ func formatZapStack(zapStack string) string { for _, line := range strings.Split(zapStack, "\n") { if strings.HasPrefix(line, "\t") { - const sep = "charon/" // TODO(corver): This only works if source built in a folder named 'charon'. + const sep = "charon/" // Note that this only works if source built in a folder named 'charon'. i := strings.LastIndex(line, sep) if i < 0 { // Skip non-charon lines diff --git a/app/obolapi/api.go b/app/obolapi/api.go index e4883d175..ac1b9d4f0 100644 --- a/app/obolapi/api.go +++ b/app/obolapi/api.go @@ -51,7 +51,6 @@ func (c Client) url() *url.URL { // PublishLock posts the lockfile to obol-api. It has a 30s timeout. func (c Client) PublishLock(ctx context.Context, lock cluster.Lock) error { - // TODO(xenowits): Reduce the timeout once the obol-api is optimised for publishing large lock files. ctx, cancel := context.WithTimeout(ctx, 30*time.Second) defer cancel() diff --git a/app/peerinfo/adhoc.go b/app/peerinfo/adhoc.go index 79ef1065c..020a2ba7e 100644 --- a/app/peerinfo/adhoc.go +++ b/app/peerinfo/adhoc.go @@ -22,7 +22,7 @@ func DoOnce(ctx context.Context, tcpNode host.Host, peerID peer.ID) (*pbv1.PeerI rtt = d } - req := new(pbv1.PeerInfo) // TODO(corver): Populate request fields and make them required. + req := new(pbv1.PeerInfo) resp := new(pbv1.PeerInfo) err := p2p.SendReceive(ctx, tcpNode, peerID, req, resp, protocolID2, p2p.WithSendReceiveRTT(rttCallback)) diff --git a/app/peerinfo/peerinfo.go b/app/peerinfo/peerinfo.go index 41ce0edec..07946c30c 100644 --- a/app/peerinfo/peerinfo.go +++ b/app/peerinfo/peerinfo.go @@ -225,8 +225,6 @@ func (p *PeerInfo) sendOnce(ctx context.Context, now time.Time) { // Log unexpected lock hash if !bytes.Equal(resp.LockHash, p.lockHash) { - // TODO(corver): Think about escalating this error when we are clear - // on how to handle lock file migrations. log.Warn(ctx, "Mismatching peer lock hash", nil, z.Str("peer", name), z.Str("lock_hash", fmt.Sprintf("%#x", resp.LockHash)), @@ -294,7 +292,8 @@ func newMetricsSubmitter() metricSubmitter { if gitHash == "" { gitHash = "unknown" } - // TODO(corver): Validate version and githash with regex + + // NOTE: This can be probably enhanced by validating version and githash with regex peerVersion.Reset(peerName) peerVersion.WithLabelValues(peerName, version).Set(1) diff --git a/app/peerinfo/peerinfopb/v1/peerinfo.proto b/app/peerinfo/peerinfopb/v1/peerinfo.proto index cdfa70f23..bd63ff20a 100644 --- a/app/peerinfo/peerinfopb/v1/peerinfo.proto +++ b/app/peerinfo/peerinfopb/v1/peerinfo.proto @@ -14,5 +14,5 @@ message PeerInfo { optional google.protobuf.Timestamp started_at = 5; bool builder_api_enabled = 6; - // TODO(corver): Always populate timestamps when sending, then make them required after subsequent release. + // NOTE: Always populate timestamps when sending, then make them required after subsequent release. } diff --git a/app/priorities.go b/app/priorities.go index 955b3e3d4..dfbb3a881 100644 --- a/app/priorities.go +++ b/app/priorities.go @@ -42,6 +42,6 @@ func (c *mutableConfig) getInfoSync() (*infosync.Component, bool) { // BuilderAPI returns true if the cluster supports the builder API for the provided slot. func (c *mutableConfig) BuilderAPI(_ uint64) bool { - // TODO(corver): Dynamic BuilderAPI config disabled since VCs do not support it. + // NOTE: Dynamic BuilderAPI config disabled since VCs do not support it. return c.conf.BuilderAPI } diff --git a/app/retry/retry.go b/app/retry/retry.go index cdc92f725..59873f9cc 100644 --- a/app/retry/retry.go +++ b/app/retry/retry.go @@ -244,7 +244,5 @@ func isTemporaryBeaconErr(err error) bool { return true } - // TODO(corver): Add more checks here. - return false } diff --git a/app/tracer/trace.go b/app/tracer/trace.go index 7fa898014..6124e86c8 100644 --- a/app/tracer/trace.go +++ b/app/tracer/trace.go @@ -129,7 +129,7 @@ func newTraceProvider(exp sdktrace.SpanExporter, service string) *sdktrace.Trace ) tp := sdktrace.NewTracerProvider( - sdktrace.WithSampler(sdktrace.AlwaysSample()), // TODO(corver): Reconsider 100% sampling. + sdktrace.WithSampler(sdktrace.AlwaysSample()), sdktrace.WithBatcher(exp), sdktrace.WithResource(r), ) diff --git a/app/z/zapfield.go b/app/z/zapfield.go index 28dfceb26..24826052e 100644 --- a/app/z/zapfield.go +++ b/app/z/zapfield.go @@ -15,7 +15,7 @@ type Field func(add func(zap.Field)) // Err returns a wrapped zap error field. It will include an additional stack trace and fields // if the error is an internal structured error. -// Note: This is only used when logging errors on other levels than Error since it has built-in support for errors. +// NOTE: This is only used when logging errors on other levels than Error since it has built-in support for errors. func Err(err error) Field { type structErr interface { Fields() []Field