public ReadOnlyChainProcessingEnv(
            ReadOnlyTxProcessingEnv txEnv,
            IBlockValidator blockValidator,
            IBlockPreprocessorStep recoveryStep,
            IRewardCalculator rewardCalculator,
            IReceiptStorage receiptStorage,
            IReadOnlyDbProvider dbProvider,
            ISpecProvider specProvider,
            ILogManager logManager)
        {
            _txEnv = txEnv;

            BlockProcessor = new BlockProcessor(
                specProvider,
                blockValidator,
                rewardCalculator,
                _txEnv.TransactionProcessor,
                StateProvider,
                _txEnv.StorageProvider,
                NullTxPool.Instance,
                receiptStorage,
                NullWitnessCollector.Instance,
                logManager);

            _blockProcessingQueue = new BlockchainProcessor(_txEnv.BlockTree, BlockProcessor, recoveryStep, logManager, BlockchainProcessor.Options.NoReceipts);
            BlockProcessingQueue  = _blockProcessingQueue;
            ChainProcessor        = new OneTimeChainProcessor(dbProvider, _blockProcessingQueue);
        }
Beispiel #2
0
 public DevBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     IStateProvider stateProvider,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     ITxPool txPool,
     ITimestamper timestamper,
     ISpecProvider specProvider,
     IMiningConfig miningConfig,
     ILogManager logManager)
     : base(
         txSource,
         processor,
         new NethDevSealEngine(),
         blockTree,
         blockProcessingQueue,
         stateProvider,
         FollowOtherMiners.Instance,
         timestamper,
         specProvider,
         logManager)
 {
     _txPool          = txPool ?? throw new ArgumentNullException(nameof(txPool));
     _miningConfig    = miningConfig ?? throw new ArgumentNullException(nameof(miningConfig));
     _timer           = new Timer(_timeout.TotalMilliseconds);
     _timer.Elapsed  += TimerOnElapsed;
     _timer.AutoReset = false;
 }
Beispiel #3
0
 public TestAuraProducer(ITxSource transactionSource,
                         IBlockchainProcessor processor,
                         IStateProvider stateProvider,
                         ISealer sealer,
                         IBlockTree blockTree,
                         IBlockProcessingQueue blockProcessingQueue,
                         ITimestamper timestamper,
                         ILogManager logManager,
                         IAuRaStepCalculator auRaStepCalculator,
                         IReportingValidator reportingValidator,
                         IAuraConfig config,
                         ISpecProvider specProvider)
     : base(
         transactionSource,
         processor,
         stateProvider,
         sealer,
         blockTree,
         blockProcessingQueue,
         timestamper,
         auRaStepCalculator,
         reportingValidator,
         config,
         FollowOtherMiners.Instance,
         specProvider,
         logManager)
 {
 }
