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

less startup logs #13920

Merged
merged 1 commit into from
Feb 24, 2025
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
2 changes: 1 addition & 1 deletion cl/sentinel/gossip.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ func (sub *GossipSubscription) checkIfTopicNeedsToEnabledOrDisabled() {
go sub.run(sctx, sub.sub, sub.sub.Topic())
sub.subscribed.Store(true)
sub.s.updateENROnSubscription(sub.sub.Topic(), true)
log.Info("[Gossip] Subscribed to topic", "topic", sub.sub.Topic())
log.Debug("[Gossip] Subscribed to topic", "topic", sub.sub.Topic())
}

}
Expand Down
12 changes: 3 additions & 9 deletions ethdb/privateapi/ethbackend.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,11 @@ func NewEthBackendServer(ctx context.Context, eth EthBackend, db kv.RwDB, notifi
go func() {
var err error
defer clean()
logger.Info("new subscription to logs established")
defer func() {
if err != nil {
if !errors.Is(err, context.Canceled) {
logger.Warn("subscription to logs closed", "reason", err)
logger.Warn("[rpc] terminted subscription to `logs` events", "reason", err)
}
} else {
logger.Warn("subscription to logs closed")
}
}()
for {
Expand Down Expand Up @@ -221,19 +218,16 @@ func (s *EthBackendServer) NetPeerCount(_ context.Context, _ *remote.NetPeerCoun
}

func (s *EthBackendServer) Subscribe(r *remote.SubscribeRequest, subscribeServer remote.ETHBACKEND_SubscribeServer) (err error) {
s.logger.Debug("Establishing event subscription channel with the RPC daemon ...")
s.logger.Debug("[rpc] new subscription to `newHeaders` events")
ch, clean := s.notifications.Events.AddHeaderSubscription()
defer clean()
newSnCh, newSnClean := s.notifications.Events.AddNewSnapshotSubscription()
defer newSnClean()
s.logger.Info("new subscription to newHeaders established")
defer func() {
if err != nil {
if !errors.Is(err, context.Canceled) {
s.logger.Warn("subscription to newHeaders closed", "reason", err)
s.logger.Warn("[rpc] terminted subscription to `newHeaders` events", "reason", err)
}
} else {
s.logger.Warn("subscription to newHeaders closed")
}
}()
_ = subscribeServer.Send(&remote.SubscribeReply{Type: remote.Event_NEW_SNAPSHOT})
Expand Down
5 changes: 0 additions & 5 deletions txnprovider/txpool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"fmt"
"math"
"math/big"
"runtime"
"sync"
"sync/atomic"
"time"
Expand All @@ -40,7 +39,6 @@ import (
"github.com/erigontech/erigon-lib/chain"
"github.com/erigontech/erigon-lib/common"
"github.com/erigontech/erigon-lib/common/assert"
"github.com/erigontech/erigon-lib/common/dbg"
"github.com/erigontech/erigon-lib/common/fixedgas"
"github.com/erigontech/erigon-lib/common/hexutil"
"github.com/erigontech/erigon-lib/common/u256"
Expand Down Expand Up @@ -2324,8 +2322,6 @@ func (p *TxPool) logStats() {
p.lock.Lock()
defer p.lock.Unlock()

var m runtime.MemStats
dbg.ReadMemStats(&m)
ctx := []interface{}{
"pending", p.pending.Len(),
"baseFee", p.baseFee.Len(),
Expand All @@ -2335,7 +2331,6 @@ func (p *TxPool) logStats() {
if cacheKeys > 0 {
ctx = append(ctx, "cache_keys", cacheKeys)
}
ctx = append(ctx, "alloc", common.ByteCount(m.Alloc), "sys", common.ByteCount(m.Sys))
p.logger.Info("[txpool] stat", ctx...)
pendingSubCounter.SetInt(p.pending.Len())
basefeeSubCounter.SetInt(p.baseFee.Len())
Expand Down
Loading