Skip to content

No rewind data found for block #218

@sondreb

Description

@sondreb

After a while syncing, the BTC node failed and won't startup again. See log below. Perhaps we could gracefully handle this?

info: Blockcore.Consensus.ConsensusManager[0]
      Consensus at height 532711-0000000000000000001da15751c7a1514fec3e0f110cea22753a04def728d4a4-HeaderValidated is ahead of the block store at height 506237-000000000000000000504d62c23518c15fe7825358b7cc37ea9dbba66bb0f06c-HeaderValidated, rewinding consensus.
fail: Blockcore.Builder.FullNodeFeatureExecutor[0]
      An error occurred: 'System.InvalidOperationException: No rewind data found for block `532711-0000000000000000001da15751c7a1514fec3e0f110cea22753a04def728d4a4`
         at Blockcore.Features.Consensus.CoinViews.Coindb.LeveldbCoindb.Rewind()
         at Blockcore.Features.Consensus.CoinViews.CachedCoinView.Rewind()
         at Blockcore.Features.Consensus.Rules.PowConsensusRuleEngine.RewindAsync()
         at Blockcore.Consensus.ConsensusManager.InitializeAsync(ChainedHeader chainTip)
         at Blockcore.Base.BaseFeature.InitializeAsync()
         at Blockcore.Builder.FullNodeFeatureExecutor.<>c.<Initialize>b__3_1(IFullNodeFeature service)
         at Blockcore.Builder.FullNodeFeatureExecutor.Execute(Action`1 callback, Boolean disposing)'
fail: Blockcore.Builder.FullNodeFeatureExecutor[0]
      An error occurred starting the application.
There was a problem initializing the node. Details: 'System.AggregateException: One or more errors occurred. (No rewind data found for block `532711-0000000000000000001da15751c7a1514fec3e0f110cea22753a04def728d4a4`)
 ---> System.InvalidOperationException: No rewind data found for block `532711-0000000000000000001da15751c7a1514fec3e0f110cea22753a04def728d4a4`
   at Blockcore.Features.Consensus.CoinViews.Coindb.LeveldbCoindb.Rewind()
   at Blockcore.Features.Consensus.CoinViews.CachedCoinView.Rewind()
   at Blockcore.Features.Consensus.Rules.PowConsensusRuleEngine.RewindAsync()
   at Blockcore.Consensus.ConsensusManager.InitializeAsync(ChainedHeader chainTip)
   at Blockcore.Base.BaseFeature.InitializeAsync()
   at Blockcore.Builder.FullNodeFeatureExecutor.<>c.<Initialize>b__3_1(IFullNodeFeature service)
   at Blockcore.Builder.FullNodeFeatureExecutor.Execute(Action`1 callback, Boolean disposing)
   --- End of inner exception stack trace ---
   at Blockcore.Builder.FullNodeFeatureExecutor.Execute(Action`1 callback, Boolean disposing)
   at Blockcore.Builder.FullNodeFeatureExecutor.Initialize()
   at Blockcore.FullNode.Start()
   at Blockcore.Utilities.FullNodeExtensions.RunAsync(IFullNode node, CancellationToken cancellationToken)
   at Blockcore.Utilities.FullNodeExtensions.RunAsync(IFullNode node)
   at Bitcoin.Daemon.Program.Main(String[] args) in /home/runner/work/blockcore-nodes/blockcore-nodes/BTC/src/Bitcoin.Node/Program.cs:line 38'
Application is shutting down...
The CancellationTokenSource has been disposed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions