Skip to content

Commit 5e06545

Browse files
Merge branch 'hyperledger:main' into main
2 parents f538873 + bb2df37 commit 5e06545

33 files changed

Lines changed: 909 additions & 264 deletions

.github/workflows/build-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout code
23-
uses: actions/checkout@v4
23+
uses: actions/checkout@v6
2424

2525
- name: Set up QEMU for cross-platform builds
2626
uses: docker/setup-qemu-action@v3

.github/workflows/lint.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Setup Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version-file: go.mod
2727

2828
- name: Install lint utilities
2929
run: |
30-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
30+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.11.4
3131
golangci-lint --version
3232
3333
- name: Run lint

.github/workflows/samples-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
fail-fast: false
2727
steps:
2828
- name: Checkout code
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v6
3030

3131
- name: Setup Go
32-
uses: actions/setup-go@v5
32+
uses: actions/setup-go@v6
3333
with:
3434
go-version-file: go.mod
3535

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- name: Checkout code
21-
uses: actions/checkout@v4
21+
uses: actions/checkout@v6
2222

2323
- name: Setup Go
24-
uses: actions/setup-go@v5
24+
uses: actions/setup-go@v6
2525
with:
2626
go-version-file: go.mod
2727

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
###########################################
99
# Stage 1: Build image
1010
###########################################
11-
FROM golang:1.25 AS builder
11+
FROM golang:1.26 AS builder
1212

1313
# Build environment variables
1414
ENV CGO_ENABLED=1

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ GO_TAGS ?=
1818

1919
go_cmd ?= go
2020
go_test ?= $(go_cmd) test -json -v -timeout 30m
21+
go_test_sum ?= $(go_cmd) tool gotestsum --format pkgname --
2122

2223
TOOLS_EXES = configtxgen configtxlator cryptogen fxconfig
2324

@@ -39,8 +40,6 @@ help: ## List all commands with documentation
3940
.PHONY: tools
4041
tools: $(TOOLS_EXES) ## Builds all tools
4142

42-
GO_TEST_FMT_FLAGS := -hide empty-packages
43-
4443
## Run generate
4544
.PHONY: generate
4645
generate: FORCE
@@ -50,7 +49,7 @@ generate: FORCE
5049
.PHONY: test
5150
test: FORCE
5251
@echo "Running Go unit tests..."
53-
cd tools && $(go_test) ./... | go tool gotestfmt ${GO_TEST_FMT_FLAGS}
52+
cd tools && $(go_test_sum) -timeout 30m -v ./...
5453

5554
.PHONY: $(TOOLS_EXES)
5655
$(TOOLS_EXES): %: $(BUILD_DIR)/% ## Builds a native binary
@@ -74,4 +73,4 @@ lint: FORCE
7473
cd tools && golangci-lint run --new-from-rev=origin/main --color=always --max-same-issues 0
7574
@echo "Running License Header Linters..."
7675
scripts/license-lint.sh
77-
FORCE:
76+
FORCE:

README.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ SPDX-License-Identifier: Apache-2.0
55

66
## Motivation
77

8-
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/sercurities) 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.
8+
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.
99

