Skip to content

Commit

Permalink
changing default parameters + logging
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed May 2, 2024
1 parent 656b017 commit a8fdcd1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (m *Manager) Start(ctx context.Context, isAggregator bool) error {
}
}
if !isAggregator {
go uevent.MustSubscribe(ctx, m.Pubsub, "applyBlockLoop", p2p.EventQueryNewNewGossipedBlock, m.onNewGossipedBlock, m.logger, 100)
go uevent.MustSubscribe(ctx, m.Pubsub, "applyBlockLoop", p2p.EventQueryNewNewGossipedBlock, m.onNewGossipedBlock, m.logger, 10000)

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
}

err := m.syncBlockManager()
Expand Down
5 changes: 5 additions & 0 deletions da/celestia/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package celestia

import (
"context"
"encoding/hex"
"encoding/json"
"errors"
"fmt"
Expand Down Expand Up @@ -319,6 +320,7 @@ func (c *DataAvailabilityLayerClient) retrieveBatches(daMetaData *da.DASubmitMet
ctx, cancel := context.WithTimeout(c.ctx, c.config.Timeout)
defer cancel()

c.logger.Debug("Celestia DA getting blob", "height", daMetaData.Height, "namespace", hex.EncodeToString(daMetaData.Namespace), "commitment", hex.EncodeToString(daMetaData.Commitment))
var batches []*types.Batch
blob, err := c.rpc.Get(ctx, daMetaData.Height, daMetaData.Namespace, daMetaData.Commitment)
if err != nil {
Expand All @@ -345,6 +347,9 @@ func (c *DataAvailabilityLayerClient) retrieveBatches(daMetaData *da.DASubmitMet
if err != nil {
c.logger.Error("unmarshal block", "daHeight", daMetaData.Height, "error", err)
}

c.logger.Debug("Celestia DA get blob successful", "DA height", daMetaData.Height, "lastBlockHeight", batch.EndHeight)

parsedBatch := new(types.Batch)
err = parsedBatch.FromProto(&batch)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions da/celestia/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
)

const (
defaultRpcRetryDelay = 10 * time.Second
defaultRpcRetryDelay = 1 * time.Second
defaultRpcCheckAttempts = 10
namespaceVersion = 0
defaultGasPrices = 0.1
Expand Down Expand Up @@ -42,7 +42,7 @@ type Config struct {
var CelestiaDefaultConfig = Config{
BaseURL: "http://127.0.0.1:26658",
AppNodeURL: "",
Timeout: 30 * time.Second,
Timeout: 5 * time.Second,
Fee: 0,
GasLimit: 20000000,
GasPrices: defaultGasPrices,
Expand Down

0 comments on commit a8fdcd1

Please sign in to comment.