Feat: fpc-fsc extension submodule#957
Conversation
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
|
Addressing the protobuf namespace conflict ( The CI failure in the IRB and echo integration tests is caused by a protobuf namespace conflict. Two packages define the same proto message types and end up in the same binary:
Added |
Signed-off-by: Abhinav Prakash <abhinav.prakash319@gmail.com>
CI Failure: Orderer Config Incompatibility (FSC v0.11.0 ↔ Fabric 2.5.9)The IRB demo integration test panics during orderer startup: failed to parse config: Error unmarshalling config into struct: 1 error(s) decoding:
Root causeFSC General:
Throttling:
Rate: 0
InactivityTimeout: 5s
Backoff:
BaseDelay: 1s
Multiplier: 1.6
MaxDelay: 2mThese keys were introduced for Fabric v3.x. FPC's CI currently pins to Fabric 2.5.9 (config.mk, utils/docker/dev/Dockerfile) which does not recognize them -> causing the orderer to refuse startup. Why we can't just pin FSC to an older version
They came together. Pinning to an older FSC means shipping an integration against a version where FSC still contains FPC internals - defeating the purpose of this PR. Fix requiredUpgrade FPC's pinned Fabric binary from 2.5.9 → 3.1.4 in:
The echo integration test was already validated locally against Fabric 3.1.4: This upgrade is the correct long-term move to align FPC with FSC v0.11.0+, but since it touches all of FPC's CI (not just the new tests), it warrants a deliberate review decision. Happy to include it in this PR or track it as a follow-up looking for guidance. |
What this PR does / why we need it:
This PR migrates all FPC-related FSC (Fabric Smart Client) code out of the FSC repository and into FPC as a new
extension/fscsubmodule, resolving the cyclic dependency introduced by FSC importing parts of the FPC client SDK.The changes include:
extension/fscsubmodule: Hosts the FPC platform services (platform/fabric/services/fpc/) and NWO integration helpers (integration/nwo/fabric/fpc/,integration/nwo/fabric/topology/) previously living inside FSC.integration/go_chaincode/echo/): End-to-end test that exercises the new extension submodule.topology.gofiles acrossauction,kv_test,simulation, IRB demo, and the simple testing network now import FPC topology helpers fromextension/fscinstead of FSC internals. SDK import path updated fromplatform/fabric/sdktoplatform/fabric/sdk/digto align with post-PR-696 FSC structure.ii.RegisterPlatformFactory(fpcnwo.NewPlatformFactory())since FSC PR Go support #696 removed the built-in FPC platform registration from FSC.fabric-smart-client/platform/fabric/services/fpctoextension/fsc/platform/fabric/services/fpc.go.modfiles:extension/fscadded as a direct dependency with localreplacedirectives pointing to the post-PR-696 FSC clone until the upstream commit is available via a real pseudo-version.After this PR, users who want to use FPC with FSC applications simply import FSC core + the
extension/fscsubmodule and wire it in viatopology.go, no FPC code lives in FSC anymore.Which issue(s) this PR fixes:
Fixes #784
Special notes for your reviewer:
remove fpc). That PR is now merged and released asv0.11.0, allgo.modfiles in this PR reference the real upstream version; no localreplacedirectives for FSC remain.extension/fscis a standalone Go module (go.modatextension/fsc/go.mod) - Dependabot will not see it from the root. Keep this in mind for future dependency bumps.integration/go_chaincode/echo/test is the primary validation path for this migration; it exercises the full extension wiring end-to-end.go mod tidyon all affected modules auto-upgraded the Go toolchain requirement to1.26.3(minimum required by FSCv0.11.0).How I tested:
Ran the echo FSC integration test from
integration/go_chaincode/with Fabric binaries (FAB_BINS) pointing to Fabric v3.1.4:Result:
Does this PR introduce a user-facing changes and/or breaks backward compatability?:
Yes. Any user currently using FPC with FSC must update their code:
Import paths - FPC service and topology helpers have moved out
of FSC:
github.com/hyperledger-labs/fabric-smart-client/platform/fabric/services/fpcgithub.com/hyperledger/fabric-private-chaincode/extension/fsc/platform/fabric/services/fpcgithub.com/hyperledger-labs/fabric-smart-client/integration/nwo/fabric/topology(FPC helpers)github.com/hyperledger/fabric-private-chaincode/extension/fsc/integration/nwo/fabric/topologygithub.com/hyperledger-labs/fabric-smart-client/platform/fabric/sdkgithub.com/hyperledger-labs/fabric-smart-client/platform/fabric/sdk/digNew dependency - Add
extension/fscto yourgo.mod: require github.com/hyperledger/fabric-private-chaincode/extension/fsc vPlatform factory registration - Tests must now explicitly register the FPC platform factory (previously done implicitly by FSC):
where fpcnwo is:
import fpcnwo "github.com/hyperledger/fabric-private-chaincode/extension/fsc/integration/nwo/fabric/fpc"