Beispiel #4
0
 public ForkchoiceUpdatedV1Handler(
     IBlockTree blockTree,
     IManualBlockFinalizationManager manualBlockFinalizationManager,
     IPoSSwitcher poSSwitcher,
     IPayloadPreparationService payloadPreparationService,
     IBlockProcessingQueue processingQueue,
     IBlockCacheService blockCacheService,
     IInvalidChainTracker invalidChainTracker,
     IMergeSyncController mergeSyncController,
     IBeaconPivot beaconPivot,
     IPeerRefresher peerRefresher,
     ILogManager logManager)
 {
     _blockTree = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
     _manualBlockFinalizationManager = manualBlockFinalizationManager ?? throw new ArgumentNullException(nameof(manualBlockFinalizationManager));
     _poSSwitcher = poSSwitcher ?? throw new ArgumentNullException(nameof(poSSwitcher));
     _payloadPreparationService = payloadPreparationService;
     _processingQueue           = processingQueue;
     _blockCacheService         = blockCacheService;
     _invalidChainTracker       = invalidChainTracker;
     _mergeSyncController       = mergeSyncController;
     _beaconPivot   = beaconPivot;
     _peerRefresher = peerRefresher;
     _logger        = logManager.GetClassLogger();
 }
        public BeamBlockchainProcessor(
            IReadOnlyDbProvider readOnlyDbProvider,
            IBlockTree blockTree,
            ISpecProvider specProvider,
            ILogManager logManager,
            IBlockValidator blockValidator,
            IBlockPreprocessorStep recoveryStep,
            IRewardCalculatorSource rewardCalculatorSource,
            IBlockProcessingQueue processingQueue,
            ISyncModeSelector syncModeSelector)
        {
            _readOnlyDbProvider              = readOnlyDbProvider ?? throw new ArgumentNullException(nameof(readOnlyDbProvider));
            _blockValidator                  = blockValidator ?? throw new ArgumentNullException(nameof(blockValidator));
            _recoveryStep                    = recoveryStep ?? throw new ArgumentNullException(nameof(recoveryStep));
            _rewardCalculatorSource          = rewardCalculatorSource ?? throw new ArgumentNullException(nameof(rewardCalculatorSource));
            _standardProcessorQueue          = processingQueue ?? throw new ArgumentNullException(nameof(processingQueue));
            _syncModeSelector                = syncModeSelector ?? throw new ArgumentNullException(nameof(syncModeSelector));
            _specProvider                    = specProvider ?? throw new ArgumentNullException(nameof(specProvider));
            _logManager                      = logManager ?? throw new ArgumentNullException(nameof(logManager));
            _readOnlyBlockTree               = new ReadOnlyBlockTree(blockTree);
            blockTree.NewBestSuggestedBlock += OnNewBlock;
            _logger      = logManager.GetClassLogger();
            _blockAction = BeamProcess;

            _syncModeSelector.Preparing += SyncModeSelectorOnPreparing;
            _syncModeSelector.Changing  += SyncModeSelectorOnChanging;
            _syncModeSelector.Changed   += SyncModeSelectorOnChanged;
        }
 protected LoopBlockProducerBase(
     ITxSource txSource,
     IBlockchainProcessor processor,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     ITimestamper timestamper,
     IGasLimitCalculator gasLimitCalculator,
     ISpecProvider specProvider,
     ILogManager logManager,
     string name)
     : base(
         txSource,
         processor,
         sealer,
         blockTree,
         blockProcessingQueue,
         stateProvider,
         gasLimitCalculator,
         timestamper,
         specProvider,
         logManager)
 {
     _name = name;
 }
Beispiel #7
0
 public MinedBlockProducer(ITxSource txSource,
                           IBlockchainProcessor processor,
                           ISealer sealer,
                           IBlockTree blockTree,
                           IBlockProcessingQueue blockProcessingQueue,
                           IStateProvider stateProvider,
                           IGasLimitCalculator gasLimitCalculator,
                           ITimestamper timestamper,
                           ISpecProvider specProvider,
                           ILogManager logManager,
                           IDifficultyCalculator difficultyCalculator)
     : base(
         txSource,
         processor,
         sealer,
         blockTree,
         blockProcessingQueue,
         stateProvider,
         gasLimitCalculator,
         timestamper,
         specProvider,
         logManager)
 {
     _difficultyCalculator = difficultyCalculator ?? throw new ArgumentNullException(nameof(difficultyCalculator));
 }
Beispiel #8
0
        public void SetUp()
        {
            _stepDelay = TimeSpan.FromMilliseconds(20);

            _pendingTxSelector   = Substitute.For <IPendingTxSelector>();
            _blockchainProcessor = Substitute.For <IBlockchainProcessor>();
            _sealer               = Substitute.For <ISealer>();
            _blockTree            = Substitute.For <IBlockTree>();
            _blockProcessingQueue = Substitute.For <IBlockProcessingQueue>();
            _stateProvider        = Substitute.For <IStateProvider>();
            _timestamper          = Substitute.For <ITimestamper>();
            _auRaStepCalculator   = Substitute.For <IAuRaStepCalculator>();
            _auraConfig           = Substitute.For <IAuraConfig>();
            _nodeAddress          = TestItem.AddressA;
            _auRaBlockProducer    = new AuRaBlockProducer(
                _pendingTxSelector,
                _blockchainProcessor,
                _stateProvider,
                _sealer,
                _blockTree,
                _blockProcessingQueue,
                _timestamper,
                LimboLogs.Instance, _auRaStepCalculator, _auraConfig, _nodeAddress);

            _auraConfig.ForceSealing.Returns(true);
            _pendingTxSelector.SelectTransactions(Arg.Any <long>()).Returns(Array.Empty <Transaction>());
            _sealer.CanSeal(Arg.Any <long>(), Arg.Any <Keccak>()).Returns(true);
            _sealer.SealBlock(Arg.Any <Block>(), Arg.Any <CancellationToken>()).Returns(c => Task.FromResult(c.Arg <Block>()));
            _blockProcessingQueue.IsEmpty.Returns(true);
            _auRaStepCalculator.TimeToNextStep.Returns(_stepDelay);
            _blockTree.BestKnownNumber.Returns(1);
            _blockTree.Head.Returns(Build.A.BlockHeader.WithAura(10, Bytes.Empty).TestObject);
            _blockchainProcessor.Process(Arg.Any <Block>(), ProcessingOptions.ProducingBlock, Arg.Any <IBlockTracer>()).Returns(c => c.Arg <Block>());
        }
