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

app: remove todos #2903

Merged
merged 2 commits into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/eth2wrap/synthproposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/health/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion app/log/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion app/obolapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion app/peerinfo/adhoc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 2 additions & 3 deletions app/peerinfo/peerinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)),
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion app/peerinfo/peerinfopb/v1/peerinfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
}
2 changes: 1 addition & 1 deletion app/priorities.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@

// 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.

Check warning on line 45 in app/priorities.go

View check run for this annotation

Codecov / codecov/patch

app/priorities.go#L45

Added line #L45 was not covered by tests
return c.conf.BuilderAPI
}
2 changes: 0 additions & 2 deletions app/retry/retry.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,5 @@ func isTemporaryBeaconErr(err error) bool {
return true
}

// TODO(corver): Add more checks here.

return false
}
2 changes: 1 addition & 1 deletion app/tracer/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down
2 changes: 1 addition & 1 deletion app/z/zapfield.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading