Skip to content

Commit

Permalink
rollback node and dal data delay logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Intizar-T committed Aug 1, 2024
1 parent 11d824f commit 80c0d3d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
1 change: 0 additions & 1 deletion node/pkg/aggregator/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ type GlobalAggregate types.GlobalAggregate
type SubmissionData struct {
GlobalAggregate GlobalAggregate
Proof Proof
PublishTime time.Time
}

type App struct {
Expand Down
7 changes: 0 additions & 7 deletions node/pkg/aggregator/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ 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
8 changes: 0 additions & 8 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,13 +157,6 @@ 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")
Expand Down

0 comments on commit 80c0d3d

Please sign in to comment.