Beispiel #9
0
 public AuRaBlockProducer(ITxSource txSource,
                          IBlockchainProcessor processor,
                          IStateProvider stateProvider,
                          ISealer sealer,
                          IBlockTree blockTree,
                          IBlockProcessingQueue blockProcessingQueue,
                          ITimestamper timestamper,
                          IAuRaStepCalculator auRaStepCalculator,
                          IReportingValidator reportingValidator,
                          IAuraConfig config,
                          IGasLimitCalculator gasLimitCalculator,
                          ISpecProvider specProvider,
                          ILogManager logManager)
     : base(
         new ValidatedTxSource(txSource, logManager),
         processor,
         sealer,
         blockTree,
         blockProcessingQueue,
         stateProvider,
         timestamper,
         gasLimitCalculator,
         specProvider,
         logManager,
         "AuRa")
 {
     _auRaStepCalculator = auRaStepCalculator ?? throw new ArgumentNullException(nameof(auRaStepCalculator));
     _reportingValidator = reportingValidator ?? throw new ArgumentNullException(nameof(reportingValidator));
     _config             = config ?? throw new ArgumentNullException(nameof(config));
     _canProduce         = _config.AllowAuRaPrivateChains ? 1 : 0;
 }
Beispiel #10
0
        public void SetUp()
        {
            _blockchainProcessingQueue = Substitute.For <IBlockProcessingQueue>();
            _blockchainProcessor       = Substitute.For <IBlockchainProcessor>();
            _blockTree = Build.A.BlockTree().OfChainLength(10).TestObject;
            HeaderValidator headerValidator = new HeaderValidator(_blockTree, NullSealEngine.Instance, MainnetSpecProvider.Instance, LimboLogs.Instance);

            _validator = new BlockValidator(Always.Valid, headerValidator, Always.Valid, MainnetSpecProvider.Instance, LimboLogs.Instance);
        }
 public DevBackgroundBlockProducer(
     IPendingTxSelector pendingTxSelector,
     IBlockchainProcessor processor,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     ITimestamper timestamper,
     ILogManager logManager) : base(pendingTxSelector, processor, NullSealEngine.Instance, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager, "Dev")
 {
 }
 public Eth2TestBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     IGasLimitCalculator gasLimitCalculator,
     ISigner signer, ILogManager logManager)
     : base(txSource, processor, blockTree, blockProcessingQueue, stateProvider, gasLimitCalculator, signer, logManager)
 {
 }
Beispiel #13
0
 public DevBlockProducer(IPendingTxSelector pendingTxSelector,
                         IBlockchainProcessor processor,
                         IStateProvider stateProvider,
                         IBlockTree blockTree,
                         IBlockProcessingQueue blockProcessingQueue,
                         ITxPool txPool,
                         ITimestamper timestamper,
                         ILogManager logManager)
     : base(pendingTxSelector, processor, NethDevSealEngine.Instance, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager)
 {
     _txPool = txPool ?? throw new ArgumentNullException(nameof(txPool));
 }
Beispiel #14
0
 public MinedBlockProducer(
     IPendingTxSelector pendingTxSelector,
     IBlockchainProcessor processor,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     ITimestamper timestamper,
     ILogManager logManager,
     IDifficultyCalculator difficultyCalculator)
     : base(pendingTxSelector, processor, sealer, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager)
 {
     _difficultyCalculator = difficultyCalculator ?? throw new ArgumentNullException(nameof(difficultyCalculator));
 }
 protected BaseLoopBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     ITimestamper timestamper,
     ILogManager logManager,
     string name)
     : base(txSource, processor, sealer, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager)
 {
     _name = name;
 }
