diff --git a/mevshare/api.go b/mevshare/api.go index 90bac5b..655afa7 100644 --- a/mevshare/api.go +++ b/mevshare/api.go @@ -119,6 +119,8 @@ func (m *API) SendBundle(ctx context.Context, bundle SendMevBundleArgs) (_ SendM logger.Warn("failed to validate bundle", zap.Error(err)) return SendMevBundleResponse{}, err } + logger.Debug("received bundle", zap.String("bundle", hash.String()), zap.Time("receivedAt", startAt), zap.Int64("timestamp", startAt.Unix())) + if oldBundle, ok := m.knownBundleCache.Get(hash); ok { if !newerInclusion(&oldBundle, &bundle) { logger.Debug("bundle already known, ignoring", zap.String("hash", hash.Hex())) diff --git a/mevshare/builders.go b/mevshare/builders.go index 200503d..124e29a 100644 --- a/mevshare/builders.go +++ b/mevshare/builders.go @@ -206,10 +206,11 @@ func (b *BuildersBackend) SendBundle(ctx context.Context, logger *zap.Logger, bu start := time.Now() err := builder.SendBundle(ctx, &args) - logger.Debug("Sent bundle to internal builder", zap.String("builder", builder.Name), zap.Duration("duration", time.Since(start)), zap.Error(err)) + now := time.Now() + logger.Debug("Sent bundle to internal builder", zap.String("builder", builder.Name), zap.Duration("duration", time.Since(start)), zap.Error(err), zap.Time("time", now), zap.Int64("timestamp", now.Unix())) if err != nil { - logger.Warn("Failed to send bundle to internal builder", zap.Error(err), zap.String("builder", builder.Name)) + logger.Warn("Failed to send bundle to internal builder", zap.Error(err), zap.String("builder", builder.Name), zap.Time("time", now), zap.Int64("timestamp", now.Unix())) } else { internalBuildersSuccess[idx] = true } @@ -236,10 +237,11 @@ func (b *BuildersBackend) SendBundle(ctx context.Context, logger *zap.Logger, bu start := time.Now() err := builder.SendBundle(ctx, &args) - logger.Debug("Sent bundle to external builder", zap.String("builder", builder.Name), zap.Duration("duration", time.Since(start)), zap.Error(err)) + now := time.Now() + logger.Debug("Sent bundle to external builder", zap.String("builder", builder.Name), zap.Duration("duration", time.Since(start)), zap.Error(err), zap.Time("time", now), zap.Int64("timestamp", now.Unix())) if err != nil { - logger.Warn("Failed to send bundle to external builder", zap.Error(err), zap.String("builder", builder.Name)) + logger.Warn("Failed to send bundle to external builder", zap.Error(err), zap.String("builder", builder.Name), zap.Time("time", now), zap.Int64("timestamp", now.Unix())) } }(builder) } else {