Skip to content

consensus synchronizer BFT deliverer initialization#984

Open
DorKatzelnick wants to merge 1 commit into
hyperledger:mainfrom
DorKatzelnick:consensusSyncBlock
Open

consensus synchronizer BFT deliverer initialization#984
DorKatzelnick wants to merge 1 commit into
hyperledger:mainfrom
DorKatzelnick:consensusSyncBlock

Conversation

@DorKatzelnick

@DorKatzelnick DorKatzelnick commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

use boot config block to initialize BFT deliverer in consensus synchronizer

fix for #986

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR wires a “boot config block” through the consensus synchronizer creation path and uses it to initialize the BFT deliverer configuration during synchronization.

Changes:

  • Extend SynchronizerFactory.CreateSynchronizer(...) and newSynchronizer(...) to accept and propagate a bootConfigBlock.
  • Add BootConfigBlock to BFTSynchronizer and use it when extracting config for BFTDeliverer.Initialize(...).
  • Update synchronizer tests and refresh generated mock Invocations() implementations.

Reviewed changes

Copilot reviewed 4 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
node/consensus/synchronizer/synchronizer_factory.go Plumbs bootConfigBlock through synchronizer factory/creator into BFTSynchronizer.
node/consensus/synchronizer/synchronizer_bft.go Uses BootConfigBlock to derive config for BFT deliverer initialization.
node/consensus/synchronizer/synchronizer_bft_test.go Updates BFT synchronizer tests to set BootConfigBlock.
node/consensus/synchronizer/mocks/verifier_factory.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/updatable_block_verifier.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/orderer_config.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/height_detector.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/height_detector_factory.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/consenter_support.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/bft_deliverer_factory.go Updates generated fake Invocations() locking behavior.
node/consensus/synchronizer/mocks/bft_block_deliverer.go Updates generated fake Invocations() locking behavior.
node/consensus/consensus_builder.go Passes lastConfigBlock into synchronizer creation as the boot config block.
Files not reviewed (8)
  • node/consensus/synchronizer/mocks/bft_block_deliverer.go: Generated file
  • node/consensus/synchronizer/mocks/bft_deliverer_factory.go: Generated file
  • node/consensus/synchronizer/mocks/consenter_support.go: Generated file
  • node/consensus/synchronizer/mocks/height_detector.go: Generated file
  • node/consensus/synchronizer/mocks/height_detector_factory.go: Generated file
  • node/consensus/synchronizer/mocks/orderer_config.go: Generated file
  • node/consensus/synchronizer/mocks/updatable_block_verifier.go: Generated file
  • node/consensus/synchronizer/mocks/verifier_factory.go: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread node/consensus/synchronizer/synchronizer_bft.go
support ConsenterSupport,
bccsp bccsp.BCCSP,
clusterDialer *comm.PredicateDialer,
bootConfigBlock *cb.Block,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add some documentation

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in synchronizer creation in consensus_builder

@tock-ibm tock-ibm force-pushed the consensusSyncBlock branch 2 times, most recently from 864757b to 000612a Compare July 6, 2026 09:46
@HagarMeir HagarMeir force-pushed the consensusSyncBlock branch from 000612a to 3e2ae9b Compare July 6, 2026 10:59
…onizer

Signed-off-by: Dor.Katzelnick <Dor.Katzelnick@ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants