fix: stabilise duplicate namespace integration test under parallel execution (#143)
Summary
Fixes a flaky integration test in
TestSingleOrgScenarios/duplicate_namespace_creation_failsby replacing brittle full-output comparison with stable semantic validation.Problem
The test previously compared the full output of
namespace listusing strict equality:
- This output is not stable because subtests run with
t.Parallel()and share the same environment- Other subtests can create namespaces concurrently, causing the output to change between calls
- This leads to nondeterministic failures in CI
Root Cause
The test relied on byte-for-byte equality of command output, which is not deterministic under parallel execution with shared state.
Solution
Removed full stdout equality comparison
Introduced semantic validation:
- Verify that the expected namespace exists
- Ensure it appears exactly once (no duplicate creation)
Use namespace name for comparison instead of full struct equality to avoid instability
Impact
- Eliminates flaky behavior in integration tests
- Improves reliability of CI
- Preserves original test intent (no duplicate namespace creation)
Context
This issue surfaced while working on #113, where unrelated CI failures exposed instability in this test.
Testing
- Verified test logic locally
- Change is limited to test assertions (no production code affected)
Notes
This change keeps the test parallel-safe without altering test structure or behavior beyond removing nondeterministic assumptions.
Closes #142
Signed-off-by: Aaradhy Chinche aaradhychinche@gmail.com
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802032778号
Fabric-X
Motivation
The adoption of Distributed Ledger Technology (DLT) for critical financial infrastructures like digital assets and currencies (e.g., Central Bank Digital Currencies (CBDCs) , stablecoins, tokenized deposits, tokenized bonds/securities) is hindered by a significant performance gap. Permissioned blockchains such as Hyperledger Fabric, while conceptually suitable, are limited by architectural bottlenecks in their monolithic peer design and consensus mechanisms, preventing them from achieving the required scale.
Fabric-Xrepresents a fundamental re-architecture of Hyperledger Fabric that addresses these challenges end-to-end. The monolithic peer is decomposed into independently scalable microservices for endorsement, validation, and committing. To maximize parallelism, a transaction dependency graph was introduced. It enables safe, concurrent validation of transactions across multiple blocks. Complementing the peer redesign, we have introduced Arma, a novel sharded Byzantine Fault Tolerant (BFT) ordering service that dramatically increases throughput by ordering compact transaction digests rather than full transaction payloads. We have implemented and benchmarked this framework with a UTXO-based CBDC application. Our evaluation demonstrates a peak throughput exceeding 200,000 transactions per second (TPS) — two-orders-of-magnitude improvement over the standard implementation.Fabric-X proves that permissioned DLTs can be engineered for national-scale payment systems, providing a resilient and highly performant foundation for practical digital assets and currencies deployments and the integration of advanced, computationally intensive features.
Architecture Overview
Figure below shows the high-level architecture differences between
Fabric ClassicandFabric-X.Before we dive deep into the differences, we we would like to emphasize similarities:
Similarities
Differences
Fabric-X-Orderer
Fabric-X-Orderer
Arma is a Byzantine Fault Tolerant (BFT) consensus system designed to achieve horizontal scalability across all hardware resources: network bandwidth, CPU, and disk I/O. As opposed to preceding BFT protocols, Arma separates the dissemination and validation of client transactions from the consensus process, restricting the latter to totally ordering only metadata of batches of transactions. This separation enables each party to distribute compute and storage resources for transaction validation, dissemination and disk I/O among multiple machines, resulting in horizontal scalability. Additionally, Arma ensures censorship resistance by imposing a maximum time limit on the inclusion of client transactions.
Arma is composed of 4 subcomponents: routers, batchers, consenters and assemblers.
Clients submit transactions to the routers, whereas blocks are consumed from the assemblers.
Figure below demonstrates Fabric-X-Orderer architecture.
Code and more details can be found under Fabric-X-Orderer Github repository.
Fabric-X-Committer
Fabric-X-Committer is responsible for post-ordering transaction processing. It has a microservice architecture comprised of the following subcomponents: sidecar, coordinator, validator-committer, verification service, query service.
Figure below demonstrates the Fabric-X-Committer architecture.
Code and more details can be found under Fabric-X-Committer Github repository.
Prerequisites
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4sudo apt install makeRun the network
To set up the network yourself, follow the tutorial in the sample deployment scripts repository. It provides Ansible scripts with predefined inventories and playbooks for both local and remote cluster deployments. Support for deploying a sample application will be added soon.
Version compatibility matrix
Fabric-X workshop series
Useful links
Coming soon…