10-
`Fabric-X` represents a fundamental re-archicture of [Hyperledger Fabric](https://github.com/hyperledger/fabric) that addresses these challenges end-to-end. The monolithic peer is decompossed 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.
10+
`Fabric-X` represents a fundamental re-architecture of [Hyperledger Fabric](https://github.com/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.
1111

1212
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.
1313

@@ -27,7 +27,7 @@ Before we dive deep into the **differences**, we we would like to emphasize **si
2727
4. **Membership service provider** - is Fabric-cryptogen and Fabric-CA compatible
2828
5. **Consensus type and API** - ordering cluster provides BFT guarantees and offers same broadcast block GRPC API
2929

30-
**Differencies**
30+
**Differences**
3131
1. **Programming model** - classical Fabric primarily uses chaincodes to simulate transaction execution. In Fabric-X, we replace chaincodes with peer-to-peer transaction negotiation protocols built on [Fabric-Smart-Client](https://github.com/hyperledger-labs/fabric-smart-client) and [Fabric-Token-SDK](https://github.com/hyperledger-labs/fabric-token-sdk). This shift enables interactive protocols between participants, aligning with patterns already present in legacy systems.
3232
2. **Peer decomposition** - in classical Fabric, peers handle transaction validation, commitment, and notification, among other responsibilities. This monolithic architecture limits scalability, especially when certain components become bottlenecks. In Fabric-X, we decompose the peer by offloading validation, commitment, and notification into independent, scalable microservices.
3333
3. **Ordering service** - classical Fabric offers the following ordering service implementations: SmartBFT and RAFT. We propose an implementation based on [Arma protocol](https://arxiv.org/abs/2405.16575) a high performance distributed BFT consensus.
@@ -57,7 +57,7 @@ Code and more details can be found under [Fabric-X-Orderer Github repository](ht
5757

5858
### Fabric-X-Committer
5959

60-
Fabric-X-Commiter 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.
60+
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.
6161

6262
- **Sidecar** is a middleware component designed to operate between an Ordering Service and the Coordinator component. Its primary function is to reliably manage the flow of blocks, ensuring they are fetched, validated, persisted, and delivered to downstream clients.
6363
- **Coordinator** service acts as the central orchestrator of the transaction validation and commit pipeline. It sits between the Sidecar and a collection of specialized verification, validation and commit services. Its primary role is to manage the complex flow of transactions, from initial receipt to final status reporting, by leveraging a transaction dependency graph to maximize parallel processing while ensuring deterministic outcomes.
@@ -67,10 +67,19 @@ Fabric-X-Commiter is responsible for post-ordering transaction processing. It ha
6767

6868
Figure below demonstrates the Fabric-X-Committer architecture.
6969

70-
![Fabric-X-Commiter architecture](./diagrams/Fabric-X-Committer.png)
70+
![Fabric-X-Committer architecture](./diagrams/Fabric-X-Committer.png)
7171

7272
Code and more details can be found under [Fabric-X-Committer Github repository](https://github.com/hyperledger/fabric-x-committer).
7373

74+
## Prerequisites
75+
76+
| Tool | Version | Install |
77+
|------|---------|----------|
78+
| Go | **1.26+** | https://go.dev/dl |
79+
| golangci-lint | **v2.11.4+** | `go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4` |
80+
| Docker | 20.x+ | https://docs.docker.com/get-docker |
81+
| GNU Make | any | `sudo apt install make` |
82+
7483
## Run the network
7584

7685
To set up the network yourself, follow the tutorial in the [sample deployment scripts](https://github.com/LF-Decentralized-Trust-labs/fabric-x-ansible-collection) 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.
@@ -87,12 +96,12 @@ To set up the network yourself, follow the tutorial in the [sample deployment sc
8796
- [Introduction into Fabric-X](https://www.youtube.com/live/gdQh-mNKSKA)
8897
- [Programming model and app deployment](https://www.youtube.com/live/D086vrb9GeU)
8998
- [Fabric-Token-SDK](https://www.youtube.com/watch?v=PX9SDva97vQ)
90-
- [Orderer overview](https://www.youtube.com/live/1ikYNjDnqXw?t=200s)
91-
- [Committer overview, December 9 - register](https://www.meetup.com/lfdt-sf/events/310510523/)
99+
- [Orderer overview](https://www.youtube.com/live/1ikYNjDnqXw)
100+
- [Committer overview](https://www.youtube.com/live/uSK300_dogg?si=kRM-mNxhVjfT__IC)
92101

93102
## Useful links
94103

95-
- [Sample token application](https://github.com/iliecirciumaru/fabric-x/tree/main/samples/tokens)
104+
- [Sample token application](./samples/tokens)
96105
- [Fabric/Fabric-X monthly calls on the 3rd Wed of the month](https://zoom-lfx.platform.linuxfoundation.org/meetings/fabric?view=month)
97106
- [Fabric-X Blog](https://www.lfdecentralizedtrust.org/blog/new-major-contribution-to-hyperledger-fabric-purpose-built-implementation-for-next-gen-digital-assets)
98107
- [Fabric-X whitepaper](https://eprint.iacr.org/2023/1717.pdf) - detailed description of the Fabric-X. Explains motivation,implementation details and presents performance benchmarks
@@ -101,6 +110,8 @@ To set up the network yourself, follow the tutorial in the [sample deployment sc
101110
- [Fabric-Token-SDK](https://github.com/hyperledger-labs/fabric-token-sdk) and [Fabric-Smart-Client](https://github.com/hyperledger-labs/fabric-smart-client) Github repositories
102111
- [Fabrix-X Common](https://github.com/hyperledger/fabric-x-common) Github repository - contains new CLIs and protobuf, and code shared between the orderer and committer
103112
- [Sample deployment scripts](https://github.com/LF-Decentralized-Trust-labs/fabric-x-ansible-collection)
113+
- [Fabric-X Client SDK](https://github.com/hyperledger/fabric-x-sdk/)
114+
- [Fabric-X EVM](https://github.com/hyperledger/fabric-x-evm)
104115
- [Fabric-X RFCs](https://github.com/hyperledger/fabric-x-rfcs) Github repository - contains request for comments (RFCs) in the Fabric-X project
105116

106117
## Coming soon...

go.mod

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,29 @@
55

66
module github.com/hyperledger/fabric-x
77

8-
go 1.25.5
8+
go 1.26
99

1010
tool (
11-
github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt
1211
github.com/hyperledger/fabric-x-common/cmd/configtxgen
1312
github.com/hyperledger/fabric-x-common/cmd/cryptogen
13+
gotest.tools/gotestsum
1414
)
1515

1616
require (
1717
github.com/alecthomas/kingpin/v2 v2.4.0
1818
github.com/cockroachdb/errors v1.12.0
1919
github.com/gorilla/handlers v1.5.1
20-
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5
20+
github.com/hyperledger/fabric-lib-go v1.1.3
2121
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7
22-
github.com/hyperledger/fabric-x-committer v0.1.9
23-
github.com/hyperledger/fabric-x-common v0.1.1-0.20260219094834-26c5a49ed548
22+
github.com/hyperledger/fabric-x-committer v0.1.10-0.20260406144749-7d1d92371ba4
23+
github.com/hyperledger/fabric-x-common v0.2.1
2424
github.com/spf13/cobra v1.10.2
2525
github.com/spf13/viper v1.21.0
2626
github.com/stretchr/testify v1.11.1
2727
github.com/testcontainers/testcontainers-go v0.40.0
2828
golang.org/x/sync v0.19.0
2929
golang.org/x/text v0.33.0
30+
google.golang.org/grpc v1.80.0
3031
google.golang.org/protobuf v1.36.11
3132
gopkg.in/yaml.v3 v3.0.1
3233
)
@@ -43,6 +44,7 @@ require (
4344
github.com/Microsoft/go-winio v0.6.2 // indirect
4445
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
4546
github.com/beorn7/perks v1.0.1 // indirect
47+
github.com/bitfield/gotestdox v0.2.2 // indirect
4648
github.com/bits-and-blooms/bitset v1.20.0 // indirect
4749
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
4850
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
@@ -57,10 +59,12 @@ require (
5759
github.com/cpuguy83/dockercfg v0.3.2 // indirect
5860
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
5961
github.com/distribution/reference v0.6.0 // indirect
62+
github.com/dnephin/pflag v1.0.7 // indirect
6063
github.com/docker/docker v28.5.2+incompatible // indirect
6164
github.com/docker/go-connections v0.6.0 // indirect
6265
github.com/docker/go-units v0.5.0 // indirect
6366
github.com/ebitengine/purego v0.8.4 // indirect
67+
github.com/fatih/color v1.18.0 // indirect
6468
github.com/felixge/httpsnoop v1.0.4 // indirect
6569
github.com/fsnotify/fsnotify v1.9.0 // indirect
6670
github.com/fsouza/go-dockerclient v1.12.3 // indirect
@@ -72,9 +76,9 @@ require (
7276
github.com/gogo/protobuf v1.3.2 // indirect
7377
github.com/golang/protobuf v1.5.4 // indirect
7478
github.com/google/go-cmp v0.7.0 // indirect
79+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
7580
github.com/google/uuid v1.6.0 // indirect
7681
github.com/gorilla/mux v1.8.1 // indirect
77-
github.com/gotesttools/gotestfmt/v2 v2.5.0 // indirect
7882
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
7983
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4 // indirect
8084
github.com/hyperledger-labs/SmartBFT v0.0.0-20250503203013-eb005eef8866 // indirect
@@ -90,6 +94,8 @@ require (
9094
github.com/kr/text v0.2.0 // indirect
9195
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
9296
github.com/magiconair/properties v1.8.10 // indirect
97+
github.com/mattn/go-colorable v0.1.14 // indirect
98+
github.com/mattn/go-isatty v0.0.20 // indirect
9399
github.com/miekg/pkcs11 v1.1.1 // indirect
94100
github.com/mitchellh/mapstructure v1.5.0 // indirect
95101
github.com/moby/docker-image-spec v1.3.1 // indirect
@@ -133,22 +139,25 @@ require (
133139
github.com/yusufpapurcu/wmi v1.2.4 // indirect
134140
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
135141
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
136-
go.opentelemetry.io/otel v1.40.0 // indirect
142+
go.opentelemetry.io/otel v1.43.0 // indirect
137143
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
138-
go.opentelemetry.io/otel/metric v1.40.0 // indirect
139-
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
140-
go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect
141-
go.opentelemetry.io/otel/trace v1.40.0 // indirect
144+
go.opentelemetry.io/otel/metric v1.43.0 // indirect
145+
go.opentelemetry.io/otel/sdk v1.43.0 // indirect
146+
go.opentelemetry.io/otel/sdk/metric v1.43.0 // indirect
147+
go.opentelemetry.io/otel/trace v1.43.0 // indirect
142148
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
143149
go.uber.org/multierr v1.11.0 // indirect
144150
go.uber.org/zap v1.27.0 // indirect
145151
go.yaml.in/yaml/v3 v3.0.4 // indirect
146152
golang.org/x/crypto v0.47.0 // indirect
153+
golang.org/x/mod v0.32.0 // indirect
147154
golang.org/x/net v0.49.0 // indirect
148-
golang.org/x/sys v0.40.0 // indirect
155+
golang.org/x/sys v0.42.0 // indirect
156+
golang.org/x/term v0.39.0 // indirect
149157
golang.org/x/time v0.14.0 // indirect
158+
golang.org/x/tools v0.41.0 // indirect
150159
google.golang.org/genproto/googleapis/api v0.0.0-20260120221211-b8f7ae30c516 // indirect
151-
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120174246-409b4a993575 // indirect
152-
google.golang.org/grpc v1.78.0 // indirect
160+
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120221211-b8f7ae30c516 // indirect
153161
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
162+
gotest.tools/gotestsum v1.13.0 // indirect
154163
)

0 commit comments

Comments
 (0)