diff --git a/epochStart/bootstrap/bootStrapSovereignShardProcessor.go b/epochStart/bootstrap/bootStrapSovereignShardProcessor.go index eb3bbc61bed..40588da9536 100644 --- a/epochStart/bootstrap/bootStrapSovereignShardProcessor.go +++ b/epochStart/bootstrap/bootStrapSovereignShardProcessor.go @@ -15,6 +15,7 @@ import ( "github.com/multiversx/mx-chain-go/epochStart/bootstrap/disabled" bootStrapFactory "github.com/multiversx/mx-chain-go/epochStart/bootstrap/factory" "github.com/multiversx/mx-chain-go/process" + "github.com/multiversx/mx-chain-go/process/block/sovereign/incomingHeader" "github.com/multiversx/mx-chain-go/process/factory/interceptorscontainer" "github.com/multiversx/mx-chain-go/sharding/nodesCoordinator" "github.com/multiversx/mx-chain-go/storage/cache" @@ -158,8 +159,14 @@ func (sbp *sovereignBootStrapShardProcessor) baseSyncHeaders( meta data.MetaHeaderHandler, timeToWaitForRequestedData time.Duration, ) (map[string]data.HeaderHandler, error) { - hashesToRequest := make([][]byte, 0, 1) - shardIds := make([]uint32, 0, 1) + hashesToRequest := make([][]byte, 0, 2) + shardIds := make([]uint32, 0, 2) + + for _, epochStartData := range meta.GetEpochStartHandler().GetLastFinalizedHeaderHandlers() { + hashesToRequest = append(hashesToRequest, epochStartData.GetHeaderHash()) + shardIds = append(shardIds, epochStartData.GetShardID()) + } + if meta.GetEpoch() > sbp.startEpoch+1 { // no need to request genesis block hashesToRequest = append(hashesToRequest, meta.GetEpochStartHandler().GetEconomicsHandler().GetPrevEpochStartHash()) shardIds = append(shardIds, core.SovereignChainShardId) @@ -259,9 +266,19 @@ func (sbp *sovereignBootStrapShardProcessor) createEpochStartInterceptorsContain return nil, nil, err } + incomingHeaderProcessor, err := incomingHeader.CreateIncomingHeaderProcessor( + sbp.generalConfig.SovereignConfig.NotifierConfig.WebSocketConfig, + sbp.dataPool, + sbp.generalConfig.SovereignConfig.MainChainNotarization.MainChainNotarizationStartRound, + sbp.runTypeComponents, + ) + if err != nil { + return nil, nil, err + } + interceptorsContainerFactory, err := interceptorscontainer.NewSovereignShardInterceptorsContainerFactory(interceptorscontainer.ArgsSovereignShardInterceptorsContainerFactory{ ShardContainer: sp, - IncomingHeaderSubscriber: disabled.NewIncomingHeaderSubscriber(), + IncomingHeaderSubscriber: incomingHeaderProcessor, }) if err != nil { return nil, nil, err diff --git a/epochStart/bootstrap/bootStrapSovereignShardProcessor_test.go b/epochStart/bootstrap/bootStrapSovereignShardProcessor_test.go index 947724043e8..ff90d73b38c 100644 --- a/epochStart/bootstrap/bootStrapSovereignShardProcessor_test.go +++ b/epochStart/bootstrap/bootStrapSovereignShardProcessor_test.go @@ -123,6 +123,7 @@ func TestBootStrapSovereignShardProcessor_syncHeadersFrom(t *testing.T) { sovProc := createSovBootStrapProc() prevEpochStartHash := []byte("prevEpochStartHash") + lastCrossChainHeaderHash := []byte("lastCrossChainHeaderHash") sovHdr := &block.SovereignChainHeader{ Header: &block.Header{ Epoch: 4, @@ -131,6 +132,10 @@ func TestBootStrapSovereignShardProcessor_syncHeadersFrom(t *testing.T) { Economics: block.Economics{ PrevEpochStartHash: prevEpochStartHash, }, + LastFinalizedCrossChainHeader: block.EpochStartCrossChainData{ + ShardID: core.MainChainShardId, + HeaderHash: lastCrossChainHeaderHash, + }, }, } @@ -140,8 +145,8 @@ func TestBootStrapSovereignShardProcessor_syncHeadersFrom(t *testing.T) { headersSyncedCt := 0 sovProc.headersSyncer = &epochStartMocks.HeadersByHashSyncerStub{ SyncMissingHeadersByHashCalled: func(shardIDs []uint32, headersHashes [][]byte, ctx context.Context) error { - require.Equal(t, []uint32{core.SovereignChainShardId}, shardIDs) - require.Equal(t, [][]byte{prevEpochStartHash}, headersHashes) + require.Equal(t, []uint32{core.MainChainShardId, core.SovereignChainShardId}, shardIDs) + require.Equal(t, [][]byte{lastCrossChainHeaderHash, prevEpochStartHash}, headersHashes) headersSyncedCt++ return nil }, @@ -242,6 +247,8 @@ func TestBootStrapSovereignShardProcessor_createEpochStartInterceptorsContainers t.Parallel() sovProc := createSovBootStrapProc() + sovProc.dataPool = dataRetrieverMock.NewPoolsHolderMock() + args := factoryInterceptors.ArgsEpochStartInterceptorContainer{ CoreComponents: sovProc.coreComponentsHolder, CryptoComponents: sovProc.cryptoComponentsHolder, diff --git a/epochStart/bootstrap/disabled/incomingHeaderSubscriber.go b/epochStart/bootstrap/disabled/incomingHeaderSubscriber.go deleted file mode 100644 index d9b6a589460..00000000000 --- a/epochStart/bootstrap/disabled/incomingHeaderSubscriber.go +++ /dev/null @@ -1,30 +0,0 @@ -package disabled - -import ( - "github.com/multiversx/mx-chain-core-go/data" - "github.com/multiversx/mx-chain-core-go/data/block" - "github.com/multiversx/mx-chain-core-go/data/sovereign" -) - -type incomingHeaderSubscriber struct { -} - -// NewIncomingHeaderSubscriber creates a disabled incoming header subscriber -func NewIncomingHeaderSubscriber() *incomingHeaderSubscriber { - return &incomingHeaderSubscriber{} -} - -// AddHeader does nothing -func (ihs *incomingHeaderSubscriber) AddHeader(_ []byte, _ sovereign.IncomingHeaderHandler) error { - return nil -} - -// CreateExtendedHeader returns an empty shard extended header -func (ihs *incomingHeaderSubscriber) CreateExtendedHeader(_ sovereign.IncomingHeaderHandler) (data.ShardHeaderExtendedHandler, error) { - return &block.ShardHeaderExtended{}, nil -} - -// IsInterfaceNil checks if the underlying pointer is nil -func (ihs *incomingHeaderSubscriber) IsInterfaceNil() bool { - return ihs == nil -} diff --git a/epochStart/bootstrap/interface.go b/epochStart/bootstrap/interface.go index 14c5a042748..0e9f4ac3851 100644 --- a/epochStart/bootstrap/interface.go +++ b/epochStart/bootstrap/interface.go @@ -5,12 +5,14 @@ import ( "time" "github.com/multiversx/mx-chain-go/dataRetriever" + sovereignBlock "github.com/multiversx/mx-chain-go/dataRetriever/dataPool/sovereign" requesterscontainer "github.com/multiversx/mx-chain-go/dataRetriever/factory/requestersContainer" storageRequestFactory "github.com/multiversx/mx-chain-go/dataRetriever/factory/storageRequestersContainer/factory" "github.com/multiversx/mx-chain-go/dataRetriever/requestHandlers" "github.com/multiversx/mx-chain-go/epochStart" bootStrapFactory "github.com/multiversx/mx-chain-go/epochStart/bootstrap/factory" "github.com/multiversx/mx-chain-go/process" + "github.com/multiversx/mx-chain-go/process/block/sovereign" "github.com/multiversx/mx-chain-go/sharding" "github.com/multiversx/mx-chain-go/sharding/nodesCoordinator" syncerFactory "github.com/multiversx/mx-chain-go/state/syncer/factory" @@ -92,6 +94,9 @@ type RunTypeComponentsHolder interface { RequestersContainerFactoryCreator() requesterscontainer.RequesterContainerFactoryCreator ValidatorAccountsSyncerFactoryHandler() syncerFactory.ValidatorAccountsSyncerFactoryHandler ShardRequestersContainerCreatorHandler() storageRequestFactory.ShardRequestersContainerCreatorHandler + OutGoingOperationsPoolHandler() sovereignBlock.OutGoingOperationsPool + DataCodecHandler() sovereign.DataCodecHandler + TopicsCheckerHandler() sovereign.TopicsCheckerHandler IsInterfaceNil() bool } diff --git a/epochStart/bootstrap/shardSovereignStorageHandler.go b/epochStart/bootstrap/shardSovereignStorageHandler.go index 59869405ab7..4122a3104d2 100644 --- a/epochStart/bootstrap/shardSovereignStorageHandler.go +++ b/epochStart/bootstrap/shardSovereignStorageHandler.go @@ -1,12 +1,15 @@ package bootstrap import ( + "encoding/hex" + "errors" "fmt" "github.com/multiversx/mx-chain-core-go/core" "github.com/multiversx/mx-chain-core-go/data" "github.com/multiversx/mx-chain-core-go/data/block" "github.com/multiversx/mx-chain-go/dataRetriever" + "github.com/multiversx/mx-chain-go/epochStart" "github.com/multiversx/mx-chain-go/process" "github.com/multiversx/mx-chain-go/process/block/bootstrapStorage" ) @@ -50,9 +53,14 @@ func (ssh *sovereignShardStorageHandler) SaveDataToStorage(components *Component return err } + lastCrossNotarizedHeaders, err := ssh.saveLastCrossChainNotarizedHeaders(components.EpochStartMetaBlock, components.Headers) + if err != nil { + return err + } + bootStrapData := bootstrapStorage.BootstrapData{ LastHeader: lastHeader, - LastCrossNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{}, + LastCrossNotarizedHeaders: lastCrossNotarizedHeaders, LastSelfNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{lastHeader}, ProcessedMiniBlocks: []bootstrapStorage.MiniBlocksInMeta{}, PendingMiniBlocks: []bootstrapStorage.PendingMiniBlocksInfo{}, @@ -88,3 +96,77 @@ func (ssh *sovereignShardStorageHandler) saveTriggerRegistry(components *Compone return ssh.baseSaveTriggerRegistry(&triggerReg, sovHeader.GetRound()) } + +func (ssh *sovereignShardStorageHandler) saveLastCrossChainNotarizedHeaders( + sovBlock data.MetaHeaderHandler, + headers map[string]data.HeaderHandler, +) ([]bootstrapStorage.BootstrapHeaderInfo, error) { + log.Debug("sovereignShardStorageHandler.saveLastCrossChainNotarizedHeaders") + + lastCrossChainNotarizedData, err := getEpochStartShardData(sovBlock, core.MainChainShardId) + if errors.Is(err, epochStart.ErrEpochStartDataForShardNotFound) { + log.Debug("no cross chain header has been notarized yet") + return []bootstrapStorage.BootstrapHeaderInfo{}, nil + } else if err != nil { + return nil, err + } + + lastCrossChainHeaderHash := lastCrossChainNotarizedData.GetHeaderHash() + log.Debug("sovereignShardStorageHandler.saveLastCrossChainNotarizedHeaders", + "hash", lastCrossChainHeaderHash, + ) + + neededHdr, ok := headers[string(lastCrossChainHeaderHash)] + if !ok { + return nil, fmt.Errorf("%w in sovereignShardStorageHandler.saveLastCrossChainNotarizedHeaders: hash: %s", + epochStart.ErrMissingHeader, + hex.EncodeToString(lastCrossChainHeaderHash)) + } + + extendedShardHeader, ok := neededHdr.(data.ShardHeaderExtendedHandler) + if !ok { + return nil, fmt.Errorf("%w in sovereignShardStorageHandler.saveLastCrossChainNotarizedHeaders for extended shard header", + epochStart.ErrWrongTypeAssertion, + ) + } + + err = ssh.saveExtendedHeaderToStorage(extendedShardHeader, lastCrossChainHeaderHash) + if err != nil { + return nil, err + } + + crossNotarizedHeaders := make([]bootstrapStorage.BootstrapHeaderInfo, 0) + crossNotarizedHeaders = append(crossNotarizedHeaders, bootstrapStorage.BootstrapHeaderInfo{ + ShardId: core.MainChainShardId, + Nonce: lastCrossChainNotarizedData.GetNonce(), + Hash: lastCrossChainHeaderHash, + Epoch: lastCrossChainNotarizedData.GetEpoch(), + }) + + return crossNotarizedHeaders, nil +} + +func (bsh *sovereignShardStorageHandler) saveExtendedHeaderToStorage(extendedShardHeader data.HeaderHandler, headerHash []byte) error { + headerBytes, err := bsh.marshalizer.Marshal(extendedShardHeader) + if err != nil { + return err + } + + extendedHdrStorer, err := bsh.storageService.GetStorer(dataRetriever.ExtendedShardHeadersUnit) + if err != nil { + return err + } + + err = extendedHdrStorer.Put(headerHash, headerBytes) + if err != nil { + return err + } + + nonceToByteSlice := bsh.uint64Converter.ToByteSlice(extendedShardHeader.GetNonce()) + extendedHdrNonceStorage, err := bsh.storageService.GetStorer(dataRetriever.ExtendedShardHeadersNonceHashDataUnit) + if err != nil { + return err + } + + return extendedHdrNonceStorage.Put(nonceToByteSlice, headerHash) +} diff --git a/epochStart/bootstrap/shardSovereignStorageHandler_test.go b/epochStart/bootstrap/shardSovereignStorageHandler_test.go index baf2a8efea7..07335ef0126 100644 --- a/epochStart/bootstrap/shardSovereignStorageHandler_test.go +++ b/epochStart/bootstrap/shardSovereignStorageHandler_test.go @@ -13,6 +13,7 @@ import ( "github.com/multiversx/mx-chain-go/process/block/bootstrapStorage" "github.com/multiversx/mx-chain-go/sharding/nodesCoordinator" "github.com/multiversx/mx-chain-go/storage" + "github.com/multiversx/mx-chain-go/storage/factory" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" ) @@ -83,20 +84,20 @@ func TestSovereignShardStorageHandler_SaveDataToStorage(t *testing.T) { bootStrapData := getStoredBootstrapData(t, sovShardStorage.marshalizer, bootStorer, hdr1.GetRound()) require.Equal(t, &bootstrapStorage.BootstrapData{ LastHeader: bootstrapStorage.BootstrapHeaderInfo{ - Nonce: 1, - Epoch: 1, + Nonce: hdr1.GetNonce(), + Epoch: hdr1.GetEpoch(), Hash: hdrHash, }, LastCrossNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{}, LastSelfNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{{ - Nonce: 1, - Epoch: 1, + Nonce: hdr1.GetNonce(), + Epoch: hdr1.GetEpoch(), Hash: hdrHash, }}, ProcessedMiniBlocks: []bootstrapStorage.MiniBlocksInMeta{}, PendingMiniBlocks: []bootstrapStorage.PendingMiniBlocksInfo{}, NodesCoordinatorConfigKey: nil, - EpochStartTriggerConfigKey: []byte(fmt.Sprint(1)), + EpochStartTriggerConfigKey: []byte(fmt.Sprint(hdr1.GetEpoch())), HighestFinalBlockNonce: hdr1.GetNonce(), LastRound: 0, }, bootStrapData) @@ -125,3 +126,110 @@ func TestSovereignShardStorageHandler_SaveDataToStorage(t *testing.T) { _, err = metaStorer.Get([]byte("epochStartBlock_2")) require.NotNil(t, err) } + +func TestSovereignShardStorageHandler_SaveDataToStorageCheckLastCrossChainNotarizedDataIsSaved(t *testing.T) { + t.Parallel() + + args := createStorageHandlerArgs() + args.AdditionalStorageServiceCreator = factory.NewSovereignAdditionalStorageServiceFactory() + shardStorage, _ := NewShardStorageHandler(args) + sovShardStorage := newSovereignShardStorageHandler(shardStorage) + + hash1 := []byte("hash1") + lastFinalizedCrossChainHeaderHash := []byte("lastFinalizedCrossChainHeaderHash") + lastFinalizedCrossChainHeader := &block.ShardHeaderExtended{ + Header: &block.HeaderV2{ + Header: &block.Header{ + Epoch: 1, + Round: 4, + Nonce: 4, + }, + }, + } + sovHdr := &block.SovereignChainHeader{ + Header: &block.Header{ + Nonce: 2, + Round: 2, + Epoch: 2, + }, + EpochStart: block.EpochStartSovereign{ + LastFinalizedCrossChainHeader: block.EpochStartCrossChainData{ + ShardID: core.MainChainShardId, + Epoch: 1, + Round: 4, + Nonce: 4, + HeaderHash: lastFinalizedCrossChainHeaderHash, + }, + }, + } + headers := map[string]data.HeaderHandler{ + string(hash1): sovHdr, + string(lastFinalizedCrossChainHeaderHash): lastFinalizedCrossChainHeader, + } + + components := &ComponentsNeededForBootstrap{ + EpochStartMetaBlock: sovHdr, + PreviousEpochStart: sovHdr, + ShardHeader: sovHdr, + Headers: headers, + NodesConfig: &nodesCoordinator.NodesCoordinatorRegistry{}, + } + + err := sovShardStorage.SaveDataToStorage(components, components.ShardHeader, false, nil) + require.Nil(t, err) + + bootStorer, err := sovShardStorage.storageService.GetStorer(dataRetriever.BootstrapUnit) + require.Nil(t, err) + + hdrHash, err := core.CalculateHash(sovShardStorage.marshalizer, sovShardStorage.hasher, sovHdr) + require.Nil(t, err) + + bootStrapData := getStoredBootstrapData(t, sovShardStorage.marshalizer, bootStorer, sovHdr.GetRound()) + require.Equal(t, &bootstrapStorage.BootstrapData{ + LastHeader: bootstrapStorage.BootstrapHeaderInfo{ + Nonce: sovHdr.GetNonce(), + Epoch: sovHdr.GetEpoch(), + Hash: hdrHash, + }, + LastCrossNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{ + { + ShardId: core.MainChainShardId, + Epoch: lastFinalizedCrossChainHeader.GetEpoch(), + Nonce: lastFinalizedCrossChainHeader.GetNonce(), + Hash: lastFinalizedCrossChainHeaderHash, + }, + }, + LastSelfNotarizedHeaders: []bootstrapStorage.BootstrapHeaderInfo{ + { + Nonce: sovHdr.GetNonce(), + Epoch: sovHdr.GetEpoch(), + Hash: hdrHash, + }, + }, + ProcessedMiniBlocks: []bootstrapStorage.MiniBlocksInMeta{}, + PendingMiniBlocks: []bootstrapStorage.PendingMiniBlocksInfo{}, + NodesCoordinatorConfigKey: nil, + EpochStartTriggerConfigKey: []byte(fmt.Sprint(sovHdr.GetEpoch())), + HighestFinalBlockNonce: sovHdr.GetNonce(), + LastRound: 0, + }, bootStrapData) + + extendedHdrStorer, err := sovShardStorage.storageService.GetStorer(dataRetriever.ExtendedShardHeadersUnit) + require.Nil(t, err) + + extendedHdrBytes, err := extendedHdrStorer.Get(lastFinalizedCrossChainHeaderHash) + require.Nil(t, err) + + extendedHdrStored := &block.ShardHeaderExtended{} + err = sovShardStorage.marshalizer.Unmarshal(extendedHdrStored, extendedHdrBytes) + require.Nil(t, err) + require.Equal(t, lastFinalizedCrossChainHeader, extendedHdrStored) + + extendedHdrNonceStorer, err := sovShardStorage.storageService.GetStorer(dataRetriever.ExtendedShardHeadersNonceHashDataUnit) + require.Nil(t, err) + + nonceToBytesKey := sovShardStorage.uint64Converter.ToByteSlice(lastFinalizedCrossChainHeader.GetNonce()) + extendedHdrNonceBytesHash, err := extendedHdrNonceStorer.Get(nonceToBytesKey) + require.Nil(t, err) + require.Equal(t, lastFinalizedCrossChainHeaderHash, extendedHdrNonceBytesHash) +} diff --git a/epochStart/bootstrap/storageProcess_test.go b/epochStart/bootstrap/storageProcess_test.go index 49f47214ebc..de553cf2e7e 100644 --- a/epochStart/bootstrap/storageProcess_test.go +++ b/epochStart/bootstrap/storageProcess_test.go @@ -320,15 +320,15 @@ func testRequestAndProcessFromStorageByShardId(t *testing.T, shardId uint32) { func TestStorageEpochStartBootstrap_syncHeadersFromStorage(t *testing.T) { t.Parallel() - coreComp, cryptoComp := createComponentsForEpochStart() - args := createMockStorageEpochStartBootstrapArgs(coreComp, cryptoComp) - - hdrHash1 := []byte("hdrHash1") - hdrHash2 := []byte("hdrHash2") - t.Run("fail to sync missing headers", func(t *testing.T) { t.Parallel() + coreComp, cryptoComp := createComponentsForEpochStart() + args := createMockStorageEpochStartBootstrapArgs(coreComp, cryptoComp) + + hdrHash1 := []byte("hdrHash1") + hdrHash2 := []byte("hdrHash2") + metaBlock := &block.MetaBlock{ Epoch: 2, EpochStart: block.EpochStart{ @@ -362,6 +362,12 @@ func TestStorageEpochStartBootstrap_syncHeadersFromStorage(t *testing.T) { t.Run("fail to get synced headers", func(t *testing.T) { t.Parallel() + coreComp, cryptoComp := createComponentsForEpochStart() + args := createMockStorageEpochStartBootstrapArgs(coreComp, cryptoComp) + + hdrHash1 := []byte("hdrHash1") + hdrHash2 := []byte("hdrHash2") + metaBlock := &block.MetaBlock{ Epoch: 2, EpochStart: block.EpochStart{ @@ -395,6 +401,12 @@ func TestStorageEpochStartBootstrap_syncHeadersFromStorage(t *testing.T) { t.Run("empty prev meta block when first epoch", func(t *testing.T) { t.Parallel() + coreComp, cryptoComp := createComponentsForEpochStart() + args := createMockStorageEpochStartBootstrapArgs(coreComp, cryptoComp) + + hdrHash1 := []byte("hdrHash1") + hdrHash2 := []byte("hdrHash2") + metaBlock := &block.MetaBlock{ Epoch: 1, EpochStart: block.EpochStart{ @@ -445,6 +457,12 @@ func TestStorageEpochStartBootstrap_syncHeadersFromStorage(t *testing.T) { t.Run("should work", func(t *testing.T) { t.Parallel() + coreComp, cryptoComp := createComponentsForEpochStart() + args := createMockStorageEpochStartBootstrapArgs(coreComp, cryptoComp) + + hdrHash1 := []byte("hdrHash1") + hdrHash2 := []byte("hdrHash2") + metaBlock := &block.MetaBlock{ Epoch: 2, EpochStart: block.EpochStart{ diff --git a/process/block/sovereign/incomingHeader/incomingHeaderHandlerFactory_test.go b/process/block/sovereign/incomingHeader/incomingHeaderHandlerFactory_test.go index 166cdedf022..982dd9fc51e 100644 --- a/process/block/sovereign/incomingHeader/incomingHeaderHandlerFactory_test.go +++ b/process/block/sovereign/incomingHeader/incomingHeaderHandlerFactory_test.go @@ -6,8 +6,8 @@ import ( "github.com/multiversx/mx-chain-go/config" retriever "github.com/multiversx/mx-chain-go/dataRetriever" errorsMx "github.com/multiversx/mx-chain-go/errors" + "github.com/multiversx/mx-chain-go/process/mock" "github.com/multiversx/mx-chain-go/testscommon/dataRetriever" - "github.com/multiversx/mx-chain-go/testscommon/mainFactoryMocks" "github.com/multiversx/mx-chain-go/testscommon/pool" "github.com/stretchr/testify/require" ) @@ -22,7 +22,7 @@ func createWSCfg() config.WebSocketConfig { func TestCreateIncomingHeaderProcessor(t *testing.T) { t.Parallel() - runTypeComps := mainFactoryMocks.NewRunTypeComponentsStub() + runTypeComps := mock.NewRunTypeComponentsStub() headersPool := &dataRetriever.PoolsHolderStub{ HeadersCalled: func() retriever.HeadersPool { return &pool.HeadersPoolStub{} diff --git a/testscommon/generalConfig.go b/testscommon/generalConfig.go index 576b61714da..c4ecd329fc5 100644 --- a/testscommon/generalConfig.go +++ b/testscommon/generalConfig.go @@ -440,6 +440,10 @@ func GetGeneralConfig() config.Config { Addresses: []string{"erd1qyu5wthldzr8wx5c9ucg8kjagg0jfs53s8nr3zpz3hypefsdd8ssycr6th"}, }, }, + WebSocketConfig: config.WebSocketConfig{ + HasherType: "keccak", + MarshallerType: "json", + }, }, OutgoingSubscribedEvents: config.OutgoingSubscribedEvents{ SubscribedEvents: []config.SubscribedEvent{