From 38cd4d2bb29824f6bfcfa2b7603d22ee161c7824 Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 5 Dec 2023 11:15:32 +0200 Subject: [PATCH 1/5] use sharded persister for static storers --- dataRetriever/factory/dataPoolFactory.go | 17 ++- genesis/process/genesisBlockCreator.go | 8 ++ go.mod | 2 +- go.sum | 6 + process/smartContract/hooks/blockChainHook.go | 8 ++ storage/factory/storageServiceFactory.go | 115 ++++++++++++++++-- storage/storageunit/storageunit.go | 12 +- testscommon/dataRetriever/poolFactory.go | 15 ++- update/factory/dataTrieFactory.go | 9 ++ update/factory/exportHandlerFactory.go | 8 ++ 10 files changed, 172 insertions(+), 28 deletions(-) diff --git a/dataRetriever/factory/dataPoolFactory.go b/dataRetriever/factory/dataPoolFactory.go index 781488e1f43..0033d14f686 100644 --- a/dataRetriever/factory/dataPoolFactory.go +++ b/dataRetriever/factory/dataPoolFactory.go @@ -176,14 +176,13 @@ func createTrieSyncDB(args ArgsDataPool) (storage.Persister, error) { return disabled.NewPersister(), nil } - dbCfg := factory.GetDBFromConfig(mainConfig.TrieSyncStorage.DB) shardId := core.GetShardIDString(args.ShardCoordinator.SelfId()) - argDB := storageunit.ArgDB{ - DBType: dbCfg.Type, - Path: args.PathManager.PathForStatic(shardId, mainConfig.TrieSyncStorage.DB.FilePath), - BatchDelaySeconds: dbCfg.BatchDelaySeconds, - MaxBatchSize: dbCfg.MaxBatchSize, - MaxOpenFiles: dbCfg.MaxOpenFiles, + path := args.PathManager.PathForStatic(shardId, mainConfig.TrieSyncStorage.DB.FilePath) + + dbConfigHandler := factory.NewDBConfigHandler(mainConfig.TrieSyncStorage.DB) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err } if mainConfig.TrieSyncStorage.DB.UseTmpAsFilePath { @@ -192,10 +191,10 @@ func createTrieSyncDB(args ArgsDataPool) (storage.Persister, error) { return nil, errTempDir } - argDB.Path = filePath + path = filePath } - db, err := storageunit.NewDB(argDB) + db, err := storageunit.NewDB(persisterFactory, path) if err != nil { return nil, fmt.Errorf("%w while creating the db for the trie nodes", err) } diff --git a/genesis/process/genesisBlockCreator.go b/genesis/process/genesisBlockCreator.go index 3a799c57ca9..2e9b14d7db3 100644 --- a/genesis/process/genesisBlockCreator.go +++ b/genesis/process/genesisBlockCreator.go @@ -130,9 +130,17 @@ func (gbc *genesisBlockCreator) createHardForkImportHandler() error { func createStorer(storageConfig config.StorageConfig, folder string) (storage.Storer, error) { dbConfig := factory.GetDBFromConfig(storageConfig.DB) dbConfig.FilePath = path.Join(folder, storageConfig.DB.FilePath) + + dbConfigHandler := factory.NewDBConfigHandler(storageConfig.DB) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + store, err := storageunit.NewStorageUnitFromConf( factory.GetCacherFromConfig(storageConfig.Cache), dbConfig, + persisterFactory, ) if err != nil { return nil, err diff --git a/go.mod b/go.mod index 2c45976a9cc..86cc839d1f6 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/multiversx/mx-chain-es-indexer-go v1.4.17 github.com/multiversx/mx-chain-logger-go v1.0.13 github.com/multiversx/mx-chain-scenario-go v1.2.1 - github.com/multiversx/mx-chain-storage-go v1.0.13 + github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78 github.com/multiversx/mx-chain-vm-common-go v1.5.8 github.com/multiversx/mx-chain-vm-go v1.5.21 github.com/multiversx/mx-chain-vm-v1_2-go v1.2.63 diff --git a/go.sum b/go.sum index 1b270039c95..12108cb85e4 100644 --- a/go.sum +++ b/go.sum @@ -128,6 +128,7 @@ github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= +github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -260,6 +261,7 @@ github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZl github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= +github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -267,6 +269,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -398,6 +401,8 @@ github.com/multiversx/mx-chain-scenario-go v1.2.1 h1:9eC6VcOEAKRRKZ7EbSWPLzCdNIM github.com/multiversx/mx-chain-scenario-go v1.2.1/go.mod h1:EuZY7DpNFHVNSxJR8dKE1z2I8gBYfEFFPSwNUOXptqE= github.com/multiversx/mx-chain-storage-go v1.0.13 h1:i41VPDJZ0pn5gf18zTXrac5xeiolUOztNuzL3wEXRuI= github.com/multiversx/mx-chain-storage-go v1.0.13/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= +github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78 h1:bSHeUIJzwcJv2wcZ9dr4HrFjGvn+a0mZLEsh2L7Frb0= +github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= github.com/multiversx/mx-chain-vm-common-go v1.5.8 h1:IRHB9/DasGrK5HU8TVeeLrEWt7tcb9zfnzHRLa6KES8= github.com/multiversx/mx-chain-vm-common-go v1.5.8/go.mod h1:sqkKMCnwkWl8DURdb9q7pctK8IANghdHY1KJLE0ox2c= github.com/multiversx/mx-chain-vm-go v1.5.21 h1:tA4fZ4ZwjsRcvMEyTgWStzxJFP/ypSmpwgLCEUl7NXw= @@ -412,6 +417,7 @@ github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqd github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM= github.com/multiversx/protobuf v1.3.2 h1:RaNkxvGTGbA0lMcnHAN24qE1G1i+Xs5yHA6MDvQ4mSM= github.com/multiversx/protobuf v1.3.2/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= +github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= diff --git a/process/smartContract/hooks/blockChainHook.go b/process/smartContract/hooks/blockChainHook.go index 35c3aa7a4ce..bbe9d1af0d1 100644 --- a/process/smartContract/hooks/blockChainHook.go +++ b/process/smartContract/hooks/blockChainHook.go @@ -816,9 +816,17 @@ func (bh *BlockChainHookImpl) makeCompiledSCStorage() error { dbConfig := factory.GetDBFromConfig(bh.configSCStorage.DB) dbConfig.FilePath = path.Join(bh.workingDir, defaultCompiledSCPath, bh.configSCStorage.DB.FilePath) + + dbConfigHandler := factory.NewDBConfigHandler(bh.configSCStorage.DB) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + store, err := storageunit.NewStorageUnitFromConf( factory.GetCacherFromConfig(bh.configSCStorage.Cache), dbConfig, + persisterFactory, ) if err != nil { return err diff --git a/storage/factory/storageServiceFactory.go b/storage/factory/storageServiceFactory.go index 948b0195630..e3525dadc84 100644 --- a/storage/factory/storageServiceFactory.go +++ b/storage/factory/storageServiceFactory.go @@ -215,9 +215,18 @@ func (psf *StorageServiceFactory) createAndAddBaseStorageUnits( metaHdrHashNonceUnitConfig := GetDBFromConfig(psf.generalConfig.MetaHdrNonceHashStorage.DB) dbPath := psf.pathManager.PathForStatic(shardID, psf.generalConfig.MetaHdrNonceHashStorage.DB.FilePath) metaHdrHashNonceUnitConfig.FilePath = dbPath + + dbConfigHandler := NewDBConfigHandler(psf.generalConfig.MetaHdrNonceHashStorage.DB) + metaHdrHashNoncePersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + metaHdrHashNonceUnit, err := storageunit.NewStorageUnitFromConf( GetCacherFromConfig(psf.generalConfig.MetaHdrNonceHashStorage.Cache), - metaHdrHashNonceUnitConfig) + metaHdrHashNonceUnitConfig, + metaHdrHashNoncePersisterCreator, + ) if err != nil { return fmt.Errorf("%w for MetaHdrNonceHashStorage", err) } @@ -263,9 +272,18 @@ func (psf *StorageServiceFactory) createAndAddBaseStorageUnits( shardId := core.GetShardIDString(psf.shardCoordinator.SelfId()) dbPath = psf.pathManager.PathForStatic(shardId, psf.generalConfig.StatusMetricsStorage.DB.FilePath) statusMetricsDbConfig.FilePath = dbPath + + dbConfigHandler = NewDBConfigHandler(psf.generalConfig.StatusMetricsStorage.DB) + statusMetricsPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + statusMetricsStorageUnit, err := storageunit.NewStorageUnitFromConf( GetCacherFromConfig(psf.generalConfig.StatusMetricsStorage.Cache), - statusMetricsDbConfig) + statusMetricsDbConfig, + statusMetricsPersisterCreator, + ) if err != nil { return fmt.Errorf("%w for StatusMetricsStorage", err) } @@ -297,9 +315,18 @@ func (psf *StorageServiceFactory) CreateForShard() (dataRetriever.StorageService shardHdrHashNonceConfig := GetDBFromConfig(psf.generalConfig.ShardHdrNonceHashStorage.DB) dbPath := psf.pathManager.PathForStatic(shardID, psf.generalConfig.ShardHdrNonceHashStorage.DB.FilePath) + shardID shardHdrHashNonceConfig.FilePath = dbPath + + dbConfigHandler := NewDBConfigHandler(psf.generalConfig.ShardHdrNonceHashStorage.DB) + shardHdrHashNoncePersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + shardHdrHashNonceUnit, err := storageunit.NewStorageUnitFromConf( GetCacherFromConfig(psf.generalConfig.ShardHdrNonceHashStorage.Cache), - shardHdrHashNonceConfig) + shardHdrHashNonceConfig, + shardHdrHashNoncePersisterCreator, + ) if err != nil { return nil, fmt.Errorf("%w for ShardHdrNonceHashStorage", err) } @@ -368,9 +395,18 @@ func (psf *StorageServiceFactory) CreateForMeta() (dataRetriever.StorageService, shardID = core.GetShardIDString(core.MetachainShardId) dbPath := psf.pathManager.PathForStatic(shardID, psf.generalConfig.ShardHdrNonceHashStorage.DB.FilePath) + fmt.Sprintf("%d", i) shardHdrHashNonceConfig.FilePath = dbPath + + dbConfigHandler := NewDBConfigHandler(psf.generalConfig.ShardHdrNonceHashStorage.DB) + shardHdrHashNoncePersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + shardHdrHashNonceUnits[i], err = storageunit.NewStorageUnitFromConf( GetCacherFromConfig(psf.generalConfig.ShardHdrNonceHashStorage.Cache), - shardHdrHashNonceConfig) + shardHdrHashNonceConfig, + shardHdrHashNoncePersisterCreator, + ) if err != nil { return nil, fmt.Errorf("%w for ShardHdrNonceHashStorage on shard %d", err, i) } @@ -501,7 +537,18 @@ func (psf *StorageServiceFactory) setUpDbLookupExtensions(chainStorer *dataRetri miniblockHashByTxHashDbConfig := GetDBFromConfig(miniblockHashByTxHashConfig.DB) miniblockHashByTxHashDbConfig.FilePath = psf.pathManager.PathForStatic(shardID, miniblockHashByTxHashConfig.DB.FilePath) miniblockHashByTxHashCacherConfig := GetCacherFromConfig(miniblockHashByTxHashConfig.Cache) - miniblockHashByTxHashUnit, err := storageunit.NewStorageUnitFromConf(miniblockHashByTxHashCacherConfig, miniblockHashByTxHashDbConfig) + + dbConfigHandler := NewDBConfigHandler(miniblockHashByTxHashConfig.DB) + miniblockHashByTxHashPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + + miniblockHashByTxHashUnit, err := storageunit.NewStorageUnitFromConf( + miniblockHashByTxHashCacherConfig, + miniblockHashByTxHashDbConfig, + miniblockHashByTxHashPersisterCreator, + ) if err != nil { return fmt.Errorf("%w for DbLookupExtensions.MiniblockHashByTxHashStorageConfig", err) } @@ -513,7 +560,18 @@ func (psf *StorageServiceFactory) setUpDbLookupExtensions(chainStorer *dataRetri blockHashByRoundDBConfig := GetDBFromConfig(blockHashByRoundConfig.DB) blockHashByRoundDBConfig.FilePath = psf.pathManager.PathForStatic(shardID, blockHashByRoundConfig.DB.FilePath) blockHashByRoundCacherConfig := GetCacherFromConfig(blockHashByRoundConfig.Cache) - blockHashByRoundUnit, err := storageunit.NewStorageUnitFromConf(blockHashByRoundCacherConfig, blockHashByRoundDBConfig) + + dbConfigHandler = NewDBConfigHandler(blockHashByRoundConfig.DB) + blockHashByRoundPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + + blockHashByRoundUnit, err := storageunit.NewStorageUnitFromConf( + blockHashByRoundCacherConfig, + blockHashByRoundDBConfig, + blockHashByRoundPersisterCreator, + ) if err != nil { return fmt.Errorf("%w for DbLookupExtensions.RoundHashStorageConfig", err) } @@ -525,7 +583,18 @@ func (psf *StorageServiceFactory) setUpDbLookupExtensions(chainStorer *dataRetri epochByHashDbConfig := GetDBFromConfig(epochByHashConfig.DB) epochByHashDbConfig.FilePath = psf.pathManager.PathForStatic(shardID, epochByHashConfig.DB.FilePath) epochByHashCacherConfig := GetCacherFromConfig(epochByHashConfig.Cache) - epochByHashUnit, err := storageunit.NewStorageUnitFromConf(epochByHashCacherConfig, epochByHashDbConfig) + + dbConfigHandler = NewDBConfigHandler(epochByHashConfig.DB) + epochByHashPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return err + } + + epochByHashUnit, err := storageunit.NewStorageUnitFromConf( + epochByHashCacherConfig, + epochByHashDbConfig, + epochByHashPersisterCreator, + ) if err != nil { return fmt.Errorf("%w for DbLookupExtensions.EpochByHashStorageConfig", err) } @@ -564,7 +633,16 @@ func (psf *StorageServiceFactory) createEsdtSuppliesUnit(shardIDStr string) (sto esdtSuppliesDbConfig := GetDBFromConfig(esdtSuppliesConfig.DB) esdtSuppliesDbConfig.FilePath = psf.pathManager.PathForStatic(shardIDStr, esdtSuppliesConfig.DB.FilePath) esdtSuppliesCacherConfig := GetCacherFromConfig(esdtSuppliesConfig.Cache) - return storageunit.NewStorageUnitFromConf(esdtSuppliesCacherConfig, esdtSuppliesDbConfig) + + dbConfigHandler := NewDBConfigHandler(esdtSuppliesConfig.DB) + esdtSuppliesPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + + return storageunit.NewStorageUnitFromConf( + esdtSuppliesCacherConfig, esdtSuppliesDbConfig, + esdtSuppliesPersisterCreator) } func (psf *StorageServiceFactory) createPruningStorerArgs( @@ -617,9 +695,18 @@ func (psf *StorageServiceFactory) createTrieEpochRootHashStorerIfNeeded() (stora shardId := core.GetShardIDString(psf.shardCoordinator.SelfId()) dbPath := psf.pathManager.PathForStatic(shardId, psf.generalConfig.TrieEpochRootHashStorage.DB.FilePath) trieEpochRootHashDbConfig.FilePath = dbPath + + dbConfigHandler := NewDBConfigHandler(psf.generalConfig.TrieEpochRootHashStorage.DB) + esdtSuppliesPersisterCreator, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + trieEpochRootHashStorageUnit, err := storageunit.NewStorageUnitFromConf( GetCacherFromConfig(psf.generalConfig.TrieEpochRootHashStorage.Cache), - trieEpochRootHashDbConfig) + trieEpochRootHashDbConfig, + esdtSuppliesPersisterCreator, + ) if err != nil { return nil, fmt.Errorf("%w for TrieEpochRootHashStorage", err) } @@ -634,9 +721,17 @@ func (psf *StorageServiceFactory) createTriePersister( shardID := core.GetShardIDString(psf.shardCoordinator.SelfId()) dbPath := psf.pathManager.PathForStatic(shardID, storageConfig.DB.FilePath) trieDBConfig.FilePath = dbPath + + dbConfigHandler := NewDBConfigHandler(storageConfig.DB) + persisterFactory, err := NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + trieUnit, err := storageunit.NewStorageUnitFromConf( GetCacherFromConfig(storageConfig.Cache), - trieDBConfig) + trieDBConfig, + persisterFactory) if err != nil { return nil, err } diff --git a/storage/storageunit/storageunit.go b/storage/storageunit/storageunit.go index fc205e12a33..eb4464ae8ca 100644 --- a/storage/storageunit/storageunit.go +++ b/storage/storageunit/storageunit.go @@ -43,14 +43,18 @@ func NewCache(config CacheConfig) (storage.Cacher, error) { return storageUnit.NewCache(config) } +type PersisterFactoryHandler interface { + Create(path string) (storage.Persister, error) +} + // NewDB creates a new database from database config -func NewDB(argDB ArgDB) (storage.Persister, error) { - return storageUnit.NewDB(argDB) +func NewDB(persisterFactory PersisterFactoryHandler, path string) (storage.Persister, error) { + return storageUnit.NewDB(persisterFactory, path) } // NewStorageUnitFromConf creates a new storage unit from a storage unit config -func NewStorageUnitFromConf(cacheConf CacheConfig, dbConf DBConfig) (*Unit, error) { - return storageUnit.NewStorageUnitFromConf(cacheConf, dbConf) +func NewStorageUnitFromConf(cacheConf CacheConfig, dbConf DBConfig, persisterFactory PersisterFactoryHandler) (*Unit, error) { + return storageUnit.NewStorageUnitFromConf(cacheConf, dbConf, persisterFactory) } // NewNilStorer will return a nil storer diff --git a/testscommon/dataRetriever/poolFactory.go b/testscommon/dataRetriever/poolFactory.go index 1597ef02074..77bdeb610a7 100644 --- a/testscommon/dataRetriever/poolFactory.go +++ b/testscommon/dataRetriever/poolFactory.go @@ -13,6 +13,7 @@ import ( "github.com/multiversx/mx-chain-go/dataRetriever/shardedData" "github.com/multiversx/mx-chain-go/dataRetriever/txpool" "github.com/multiversx/mx-chain-go/storage/cache" + storageFactory "github.com/multiversx/mx-chain-go/storage/factory" "github.com/multiversx/mx-chain-go/storage/storageunit" "github.com/multiversx/mx-chain-go/testscommon/txcachemocks" "github.com/multiversx/mx-chain-go/trie/factory" @@ -88,14 +89,20 @@ func CreatePoolsHolder(numShards uint32, selfShard uint32) dataRetriever.PoolsHo panicIfError("Create trieSync cacher", err) tempDir, _ := os.MkdirTemp("", "integrationTests") - cfg := storageunit.ArgDB{ - Path: tempDir, - DBType: storageunit.LvlDBSerial, + + dbConfig := config.DBConfig{ + FilePath: tempDir, + Type: string(storageunit.LvlDBSerial), BatchDelaySeconds: 4, MaxBatchSize: 10000, MaxOpenFiles: 10, } - persister, err := storageunit.NewDB(cfg) + + dbConfigHandler := storageFactory.NewDBConfigHandler(dbConfig) + persisterFactory, err := storageFactory.NewPersisterFactory(dbConfigHandler) + panicIfError("Create persister factory", err) + + persister, err := storageunit.NewDB(persisterFactory, tempDir) panicIfError("Create trieSync DB", err) tnf := factory.NewTrieNodeFactory() diff --git a/update/factory/dataTrieFactory.go b/update/factory/dataTrieFactory.go index bd3f7f178c3..f69dbe5a8fd 100644 --- a/update/factory/dataTrieFactory.go +++ b/update/factory/dataTrieFactory.go @@ -14,6 +14,7 @@ import ( "github.com/multiversx/mx-chain-go/sharding" "github.com/multiversx/mx-chain-go/state" "github.com/multiversx/mx-chain-go/storage/database" + "github.com/multiversx/mx-chain-go/storage/factory" storageFactory "github.com/multiversx/mx-chain-go/storage/factory" "github.com/multiversx/mx-chain-go/storage/storageunit" "github.com/multiversx/mx-chain-go/trie" @@ -62,9 +63,17 @@ func NewDataTrieFactory(args ArgsNewDataTrieFactory) (*dataTrieFactory, error) { dbConfig := storageFactory.GetDBFromConfig(args.StorageConfig.DB) dbConfig.FilePath = path.Join(args.SyncFolder, args.StorageConfig.DB.FilePath) + + dbConfigHandler := factory.NewDBConfigHandler(args.StorageConfig.DB) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + accountsTrieStorage, err := storageunit.NewStorageUnitFromConf( storageFactory.GetCacherFromConfig(args.StorageConfig.Cache), dbConfig, + persisterFactory, ) if err != nil { return nil, err diff --git a/update/factory/exportHandlerFactory.go b/update/factory/exportHandlerFactory.go index f7d1ed28923..704127cd6d0 100644 --- a/update/factory/exportHandlerFactory.go +++ b/update/factory/exportHandlerFactory.go @@ -606,9 +606,17 @@ func (e *exportHandlerFactory) createInterceptors() error { func createStorer(storageConfig config.StorageConfig, folder string) (storage.Storer, error) { dbConfig := storageFactory.GetDBFromConfig(storageConfig.DB) dbConfig.FilePath = path.Join(folder, storageConfig.DB.FilePath) + + dbConfigHandler := storageFactory.NewDBConfigHandler(storageConfig.DB) + persisterFactory, err := storageFactory.NewPersisterFactory(dbConfigHandler) + if err != nil { + return nil, err + } + accountsTrieStorage, err := storageunit.NewStorageUnitFromConf( storageFactory.GetCacherFromConfig(storageConfig.Cache), dbConfig, + persisterFactory, ) if err != nil { return nil, err From c1b52f7e8627b5025e463384fa7ab11f16e17616 Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 5 Dec 2023 12:43:05 +0200 Subject: [PATCH 2/5] update unit tests --- epochStart/metachain/systemSCs_test.go | 14 ++++-- go.mod | 2 +- go.sum | 10 +---- storage/storageunit/storageunit_test.go | 57 ++++++++++++++++++++----- 4 files changed, 59 insertions(+), 24 deletions(-) diff --git a/epochStart/metachain/systemSCs_test.go b/epochStart/metachain/systemSCs_test.go index e4e168e145e..76d480f2f52 100644 --- a/epochStart/metachain/systemSCs_test.go +++ b/epochStart/metachain/systemSCs_test.go @@ -40,6 +40,7 @@ import ( "github.com/multiversx/mx-chain-go/state/storagePruningManager" "github.com/multiversx/mx-chain-go/state/storagePruningManager/evictionWaitingList" "github.com/multiversx/mx-chain-go/storage" + storageFactory "github.com/multiversx/mx-chain-go/storage/factory" "github.com/multiversx/mx-chain-go/storage/storageunit" "github.com/multiversx/mx-chain-go/testscommon" "github.com/multiversx/mx-chain-go/testscommon/cryptoMocks" @@ -76,16 +77,21 @@ func createPhysicalUnit(t *testing.T) (storage.Storer, string) { Shards: 0, } dir := t.TempDir() - persisterConfig := storageunit.ArgDB{ - Path: dir, - DBType: "LvlDBSerial", + + dbConfig := config.DBConfig{ + FilePath: dir, + Type: "LvlDBSerial", BatchDelaySeconds: 2, MaxBatchSize: 45000, MaxOpenFiles: 10, } + dbConfigHandler := storageFactory.NewDBConfigHandler(dbConfig) + persisterFactory, err := storageFactory.NewPersisterFactory(dbConfigHandler) + assert.Nil(t, err) + cache, _ := storageunit.NewCache(cacheConfig) - persist, _ := storageunit.NewDB(persisterConfig) + persist, _ := storageunit.NewDB(persisterFactory, dir) unit, _ := storageunit.NewStorageUnit(cache, persist) return unit, dir diff --git a/go.mod b/go.mod index 86cc839d1f6..8b01509f2c8 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/multiversx/mx-chain-es-indexer-go v1.4.17 github.com/multiversx/mx-chain-logger-go v1.0.13 github.com/multiversx/mx-chain-scenario-go v1.2.1 - github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78 + github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634 github.com/multiversx/mx-chain-vm-common-go v1.5.8 github.com/multiversx/mx-chain-vm-go v1.5.21 github.com/multiversx/mx-chain-vm-v1_2-go v1.2.63 diff --git a/go.sum b/go.sum index 12108cb85e4..bd1e1898c35 100644 --- a/go.sum +++ b/go.sum @@ -128,7 +128,6 @@ github.com/gizak/termui/v3 v3.1.0 h1:ZZmVDgwHl7gR7elfKf1xc4IudXZ5qqfDh4wExk4Iajc github.com/gizak/termui/v3 v3.1.0/go.mod h1:bXQEBkJpzxUAKf0+xq9MSWAvWZlE7c+aidmyFlkYTrY= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q= -github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs= github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= github.com/go-logr/logr v1.2.4 h1:g01GSCwiDw2xSZfjJ2/T9M+S6pFdcNtFYsp+Y43HYDQ= github.com/go-logr/logr v1.2.4/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= @@ -261,7 +260,6 @@ github.com/jbenet/goprocess v0.1.4/go.mod h1:5yspPrukOVuOLORacaBi858NqyClJPQxYZl github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= github.com/jrick/logrotate v1.0.0/go.mod h1:LNinyqDIJnpAur+b8yyulnQw/wDuN1+BYKlTRt3OuAQ= github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU= github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= @@ -269,7 +267,6 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= @@ -399,10 +396,8 @@ github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpA github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk= github.com/multiversx/mx-chain-scenario-go v1.2.1 h1:9eC6VcOEAKRRKZ7EbSWPLzCdNIMWwuNBtAZlgR4cSMA= github.com/multiversx/mx-chain-scenario-go v1.2.1/go.mod h1:EuZY7DpNFHVNSxJR8dKE1z2I8gBYfEFFPSwNUOXptqE= -github.com/multiversx/mx-chain-storage-go v1.0.13 h1:i41VPDJZ0pn5gf18zTXrac5xeiolUOztNuzL3wEXRuI= -github.com/multiversx/mx-chain-storage-go v1.0.13/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= -github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78 h1:bSHeUIJzwcJv2wcZ9dr4HrFjGvn+a0mZLEsh2L7Frb0= -github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231204162809-9f0f3a4bef78/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= +github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634 h1:lLr58wutQRqoIBtHX3iGHxyZkoAxeQY2l7Eb3PlD1Hw= +github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= github.com/multiversx/mx-chain-vm-common-go v1.5.8 h1:IRHB9/DasGrK5HU8TVeeLrEWt7tcb9zfnzHRLa6KES8= github.com/multiversx/mx-chain-vm-common-go v1.5.8/go.mod h1:sqkKMCnwkWl8DURdb9q7pctK8IANghdHY1KJLE0ox2c= github.com/multiversx/mx-chain-vm-go v1.5.21 h1:tA4fZ4ZwjsRcvMEyTgWStzxJFP/ypSmpwgLCEUl7NXw= @@ -417,7 +412,6 @@ github.com/multiversx/mx-components-big-int v1.0.0 h1:Wkr8lSzK2nDqixOrrBa47VNuqd github.com/multiversx/mx-components-big-int v1.0.0/go.mod h1:maIEMgHlNE2u78JaDD0oLzri+ShgU4okHfzP3LWGdQM= github.com/multiversx/protobuf v1.3.2 h1:RaNkxvGTGbA0lMcnHAN24qE1G1i+Xs5yHA6MDvQ4mSM= github.com/multiversx/protobuf v1.3.2/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= github.com/nsf/termbox-go v0.0.0-20190121233118-02980233997d h1:x3S6kxmy49zXVVyhcnrFqxvNVCBPb2KZ9hV2RBdS840= diff --git a/storage/storageunit/storageunit_test.go b/storage/storageunit/storageunit_test.go index ff21f26e252..34affcb569f 100644 --- a/storage/storageunit/storageunit_test.go +++ b/storage/storageunit/storageunit_test.go @@ -5,6 +5,8 @@ import ( "testing" "github.com/multiversx/mx-chain-core-go/core/check" + "github.com/multiversx/mx-chain-go/config" + "github.com/multiversx/mx-chain-go/storage/factory" "github.com/multiversx/mx-chain-go/storage/mock" "github.com/multiversx/mx-chain-go/storage/storageunit" "github.com/multiversx/mx-chain-go/testscommon" @@ -76,28 +78,40 @@ func TestNewDB(t *testing.T) { t.Run("wrong config should error", func(t *testing.T) { t.Parallel() - args := storageunit.ArgDB{ - DBType: "invalid type", - Path: "TEST", + path := "TEST" + dbConfig := config.DBConfig{ + FilePath: path, + Type: "invalid type", BatchDelaySeconds: 5, MaxBatchSize: 10, MaxOpenFiles: 10, } - db, err := storageunit.NewDB(args) + + dbConfigHandler := factory.NewDBConfigHandler(dbConfig) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + assert.Nil(t, err) + + db, err := storageunit.NewDB(persisterFactory, path) assert.True(t, check.IfNil(db)) assert.Equal(t, common.ErrNotSupportedDBType, err) }) t.Run("should work", func(t *testing.T) { t.Parallel() - args := storageunit.ArgDB{ - DBType: "LvlDBSerial", - Path: path.Join(t.TempDir(), "TEST"), + path := path.Join(t.TempDir(), "TEST") + dbConfig := config.DBConfig{ + FilePath: path, + Type: "LvlDBSerial", BatchDelaySeconds: 5, MaxBatchSize: 10, MaxOpenFiles: 10, } - db, err := storageunit.NewDB(args) + + dbConfigHandler := factory.NewDBConfigHandler(dbConfig) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + assert.Nil(t, err) + + db, err := storageunit.NewDB(persisterFactory, path) assert.False(t, check.IfNil(db)) assert.Nil(t, err) _ = db.Close() @@ -107,8 +121,9 @@ func TestNewDB(t *testing.T) { func TestNewStorageUnitFromConf(t *testing.T) { t.Parallel() + path := path.Join(t.TempDir(), "TEST") dbConfig := storageunit.DBConfig{ - FilePath: path.Join(t.TempDir(), "TEST"), + FilePath: path, Type: "LvlDBSerial", BatchDelaySeconds: 5, MaxBatchSize: 10, @@ -123,7 +138,17 @@ func TestNewStorageUnitFromConf(t *testing.T) { Capacity: 100, } - unit, err := storageunit.NewStorageUnitFromConf(cacheConfig, dbConfig) + dbConf := config.DBConfig{ + Type: dbConfig.FilePath, + BatchDelaySeconds: dbConfig.BatchDelaySeconds, + MaxBatchSize: dbConfig.MaxBatchSize, + MaxOpenFiles: dbConfig.MaxOpenFiles, + } + dbConfigHandler := factory.NewDBConfigHandler(dbConf) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + assert.Nil(t, err) + + unit, err := storageunit.NewStorageUnitFromConf(cacheConfig, dbConfig, persisterFactory) assert.Nil(t, unit) assert.Equal(t, common.ErrNotSupportedCacheType, err) }) @@ -135,7 +160,17 @@ func TestNewStorageUnitFromConf(t *testing.T) { Capacity: 100, } - unit, err := storageunit.NewStorageUnitFromConf(cacheConfig, dbConfig) + dbConf := config.DBConfig{ + Type: string(dbConfig.Type), + BatchDelaySeconds: dbConfig.BatchDelaySeconds, + MaxBatchSize: dbConfig.MaxBatchSize, + MaxOpenFiles: dbConfig.MaxOpenFiles, + } + dbConfigHandler := factory.NewDBConfigHandler(dbConf) + persisterFactory, err := factory.NewPersisterFactory(dbConfigHandler) + assert.Nil(t, err) + + unit, err := storageunit.NewStorageUnitFromConf(cacheConfig, dbConfig, persisterFactory) assert.NotNil(t, unit) assert.Nil(t, err) _ = unit.Close() From 133040a056451a1debd7942d54cbb4e79dd6fcc8 Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 5 Dec 2023 12:46:57 +0200 Subject: [PATCH 3/5] refactor interface --- storage/factory/persisterCreator.go | 1 + storage/interface.go | 6 ++++++ storage/storageunit/storageunit.go | 8 ++------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/storage/factory/persisterCreator.go b/storage/factory/persisterCreator.go index 9c0a87bebf8..1357fc37ae4 100644 --- a/storage/factory/persisterCreator.go +++ b/storage/factory/persisterCreator.go @@ -31,6 +31,7 @@ func newPersisterCreator(config config.DBConfig) *persisterCreator { } // Create will create the persister for the provided path +// TODO: refactor to use max tries mechanism func (pc *persisterCreator) Create(path string) (storage.Persister, error) { if len(path) == 0 { return nil, storage.ErrInvalidFilePath diff --git a/storage/interface.go b/storage/interface.go index d5bdc49c081..9d9218e40db 100644 --- a/storage/interface.go +++ b/storage/interface.go @@ -207,3 +207,9 @@ type ManagedPeersHolder interface { IsMultiKeyMode() bool IsInterfaceNil() bool } + +// PersisterFactoryHandler defines the behaviour of a component which is able to create persisters +type PersisterFactoryHandler interface { + Create(path string) (Persister, error) + IsInterfaceNil() bool +} diff --git a/storage/storageunit/storageunit.go b/storage/storageunit/storageunit.go index eb4464ae8ca..4e1605efaa7 100644 --- a/storage/storageunit/storageunit.go +++ b/storage/storageunit/storageunit.go @@ -43,17 +43,13 @@ func NewCache(config CacheConfig) (storage.Cacher, error) { return storageUnit.NewCache(config) } -type PersisterFactoryHandler interface { - Create(path string) (storage.Persister, error) -} - // NewDB creates a new database from database config -func NewDB(persisterFactory PersisterFactoryHandler, path string) (storage.Persister, error) { +func NewDB(persisterFactory storage.PersisterFactoryHandler, path string) (storage.Persister, error) { return storageUnit.NewDB(persisterFactory, path) } // NewStorageUnitFromConf creates a new storage unit from a storage unit config -func NewStorageUnitFromConf(cacheConf CacheConfig, dbConf DBConfig, persisterFactory PersisterFactoryHandler) (*Unit, error) { +func NewStorageUnitFromConf(cacheConf CacheConfig, dbConf DBConfig, persisterFactory storage.PersisterFactoryHandler) (*Unit, error) { return storageUnit.NewStorageUnitFromConf(cacheConf, dbConf, persisterFactory) } From 437eb027129604708471b0f34278518d80214f03 Mon Sep 17 00:00:00 2001 From: ssd04 Date: Tue, 5 Dec 2023 13:07:57 +0200 Subject: [PATCH 4/5] fixes after review: added todo comment --- storage/factory/storageServiceFactory.go | 1 + 1 file changed, 1 insertion(+) diff --git a/storage/factory/storageServiceFactory.go b/storage/factory/storageServiceFactory.go index e3525dadc84..e368745289c 100644 --- a/storage/factory/storageServiceFactory.go +++ b/storage/factory/storageServiceFactory.go @@ -124,6 +124,7 @@ func checkArgs(args StorageServiceFactoryArgs) error { return nil } +// TODO: refactor this function, split it into multiple ones func (psf *StorageServiceFactory) createAndAddBaseStorageUnits( store dataRetriever.StorageService, customDatabaseRemover storage.CustomDatabaseRemoverHandler, From ab865566976d4d3e9ad7f24e99cb0c9f9c5293f9 Mon Sep 17 00:00:00 2001 From: ssd04 Date: Thu, 7 Dec 2023 14:52:13 +0200 Subject: [PATCH 5/5] proper release for storage --- go.mod | 2 +- go.sum | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/go.mod b/go.mod index 8b01509f2c8..d46cb92164a 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/multiversx/mx-chain-es-indexer-go v1.4.17 github.com/multiversx/mx-chain-logger-go v1.0.13 github.com/multiversx/mx-chain-scenario-go v1.2.1 - github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634 + github.com/multiversx/mx-chain-storage-go v1.0.14 github.com/multiversx/mx-chain-vm-common-go v1.5.8 github.com/multiversx/mx-chain-vm-go v1.5.21 github.com/multiversx/mx-chain-vm-v1_2-go v1.2.63 diff --git a/go.sum b/go.sum index bd1e1898c35..43c7fc3fe9a 100644 --- a/go.sum +++ b/go.sum @@ -396,8 +396,8 @@ github.com/multiversx/mx-chain-logger-go v1.0.13 h1:eru/TETo0MkO4ZTnXsQDKf4PBRpA github.com/multiversx/mx-chain-logger-go v1.0.13/go.mod h1:MZJhTAtZTJxT+yK2EHc4ZW3YOHUc1UdjCD0iahRNBZk= github.com/multiversx/mx-chain-scenario-go v1.2.1 h1:9eC6VcOEAKRRKZ7EbSWPLzCdNIMWwuNBtAZlgR4cSMA= github.com/multiversx/mx-chain-scenario-go v1.2.1/go.mod h1:EuZY7DpNFHVNSxJR8dKE1z2I8gBYfEFFPSwNUOXptqE= -github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634 h1:lLr58wutQRqoIBtHX3iGHxyZkoAxeQY2l7Eb3PlD1Hw= -github.com/multiversx/mx-chain-storage-go v1.0.14-0.20231205101200-0943b1e3e634/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= +github.com/multiversx/mx-chain-storage-go v1.0.14 h1:h0acoqPS3FKJ4S3cKBEriTU0OabSQnpxai5WKhi1YCs= +github.com/multiversx/mx-chain-storage-go v1.0.14/go.mod h1:sJ2q49tgjxNpMpsHysjABqCAB0FLBmDblbjBkQ8XfmA= github.com/multiversx/mx-chain-vm-common-go v1.5.8 h1:IRHB9/DasGrK5HU8TVeeLrEWt7tcb9zfnzHRLa6KES8= github.com/multiversx/mx-chain-vm-common-go v1.5.8/go.mod h1:sqkKMCnwkWl8DURdb9q7pctK8IANghdHY1KJLE0ox2c= github.com/multiversx/mx-chain-vm-go v1.5.21 h1:tA4fZ4ZwjsRcvMEyTgWStzxJFP/ypSmpwgLCEUl7NXw=