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

rollback node and dal data delay logs #1980

Merged
merged 1 commit into from
Aug 1, 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 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