trustbloc/fabric-peer-ext

Non-committing peer returns error when handling private data state request from other peers

bstasyszyn opened this issue · 0 comments

The error is:

[gossip.state] handleStateRequest -> ERRO 0f0 cannot read block number 3 from ledger, because Last committed block=1, block requested=3, skipping..-
When a peer in org1 asks a non-committing peer in org2 for block and private data then the block is found but the private data may not be found since a Commit is not performed on non-committing peers and the 'lastCommittedBlock' is a cached variable that's only updated during commit.

Currently, state requests are only made to endorsers (this code is in gossipStateProviderExtension.HandleStateRequest).