hyperledger / fabric

Hyperledger Fabric is an enterprise-grade permissioned distributed ledger framework for developing solutions and applications. Its modular and versatile design satisfies a broad range of industry use cases. It offers a unique approach to consensus that enables performance at scale while preserving privacy.
https://wiki.hyperledger.org/display/fabric
Apache License 2.0
15.65k stars 8.81k forks source link

BFT Block Puller: test byzantine behavior of the orderer during delivery against the peer #4446

Open tock-ibm opened 11 months ago

tock-ibm commented 11 months ago

When running a BFT ordering service the peer is pulling blocks from the ordering service using the BFT Deliverer that protects against censorship attacks of the orderer that is asked to deliver blocks.

In this task we have to create an integration test environment that emulates the behavior of a malicious orderer. We that have to emulate malicious + faulty behavior against a peer pulling blocks.

Scenario 1 - censorship detection

Scenario 2 - censorship suspicion that resets

Scenario 3 - bad blocks and comm problems

Scenario 4 - bad attestations

These scenarios are tested in the unit tests of the BFTDeliverer and the CensorshipMonitor, now we want to test some of these basic scenarios in the integration tests.

The challenge here is to emulate the behavior of a byzantine orderer.

Stages:

tock-ibm commented 11 months ago

@semil and @arkadiPiven

tock-ibm commented 11 months ago

The delivery service server handlers are here: common/deliver/deliver.go

func (h *Handler) Handle(ctx context.Context, srv *Server) error

instatiated here: orderer/common/server/server.go

tock-ibm commented 11 months ago

Continue from PR https://github.com/hyperledger/fabric/pull/4402

arkadiPiven commented 9 months ago

Added the test PR: https://github.com/hyperledger/fabric/pull/4542

tock-ibm commented 6 months ago

See also #4724