Beispiel #16
0
        public HiveRunner(
            IBlockTree blockTree,
            IBlockProcessingQueue blockProcessingQueue,
            IConfigProvider configurationProvider,
            ILogger logger,
            IFileSystem fileSystem,
            IBlockValidator blockValidator)
        {
            _logger                = logger ?? throw new ArgumentNullException(nameof(logger));
            _blockTree             = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
            _blockProcessingQueue  = blockProcessingQueue ?? throw new ArgumentNullException(nameof(blockProcessingQueue));
            _configurationProvider = configurationProvider ?? throw new ArgumentNullException(nameof(configurationProvider));
            _fileSystem            = fileSystem ?? throw new ArgumentNullException(nameof(fileSystem));
            _blockValidator        = blockValidator;

            _resetEvent = new SemaphoreSlim(0);
        }
 public AuRaBlockProducer(IPendingTxSelector pendingTxSelector,
                          IBlockchainProcessor processor,
                          IStateProvider stateProvider,
                          ISealer sealer,
                          IBlockTree blockTree,
                          IBlockProcessingQueue blockProcessingQueue,
                          ITimestamper timestamper,
                          ILogManager logManager,
                          IAuRaStepCalculator auRaStepCalculator,
                          IAuraConfig config,
                          Address nodeAddress)
     : base(pendingTxSelector, processor, sealer, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager, "AuRa")
 {
     _auRaStepCalculator = auRaStepCalculator ?? throw new ArgumentNullException(nameof(auRaStepCalculator));
     _config             = config ?? throw new ArgumentNullException(nameof(config));
     _nodeAddress        = nodeAddress ?? throw new ArgumentNullException(nameof(nodeAddress));
 }
Beispiel #18
0
        public BuildBlocksOnlyWhenNotProcessing(
            IBlockProductionTrigger blockProductionTrigger,
            IBlockProcessingQueue blockProcessingQueue,
            IBlockTree blockTree,
            ILogManager logManager,
            bool waitForInitialSync = true)
        {
            _blockProductionTrigger = blockProductionTrigger;
            _blockProcessingQueue   = blockProcessingQueue;
            _blockTree  = blockTree;
            _canProduce = waitForInitialSync ? 0 : 1;
            _logger     = logManager.GetClassLogger();

            _blockTree.NewBestSuggestedBlock               += BlockTreeOnNewBestSuggestedBlock;
            _blockProcessingQueue.ProcessingQueueEmpty     += OnBlockProcessorQueueEmpty;
            _blockProductionTrigger.TriggerBlockProduction += OnTriggerBlockProduction;
        }
Beispiel #19
0
 protected BaseBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     IStateProvider stateProvider,
     ITimestamper timestamper,
     ILogManager logManager)
 {
     _txSource            = txSource ?? throw new ArgumentNullException(nameof(txSource));
     Processor            = processor ?? throw new ArgumentNullException(nameof(processor));
     _sealer              = sealer ?? throw new ArgumentNullException(nameof(sealer));
     BlockTree            = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
     BlockProcessingQueue = blockProcessingQueue ?? throw new ArgumentNullException(nameof(blockProcessingQueue));
     _stateProvider       = stateProvider ?? throw new ArgumentNullException(nameof(stateProvider));
     _timestamper         = timestamper ?? throw new ArgumentNullException(nameof(timestamper));
     Logger = logManager?.GetClassLogger() ?? throw new ArgumentNullException(nameof(logManager));
 }
 public AuRaBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     IStateProvider stateProvider,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     ITimestamper timestamper,
     ILogManager logManager,
     IAuRaStepCalculator auRaStepCalculator,
     IAuraConfig config,
     Address nodeAddress,
     IGasLimitOverride gasLimitOverride = null)
     : base(txSource, processor, sealer, blockTree, blockProcessingQueue, stateProvider, timestamper, logManager, "AuRa")
 {
     _auRaStepCalculator = auRaStepCalculator ?? throw new ArgumentNullException(nameof(auRaStepCalculator));
     _config             = config ?? throw new ArgumentNullException(nameof(config));
     CanProduce          = _config.AllowAuRaPrivateChains;
     _nodeAddress        = nodeAddress ?? throw new ArgumentNullException(nameof(nodeAddress));
     _gasLimitOverride   = gasLimitOverride;
 }
