Skip to content

Commit

Permalink
chore: cleanup debug logs
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-bisonai committed Jul 31, 2024
1 parent 85b145c commit b1b439f
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 17 deletions.
1 change: 0 additions & 1 deletion node/pkg/aggregator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ type Proof types.Proof
type GlobalAggregate types.GlobalAggregate

type SubmissionData struct {
PublishTime time.Time
GlobalAggregate GlobalAggregate
Proof Proof
}
Expand Down
6 changes: 0 additions & 6 deletions node/pkg/aggregator/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,8 @@ func PublishGlobalAggregateAndProof(ctx context.Context, globalAggregate GlobalA
data := SubmissionData{
GlobalAggregate: globalAggregate,
Proof: proof,
PublishTime: time.Now(),
}

diff := time.Since(globalAggregate.Timestamp)
if diff > 1*time.Second {
log.Info().Dur("duration", diff).Int32("config_id", globalAggregate.ConfigID).Int64("value", globalAggregate.Value).Msg("published global aggregate")

}
return db.Publish(ctx, keys.SubmissionDataStreamKey(globalAggregate.ConfigID), data)
}

Expand Down
9 changes: 0 additions & 9 deletions node/pkg/dal/collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os"
"strconv"
"sync"
"time"

"bisonai.com/orakl/node/pkg/aggregator"
"bisonai.com/orakl/node/pkg/chain/websocketchainreader"
Expand Down Expand Up @@ -158,15 +157,7 @@ func (c *Collector) receiveEach(ctx context.Context, configId int32) error {
}

func (c *Collector) processIncomingData(ctx context.Context, data aggregator.SubmissionData) {
symbol := c.Symbols[data.GlobalAggregate.ConfigID]
diff := time.Since(data.GlobalAggregate.Timestamp).Seconds()
diffFromPublish := time.Since(data.PublishTime).Seconds()
if diffFromPublish >= 1 || diff >= 1 {
log.Warn().Msgf("dataDiff: %v, diffFromPublish: %v for symbol %s", diff, diffFromPublish, symbol)
}

result, err := c.IncomingDataToOutgoingData(ctx, data)

if err != nil {
log.Error().Err(err).Str("Player", "DalCollector").Msg("failed to convert incoming data to outgoing data")
return
Expand Down
1 change: 0 additions & 1 deletion node/pkg/reporter/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ func (r *Reporter) regularReporterJob(ctx context.Context) error {
func (r *Reporter) deviationJob(ctx context.Context) error {
deviatingAggregates := GetDeviatingAggregates(r.LatestSubmittedDataMap, r.LatestDataMap, r.deviationThreshold)
if len(deviatingAggregates) == 0 {
log.Debug().Str("Player", "Reporter").Msg("no deviating aggregates found")
return nil
}
log.Debug().Str("Player", "Reporter").Msgf("deviating aggregates found: %v", deviatingAggregates)
Expand Down

0 comments on commit b1b439f

Please sign in to comment.