【问题标题】:Hyperledger fabric peers panic due to previous block hash mismatch由于先前的块哈希不匹配,Hyperledger Fabric 节点出现恐慌
【发布时间】:2021-01-28 10:02:23
【问题描述】:

我有一个超级账本结构网络,其中包含 2 个组织和每个组织 2 个对等点。我从备份中恢复了网络,同行开始抛出以下错误:

2021-01-28 09:49:55.374 UTC [gossip.state] commitBlock -> ERRO 26b Got error while committing(unexpected Previous block hash. Expected PreviousHash = [91e8aafc47e2f521afc8a52d44b80c60fe781084dec9e1b92ab40d8b6138e7d0], PreviousHash referred in the latest block= [042c3059d75a1622fea88f7f2a5f268363206004ebca635118039e0496b83197]
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*blockfileMgr).addBlock
        /opt/gopath/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/blockfile_mgr.go:254
github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage.(*fsBlockStore).AddBlock
        /opt/gopath/src/github.com/hyperledger/fabric/common/ledger/blkstorage/fsblkstorage/fs_blockstore.go:42
github.com/hyperledger/fabric/core/ledger/ledgerstorage.(*Store).CommitWithPvtData
        /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/ledgerstorage/store.go:132
github.com/hyperledger/fabric/core/ledger/kvledger.(*kvLedger).CommitWithPvtData
        /opt/gopath/src/github.com/hyperledger/fabric/core/ledger/kvledger/kv_ledger.go:312
github.com/hyperledger/fabric/core/ledger/ledgermgmt.(*closableLedger).CommitWithPvtData
        <autogenerated>:1
github.com/hyperledger/fabric/core/committer.(*LedgerCommitter).CommitWithPvtData
        /opt/gopath/src/github.com/hyperledger/fabric/core/committer/committer_impl.go:93
github.com/hyperledger/fabric/gossip/privdata.(*coordinator).StoreBlock
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/privdata/coordinator.go:243
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).commitBlock
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:810
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).deliverPayloads
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:598
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333
commit failed
github.com/hyperledger/fabric/gossip/privdata.(*coordinator).StoreBlock
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/privdata/coordinator.go:246
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).commitBlock
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:810
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).deliverPayloads
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:598
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).commitBlock
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:811
github.com/hyperledger/fabric/gossip/state.(*GossipStateProviderImpl).deliverPayloads
        /opt/gopath/src/github.com/hyperledger/fabric/gossip/state/state.go:598
runtime.goexit
        /opt/go/src/runtime/asm_amd64.s:1333)

我不确定出了什么问题,但所有 4 个同行都开始抛出错误。关于下一步应该做什么的任何建议? 谢谢

【问题讨论】:

    标签: hyperledger-fabric hyperledger


    【解决方案1】:

    您可能通过先备份对等方然后备份订购者来备份网络。

    这很危险,因为您创建的备份会导致对等节点的区块高度高于排序节点。

    例如,假设排序节点有一个最新备份的区块 100,而对等节点有一个最新备份的区块 101,其哈希值为 bar。排序者将创建具有foo 哈希的块 101,并且对等方将永远不需要拉它。然后,orderers 将使用先前的哈希 foo 创建块 102,但 peer 期望先前的哈希为 bar

    【讨论】:

      猜你喜欢
      • 2020-03-27
      • 2021-06-08
      • 1970-01-01
      • 2021-12-15
      • 2019-02-23
      • 1970-01-01
      • 2013-05-19
      • 1970-01-01
      • 2021-04-23
      相关资源
      最近更新 更多