Beispiel #21
0
        public override Eth2BlockProducer Create(
            IBlockTree blockTree,
            IDbProvider dbProvider,
            IReadOnlyTrieStore readOnlyTrieStore,
            IBlockPreprocessorStep blockPreprocessor,
            ITxPool txPool,
            IBlockValidator blockValidator,
            IRewardCalculatorSource rewardCalculatorSource,
            IReceiptStorage receiptStorage,
            IBlockProcessingQueue blockProcessingQueue,
            ISpecProvider specProvider,
            ISigner engineSigner,
            IMiningConfig miningConfig,
            ILogManager logManager)
        {
            BlockProducerContext producerContext = GetProducerChain(
                blockTree,
                dbProvider,
                readOnlyTrieStore,
                blockPreprocessor,
                txPool,
                blockValidator,
                rewardCalculatorSource,
                receiptStorage,
                specProvider,
                miningConfig,
                logManager);

            return(new Eth2TestBlockProducer(
                       producerContext.TxSource,
                       producerContext.ChainProcessor,
                       blockTree,
                       blockProcessingQueue,
                       producerContext.ReadOnlyStateProvider,
                       new TargetAdjustedGasLimitCalculator(specProvider, miningConfig),
                       engineSigner,
                       specProvider,
                       logManager));
        }
Beispiel #22
0
        public async Task AuraTestBlockProducer_IsProducingBlocks_returns_expected_results()
        {
            IBlockProcessingQueue blockProcessingQueue = Substitute.For <IBlockProcessingQueue>();

            blockProcessingQueue.IsEmpty.Returns(true);
            AuRaBlockProducer blockProducer = new AuRaBlockProducer(
                Substitute.For <ITxSource>(),
                Substitute.For <IBlockchainProcessor>(),
                Substitute.For <IStateProvider>(),
                Substitute.For <ISealer>(),
                Substitute.For <IBlockTree>(),
                Substitute.For <IBlockProcessingQueue>(),
                Substitute.For <ITimestamper>(),
                Substitute.For <IAuRaStepCalculator>(),
                Substitute.For <IReportingValidator>(),
                new AuRaConfig(),
                Substitute.For <IGasLimitCalculator>(),
                Substitute.For <ISpecProvider>(),
                LimboLogs.Instance);

            await AssertIsProducingBlocks(blockProducer);
        }
 public TestBlockProducer(
     ITxSource transactionSource,
     IBlockchainProcessor processor,
     IStateProvider stateProvider,
     ISealer sealer,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     ITimestamper timestamper,
     ILogManager logManager)
     : base(
         transactionSource,
         processor,
         sealer,
         blockTree,
         blockProcessingQueue,
         stateProvider,
         timestamper,
         FollowOtherMiners.Instance,
         logManager,
         "test producer")
 {
 }
 public BeamBlockchainProcessor(
     IReadOnlyDbProvider readOnlyDbProvider,
     IBlockTree blockTree,
     ISpecProvider specProvider,
     ILogManager logManager,
     IBlockValidator blockValidator,
     IBlockDataRecoveryStep recoveryStep,
     IRewardCalculatorSource rewardCalculatorSource,
     IBlockProcessingQueue blockchainProcessor)
 {
     _readOnlyDbProvider     = readOnlyDbProvider ?? throw new ArgumentNullException(nameof(readOnlyDbProvider));
     _blockValidator         = blockValidator ?? throw new ArgumentNullException(nameof(blockValidator));
     _recoveryStep           = recoveryStep ?? throw new ArgumentNullException(nameof(recoveryStep));
     _rewardCalculatorSource = rewardCalculatorSource ?? throw new ArgumentNullException(nameof(rewardCalculatorSource));
     _blockchainProcessor    = blockchainProcessor ?? throw new ArgumentNullException(nameof(blockchainProcessor));
     _blockTree         = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
     _specProvider      = specProvider ?? throw new ArgumentNullException(nameof(specProvider));
     _logManager        = logManager ?? throw new ArgumentNullException(nameof(logManager));
     _readOnlyBlockTree = new ReadOnlyBlockTree(_blockTree);
     _logger            = logManager.GetClassLogger();
     _blockTree.NewBestSuggestedBlock += OnNewBlock;
     _blockTree.NewHeadBlock          += BlockTreeOnNewHeadBlock;
 }
