fxconfig: prevent reuse of closed orderer and notification clients across submissions
Valutazione
Questa issue non è ancora stata valutata.
Descrizione
Title: fxconfig: prevent reuse of closed orderer and notification clients across submissions
Problem
fxconfig uses provider.Provider.Get() to lazily initialize and cache service instances with sync.Once.
However, the submission path closes some of the returned clients after use:
- the orderer client is closed at the end of submission
- the notification client is also closed in the
--waitflow
This creates an ownership mismatch:
- providers cache these clients as long-lived instances
- callers treat them as per-operation resources
As a result, repeated operations may reuse a cached client whose underlying connection has already been closed.
Code path
tools/fxconfig/internal/provider/provider.go:Provider.Get()memoizes instances usingsync.Oncetools/fxconfig/internal/app/submit.go: submission closes the orderer client after usetools/fxconfig/internal/app/submit.go:SubmitTransactionWithWaitalso closes the notification client
Why it matters
This may cause repeated CLI operations in the same application instance to fail unpredictably and makes client lifecycle semantics unclear.
Suggested direction
Choose one ownership model and apply it consistently:
- Providers should not cache closeable gRPC clients and should create fresh instances per use, or
- Providers should own the lifecycle of cached clients, and consumers should not close provider-managed instances.
Acceptance criteria
- repeated submit operations work correctly
- repeated submit-with-wait operations work correctly
- client ownership semantics are clear in code
- regression tests cover repeated usage
- Lingua principale
- Go
- Stelle
- 65
- Fork
- 85
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di hyperledger/fabric-x
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
hyperledger/fabric-x#316 ·
-
Tools: admin cli json manipulation automationForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 1/5 1-3 ore Idoneità per principianti 78/100
hyperledger/fabric-x#299 ·
-
bug(fxconfig): SubmitTransaction and SubmitTransactionWithWait close the orderer client after every call via sync.Once-cached providerForse già presa @ARYANPATEL-BIT l’ha presa 209 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
hyperledger/fabric-x#252 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
hyperledger/fabric-x#243 ·
-
bug(fxconfig/transaction): Endorse() silently appends duplicate endorsements when called twice with the same signerForse già presa @Prachi194agrawal l’ha presa 209 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
hyperledger/fabric-x#241 · 1 commento ·
Tutte le issue di hyperledger/fabric-x
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
prime-radiant-inc/evener#8066 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 60/100
slavakurilyak/awesome-ai-agents#1100 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
hyperledger/SmartBFT#803 ·
I maintainer di solito rispondono entro 1 giorno
-
Craft Agents: magpie's models are written without supportsThinking, so every model shows thinkingAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100