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

fix(DASer): Log sampling errors in DASer #3889

Merged
merged 6 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 5 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
24 changes: 13 additions & 11 deletions das/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,20 @@ func (w *worker) sample(ctx context.Context, timeout time.Duration, height uint6

w.metrics.observeSample(ctx, h, time.Since(start), w.state.jobType, err)
if err != nil {
if !errors.Is(err, context.Canceled) {
log.Debugw(
"failed to sample header",
"type", w.state.jobType,
"height", h.Height(),
"hash", h.Hash(),
"square width", len(h.DAH.RowRoots),
"data root", h.DAH.String(),
"err", err,
"finished (s)", time.Since(start),
)
if errors.Is(err, context.Canceled) {
cristaloleg marked this conversation as resolved.
Show resolved Hide resolved
return err
}

log.Errorw(
Wondertan marked this conversation as resolved.
Show resolved Hide resolved
"failed to sample header",
"type", w.state.jobType,
"height", h.Height(),
"hash", h.Hash(),
"square width", len(h.DAH.RowRoots),
"data root", h.DAH.String(),
"err", err,
"finished (s)", time.Since(start),
)
return err
}

Expand Down
5 changes: 0 additions & 5 deletions share/availability/light/availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header
}

if err := dah.ValidateBasic(); err != nil {
log.Errorw("DAH validation failed", "error", err)
return err
}
Wondertan marked this conversation as resolved.
Show resolved Hide resolved

Expand Down Expand Up @@ -141,10 +140,6 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header

// if any of the samples failed, return an error
if len(failedSamples) > 0 {
log.Errorw("availability validation failed",
"root", dah.String(),
"failed_samples", failedSamples,
)
return share.ErrNotAvailable
}
return nil
Expand Down