Beispiel #25
0
 public DevBlockProducer(
     ITxSource txSource,
     IBlockchainProcessor processor,
     IStateProvider stateProvider,
     IBlockTree blockTree,
     IBlockProcessingQueue blockProcessingQueue,
     ITxPool txPool,
     ITimestamper timestamper,
     ILogManager logManager)
     : base(
         txSource,
         processor,
         new NethDevSealEngine(),
         blockTree,
         blockProcessingQueue,
         stateProvider,
         FollowOtherMiners.Instance,
         timestamper,
         logManager)
 {
     _txPool         = txPool ?? throw new ArgumentNullException(nameof(txPool));
     _timer          = new System.Timers.Timer(200);
     _timer.Elapsed += TimerOnElapsed;
 }
Beispiel #26
0
        public DebugBridge(IConfigProvider configProvider, IReadOnlyDbProvider dbProvider, IGethStyleTracer tracer, IBlockProcessingQueue receiptsBlockQueue, IBlockTree blockTree)
        {
            receiptsBlockQueue.ProcessingQueueEmpty += (sender, args) => _receiptProcessedEvent.Set();
            _configProvider = configProvider ?? throw new ArgumentNullException(nameof(configProvider));
            _tracer         = tracer ?? throw new ArgumentNullException(nameof(tracer));
            _blockTree      = blockTree ?? throw new ArgumentNullException(nameof(blockTree));
            dbProvider      = dbProvider ?? throw new ArgumentNullException(nameof(dbProvider));
            IDb blockInfosDb = dbProvider.BlockInfosDb ?? throw new ArgumentNullException(nameof(dbProvider.BlockInfosDb));
            IDb blocksDb     = dbProvider.BlocksDb ?? throw new ArgumentNullException(nameof(dbProvider.BlocksDb));
            IDb headersDb    = dbProvider.HeadersDb ?? throw new ArgumentNullException(nameof(dbProvider.HeadersDb));
            IDb receiptsDb   = dbProvider.ReceiptsDb ?? throw new ArgumentNullException(nameof(dbProvider.ReceiptsDb));
            IDb codeDb       = dbProvider.CodeDb ?? throw new ArgumentNullException(nameof(dbProvider.CodeDb));
            IDb pendingTxsDb = dbProvider.PendingTxsDb ?? throw new ArgumentNullException(nameof(dbProvider.PendingTxsDb));

            _dbMappings = new Dictionary <string, IDb>(StringComparer.InvariantCultureIgnoreCase)
            {
                { DbNames.State, dbProvider.StateDb },
                { DbNames.Storage, dbProvider.StateDb },
                { DbNames.BlockInfos, blockInfosDb },
                { DbNames.Blocks, blocksDb },
                { DbNames.Headers, headersDb },
                { DbNames.Code, codeDb },
                { DbNames.Receipts, receiptsDb },
                { DbNames.PendingTxs, pendingTxsDb },
            };
        }
 public ProducerUnderTest(ITxSource txSource, IBlockchainProcessor processor, ISealer sealer, IBlockTree blockTree, IBlockProcessingQueue blockProcessingQueue, IStateProvider stateProvider, IGasLimitCalculator gasLimitCalculator, ITimestamper timestamper, ILogManager logManager)
     : base(txSource, processor, sealer, blockTree, blockProcessingQueue, stateProvider, gasLimitCalculator, timestamper, logManager)
 {
 }
 public TestAuraProducer(ITxSource transactionSource, IBlockchainProcessor processor, IStateProvider stateProvider, ISealer sealer, IBlockTree blockTree, IBlockProcessingQueue blockProcessingQueue, ITimestamper timestamper, ILogManager logManager, IAuRaStepCalculator auRaStepCalculator, IAuraConfig config, Address nodeAddress) : base(transactionSource, processor, stateProvider, sealer, blockTree, blockProcessingQueue, timestamper, logManager, auRaStepCalculator, config, nodeAddress)
 {
 }