diff --git a/base/gfspvgmgr/virtual_group_manager.go b/base/gfspvgmgr/virtual_group_manager.go index c0fa9d157..76de54502 100644 --- a/base/gfspvgmgr/virtual_group_manager.go +++ b/base/gfspvgmgr/virtual_group_manager.go @@ -30,8 +30,8 @@ const ( VirtualGroupManagerSpace = "VirtualGroupManager" RefreshMetaInterval = 5 * time.Second MaxStorageUsageRatio = 0.95 - DefaultInitialGVGStakingStorageSize = uint64(2) * 1024 * 1024 * 1024 * 1024 // 2TB per GVG, chain side DefaultMaxStoreSizePerFamily is 64 TB - additionalGVGStakingStorageSize = uint64(1) * 1024 * 1024 * 1024 * 1024 // 1TB + DefaultInitialGVGStakingStorageSize = uint64(1) * 1024 * 1024 * 1024 * 1024 // 1TB per GVG, chain side DefaultMaxStoreSizePerFamily is 64 TB + additionalGVGStakingStorageSize = uint64(1) * 1024 * 1024 * 1024 * 512 // 0.5TB defaultSPCheckTimeout = 3 * time.Second defaultSPHealthCheckerInterval = 10 * time.Second diff --git a/base/gnfd/gnfd_service.go b/base/gnfd/gnfd_service.go index 079596103..a5cf11b9d 100644 --- a/base/gnfd/gnfd_service.go +++ b/base/gnfd/gnfd_service.go @@ -874,7 +874,7 @@ func (g *Gnfd) ConfirmTransaction(ctx context.Context, txHash string) (*sdk.TxRe if strings.Contains(err.Error(), "not found") { // Tx not found, wait for next block and try again if err = g.WaitForNextBlock(ctx); err != nil { - return nil, err + log.Warnf("failed to wait for next block err:%v", err) } continue } diff --git a/go.mod b/go.mod index d068eb650..a0f666fbe 100644 --- a/go.mod +++ b/go.mod @@ -126,7 +126,7 @@ require ( github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt/v4 v4.3.0 // indirect github.com/golang/glog v1.1.2 // indirect - github.com/golang/mock v1.6.0 + github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/btree v1.1.2 // indirect @@ -308,7 +308,7 @@ replace ( github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0 github.com/cosmos/cosmos-sdk => github.com/bnb-chain/greenfield-cosmos-sdk v1.6.1-0.20240419024340-b5c75cfd8110 github.com/cosmos/iavl => github.com/bnb-chain/greenfield-iavl v0.20.1 - github.com/forbole/juno/v4 => github.com/bnb-chain/juno/v4 v4.0.0-20240422102216-0039530fcfb2 + github.com/forbole/juno/v4 => github.com/bnb-chain/juno/v4 v4.0.0-20240604033531-028f2cc8f76d github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 ) diff --git a/go.sum b/go.sum index f5af20e5f..a86372c8f 100644 --- a/go.sum +++ b/go.sum @@ -192,8 +192,8 @@ github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20231206043955-0855e0965b github.com/bnb-chain/greenfield-cosmos-sdk/math v0.0.0-20231206043955-0855e0965bc8/go.mod h1:An0MllWJY6PxibUpnwGk8jOm+a/qIxlKmL5Zyp9NnaM= github.com/bnb-chain/greenfield-iavl v0.20.1 h1:y3L64GU99otNp27/xLVBTDbv4eroR6CzoYz0rbaVotM= github.com/bnb-chain/greenfield-iavl v0.20.1/go.mod h1:oLksTs8dfh7DYIKBro7hbRQ+ewls7ghJ27pIXlbEXyI= -github.com/bnb-chain/juno/v4 v4.0.0-20240422102216-0039530fcfb2 h1:Zpq40LEvqzaqtT7QqISASBg6E51SZPAWLQ5gdbAtsfk= -github.com/bnb-chain/juno/v4 v4.0.0-20240422102216-0039530fcfb2/go.mod h1:p+KkPIHURpqUJOdXanhhYgZpTLQxGZWkrAwtUaOuPlM= +github.com/bnb-chain/juno/v4 v4.0.0-20240604033531-028f2cc8f76d h1:a5Q944ZvZK4K3lDkbIqweZd1CqEE8gmxph+wpTQzE3k= +github.com/bnb-chain/juno/v4 v4.0.0-20240604033531-028f2cc8f76d/go.mod h1:p+KkPIHURpqUJOdXanhhYgZpTLQxGZWkrAwtUaOuPlM= github.com/boltdb/bolt v1.3.1/go.mod h1:clJnj/oiGkjum5o1McbSZDSLxVThjynRyGBgiAx27Ps= github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g= github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d/go.mod h1:PmM6Mmwb0LSuEubjR8N7PtNe1KxZLtOUHtbeikc5h60= diff --git a/modular/blocksyncer/blocksyncer_options.go b/modular/blocksyncer/blocksyncer_options.go index 64f639b5f..7c9a8ef05 100644 --- a/modular/blocksyncer/blocksyncer_options.go +++ b/modular/blocksyncer/blocksyncer_options.go @@ -265,6 +265,7 @@ func (b *BlockSyncerModular) getLatestBlockHeight(ctx context.Context) { return case <-ticker.C: { + rpcStartTime := time.Now() latestBlockHeight, err := b.parserCtx.Node.LatestHeight() if err != nil { log.Errorw("failed to get last block from RPCConfig client", @@ -273,6 +274,7 @@ func (b *BlockSyncerModular) getLatestBlockHeight(ctx context.Context) { continue } metrics.ChainLatestHeight.Set(float64(latestBlockHeight)) + metrics.ChainRPCTime.Set(float64(time.Since(rpcStartTime).Milliseconds())) metrics.GoRoutineCount.Set(float64(runtime.NumGoroutine())) Cast(b.parserCtx.Indexer).GetLatestBlockHeight().Store(latestBlockHeight) }