Skip to content

Assembler synchronizer#961

Open
DorKatzelnick wants to merge 2 commits into
hyperledger:mainfrom
DorKatzelnick:assemblerSyncPart1
Open

Assembler synchronizer#961
DorKatzelnick wants to merge 2 commits into
hyperledger:mainfrom
DorKatzelnick:assemblerSyncPart1

Conversation

@DorKatzelnick

Copy link
Copy Markdown
Contributor

No description provided.

@DorKatzelnick DorKatzelnick changed the title Assembler sync part1 Assembler synchronizer Jun 28, 2026
@tock-ibm tock-ibm requested a review from Copilot July 6, 2026 07:00

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 introduces an “assembler synchronizer” implementation that can pull blocks from remote assembler endpoints using the existing BFT deliver-client machinery, and extends configuration parsing to surface assembler endpoint/TLS information.

Changes:

  • Added AssemblerInfo plus config extraction helpers (ExtractAssemblers, ExtractAssemblerAddresses) to obtain assembler endpoints and TLS CA roots from shared config.
  • Introduced a new node/assembler/synchronizer package (factory, BFT sync logic, sync buffer, genesis fetcher factory, verifier abstraction) and generated mocks to support testing.
  • Wired an assemblerSync replication policy path that constructs the new assembler BFT synchronizer.

Reviewed changes

Copilot reviewed 8 out of 16 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
node/config/config.go Adds AssemblerInfo struct to represent assembler endpoint and TLS material.
config/config.go Adds extraction of assemblers and assembler endpoint mapping from consensus metadata.
node/assembler/synchronizer/util.go Adds adapters/factories for BFT deliverer creation and endpoint extraction.
node/assembler/synchronizer/synchronizer_factory.go Adds factory that creates the assembler BFT synchronizer for assemblerSync policy.
node/assembler/synchronizer/synchronizer_bft.go Implements the assembler BFT sync loop (genesis fetch + BFT deliverer + buffer pull/commit).
node/assembler/synchronizer/sync_buffer.go Adds a buffered block handoff mechanism between deliverer and committer.
node/assembler/synchronizer/genesis_fetcher_factory.go Adds genesis fetcher factory building a comm.BlockPuller configured for assembler endpoints.
node/assembler/synchronizer/block_verifier.go Adds verifier factory abstraction (currently a noop verifier implementation).
node/assembler/synchronizer/mocks/verifier_factory.go Generated mock for verifier factory.
node/assembler/synchronizer/mocks/synchronizer_with_stop.go Generated mock for synchronizer interface.
node/assembler/synchronizer/mocks/synchronizer_factory.go Generated mock for synchronizer factory.
node/assembler/synchronizer/mocks/genesis_fetcher.go Generated mock for genesis fetcher.
node/assembler/synchronizer/mocks/genesis_fetcher_factory.go Generated mock for genesis fetcher factory.
node/assembler/synchronizer/mocks/bft_deliverer_factory.go Generated mock for BFT deliverer factory.
node/assembler/synchronizer/mocks/bft_block_deliverer.go Generated mock for BFT block deliverer.
node/assembler/synchronizer/mocks/assembler_support.go Generated mock for AssemblerSupport.
Files not reviewed (8)
  • node/assembler/synchronizer/mocks/assembler_support.go: Generated file
  • node/assembler/synchronizer/mocks/bft_block_deliverer.go: Generated file
  • node/assembler/synchronizer/mocks/bft_deliverer_factory.go: Generated file
  • node/assembler/synchronizer/mocks/genesis_fetcher.go: Generated file
  • node/assembler/synchronizer/mocks/genesis_fetcher_factory.go: Generated file
  • node/assembler/synchronizer/mocks/synchronizer_factory.go: Generated file
  • node/assembler/synchronizer/mocks/synchronizer_with_stop.go: Generated file
  • node/assembler/synchronizer/mocks/verifier_factory.go: Generated file

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

Comment thread node/assembler/synchronizer/synchronizer_bft.go
Comment thread node/assembler/synchronizer/synchronizer_bft.go
Comment thread node/assembler/synchronizer/synchronizer_bft.go
Comment thread node/assembler/synchronizer/util.go Outdated
Comment thread node/assembler/synchronizer/synchronizer_factory.go
Comment thread node/assembler/synchronizer/synchronizer_factory.go Outdated
Comment thread node/assembler/synchronizer/sync_buffer.go
Comment thread node/assembler/synchronizer/synchronizer_bft.go

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.

This can be common to both consenter and assembler, no?

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.

yes, I plan to place all shared code in a common place

@DorKatzelnick DorKatzelnick Jul 6, 2026

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.

future PR #990

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.

unit test please

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.

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.

unit test

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.

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.

unit test

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.

Comment thread node/assembler/synchronizer/synchronizer_bft.go
Comment thread node/assembler/synchronizer/synchronizer_bft.go Outdated
Signed-off-by: Dor.Katzelnick <Dor.Katzelnick@ibm.com>
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