StratisBitcoinFullNode
StratisBitcoinFullNode copied to clipboard
Stratis DNS node fails to start in light mode
When starting Stratis.StratisDnsD in the "light" mode it fails to start.
**Stack Trace**
fail: Stratis.Bitcoin.Builder.FullNodeFeatureExecutor[0]
An error occurred starting the application.
There was a problem initializing the node. Details: 'System.InvalidOperationException: Unable to resolve service for type 'Stratis.Bitcoin.Interfaces.IBlockStore' while attempting to activate 'Stratis.Bitcoin.Consensus.ConsensusManager'.
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateArgumentCallSites(Type serviceType, Type implementationType, CallSiteChain callSiteChain, ParameterInfo[] parameters, Boolean throwIfCallSiteNotFound)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateConstructorCallSite(Type serviceType, Type implementationType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(ServiceDescriptor descriptor, Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.TryCreateExact(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.CallSiteFactory.CreateCallSite(Type serviceType, CallSiteChain callSiteChain)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.CreateServiceAccessor(Type serviceType)
at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType, ServiceProviderEngineScope serviceProviderEngineScope)
at Microsoft.Extensions.DependencyInjection.ServiceLookup.ServiceProviderEngine.GetService(Type serviceType)
at Microsoft.Extensions.DependencyInjection.ServiceProvider.GetService(Type serviceType)
at Stratis.Bitcoin.Builder.FullNodeServiceProvider.get_Features()+MoveNext() in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\Builder\FullNodeServiceProvider.cs:line 36
at Stratis.Bitcoin.Builder.FullNodeFeatureExecutor.Execute(Action`1 callback, Boolean reverseOrder) in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\Builder\FullNodeFeatureExecutor.cs:line 98
at Stratis.Bitcoin.Builder.FullNodeFeatureExecutor.Initialize() in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\Builder\FullNodeFeatureExecutor.cs:line 51
at Stratis.Bitcoin.FullNode.Start() in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\FullNode.cs:line 211
at Stratis.Bitcoin.Utilities.FullNodeExtensions.RunAsync(IFullNode node, CancellationToken cancellationToken, String shutdownMessage, String shutdownCompleteMessage) in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\Utilities\FullNodeExtensions.cs:line 71
at Stratis.Bitcoin.Utilities.FullNodeExtensions.RunAsync(IFullNode node) in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.Bitcoin\Utilities\FullNodeExtensions.cs:line 53
at Stratis.StratisDnsD.Program.Main(String[] args) in C:\Code\InternalTestnet\tmp\StratisBitcoinFullNode\src\Stratis.StratisDnsD\Program.cs:line 71'
Application is shutting down.
The CancellationTokenSource has been disposed.
An easy solution would be to add UseBlockStore to the light build of the node. Don't do it! The real solution is to add an empty ConsensusManager that doesn't do any validation.
The DNS node is not a deliverable right now, so I'll remove the UAT tag.