Skip to content

Commit c7ab59f

Browse files
Add fabric-x support
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
1 parent 2adac6d commit c7ab59f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+6544
-63
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ jobs:
6969
pingpong,
7070
stoprestart,
7171
twonets,
72-
chaincode-events
72+
chaincode-events,
73+
fabricx-iou
7374
]
7475

7576
steps:
@@ -94,5 +95,10 @@ jobs:
9495
- name: Set up softhsm
9596
run: make install-softhsm
9697

98+
- name: Fabric-x setup
99+
if: startsWith(matrix.tests, 'fabricx')
100+
run: |
101+
make fxconfig configtxgen fabricx-docker-images
102+
97103
- name: Run ${{ matrix.tests }}
98104
run: make integration-tests-${{ matrix.tests }}

Makefile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# pinned versions
22
FABRIC_VERSION ?= 3.1.1
33
FABRIC_TWO_DIGIT_VERSION = $(shell echo $(FABRIC_VERSION) | cut -d '.' -f 1,2)
4+
FABRIC_X_TOOLS_VERSION ?= v0.0.5
45

56
# need to install fabric binaries outside of fsc tree for now (due to chaincode packaging issues)
67
FABRIC_BINARY_BASE=$(PWD)/../fabric
@@ -21,6 +22,14 @@ install-tools:
2122
@echo Installing tools from tools/tools.go
2223
@cd tools; cat tools.go | grep _ | awk -F'"' '{print $$2}' | xargs -tI % go install %
2324

25+
.PHONY: fxconfig
26+
fxconfig: ## Install fxconfig
27+
@env GOBIN=$(FAB_BINS) go install $(GO_FLAGS) github.com/hyperledger/fabric-x/tools/fxconfig@$(FABRIC_X_TOOLS_VERSION)
28+
29+
.PHONY: configtxgen
30+
configtxgen: ## Install configtxgen
31+
@env GOBIN=$(FAB_BINS) go install $(GO_FLAGS) github.com/hyperledger/fabric-x/tools/configtxgen@$(FABRIC_X_TOOLS_VERSION)
32+
2433
.PHONY: download-fabric
2534
download-fabric:
2635
./ci/scripts/download_fabric.sh $(FABRIC_BINARY_BASE) $(FABRIC_VERSION)
@@ -61,6 +70,10 @@ fabric-docker-images:
6170
docker pull hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION)
6271
docker image tag hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION) hyperledger/fabric-ccenv:latest
6372

73+
.PHONY: fabricx-docker-images
74+
fabricx-docker-images:
75+
docker pull hyperledger/fabric-x-committer-test-node:0.1.5
76+
6477
.PHONY: monitoring-docker-images
6578
monitoring-docker-images:
6679
docker pull ghcr.io/hyperledger-labs/explorer-db:latest
@@ -120,6 +133,10 @@ integration-tests-fabric-stoprestart:
120133
integration-tests-pingpong:
121134
cd ./integration/fsc/pingpong/; export FAB_BINS=$(FAB_BINS); ginkgo $(GINKGO_TEST_OPTS) .
122135

136+
.PHONY: integration-tests-fabricx-iou
137+
integration-tests-fabricx-iou:
138+
cd ./integration/fabricx/iou; export FAB_BINS=$(FAB_BINS); ginkgo $(GINKGO_TEST_OPTS) .
139+
123140
.PHONY: integration-tests-stoprestart
124141
integration-tests-stoprestart:
125142
cd ./integration/fsc/stoprestart; export FAB_BINS=$(FAB_BINS); ginkgo $(GINKGO_TEST_OPTS) .
@@ -144,6 +161,7 @@ clean:
144161
rm -rf ./integration/fabric/twonets/cmd
145162
rm -rf ./integration/fabric/stoprestart/cmd
146163
rm -rf ./integration/fsc/stoprestart/cmd
164+
rm -rf ./integration/fabricx/iou/cmd
147165
rm -rf ./integration/fscnodes
148166
rm -rf ./cmd/fsccli/cmd
149167

go.mod

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/hyperledger-labs/fabric-smart-client
22

3-
go 1.24.2
4-
5-
toolchain go1.24.3
3+
go 1.24.3
64

75
require (
86
github.com/DATA-DOG/go-sqlmock v1.5.2
@@ -28,6 +26,8 @@ require (
2826
github.com/hyperledger/fabric-contract-api-go/v2 v2.2.0
2927
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5
3028
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7
29+
github.com/hyperledger/fabric-x-committer v0.1.5
30+
github.com/hyperledger/fabric-x-common v0.0.0-20250917075146-ac37a580bb6e
3131
github.com/jackc/pgx/v5 v5.7.1
3232
github.com/jackc/pgxlisten v0.0.0-20241106001234-1d6f6656415c
3333
github.com/jaegertracing/jaeger-idl v0.6.0
@@ -46,7 +46,7 @@ require (
4646
github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2
4747
github.com/uptrace/opentelemetry-go-extra/otelzap v0.3.2
4848
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.54.0
49-
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.54.0
49+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.59.0
5050
go.opentelemetry.io/otel v1.34.0
5151
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.28.0
5252
go.opentelemetry.io/otel/exporters/stdout/stdouttrace v1.28.0
@@ -57,23 +57,15 @@ require (
5757
go.uber.org/goleak v1.3.0
5858
go.uber.org/zap v1.27.0
5959
golang.org/x/exp v0.0.0-20241009180824-f66d83c29e7c
60+
golang.org/x/net v0.39.0
6061
golang.org/x/sync v0.13.0
62+
golang.org/x/text v0.24.0
6163
google.golang.org/grpc v1.72.0
6264
google.golang.org/protobuf v1.36.6
6365
gopkg.in/yaml.v2 v2.4.0
6466
modernc.org/sqlite v1.32.0
6567
)
6668

67-
require (
68-
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
69-
github.com/cockroachdb/redact v1.1.5 // indirect
70-
github.com/getsentry/sentry-go v0.27.0 // indirect
71-
github.com/kr/pretty v0.3.1 // indirect
72-
github.com/kr/text v0.2.0 // indirect
73-
github.com/pkg/errors v0.9.1 // indirect
74-
github.com/rogpeppe/go-internal v1.13.1 // indirect
75-
)
76-
7769
require (
7870
cel.dev/expr v0.20.0 // indirect
7971
cloud.google.com/go v0.116.0 // indirect
@@ -83,7 +75,7 @@ require (
8375
cloud.google.com/go/iam v1.2.2 // indirect
8476
cloud.google.com/go/monitoring v1.21.2 // indirect
8577
cloud.google.com/go/storage v1.49.0 // indirect
86-
github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
78+
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
8779
github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c // indirect
8880
github.com/GoogleCloudPlatform/opentelemetry-operations-go/detectors/gcp v1.26.0 // indirect
8981
github.com/GoogleCloudPlatform/opentelemetry-operations-go/exporter/metric v0.48.1 // indirect
@@ -98,22 +90,24 @@ require (
9890
github.com/benbjohnson/clock v1.3.5 // indirect
9991
github.com/beorn7/perks v1.0.1 // indirect
10092
github.com/bits-and-blooms/bitset v1.14.3 // indirect
101-
github.com/bytedance/sonic v1.11.6 // indirect
102-
github.com/bytedance/sonic/loader v0.1.1 // indirect
93+
github.com/bytedance/sonic v1.12.3 // indirect
94+
github.com/bytedance/sonic/loader v0.2.0 // indirect
10395
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
10496
github.com/cespare/xxhash/v2 v2.3.0 // indirect
10597
github.com/cloudwego/base64x v0.1.4 // indirect
10698
github.com/cloudwego/iasm v0.2.0 // indirect
10799
github.com/cncf/xds/go v0.0.0-20250121191232-2f005788dc42 // indirect
108-
github.com/consensys/bavard v0.1.13 // indirect
109-
github.com/consensys/gnark-crypto v0.13.0 // indirect
100+
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
101+
github.com/cockroachdb/redact v1.1.5 // indirect
102+
github.com/consensys/bavard v0.1.22 // indirect
103+
github.com/consensys/gnark-crypto v0.14.0 // indirect
110104
github.com/containerd/cgroups v1.1.0 // indirect
111105
github.com/containerd/log v0.1.0 // indirect
112106
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
113107
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
114108
github.com/davidlazar/go-crypto v0.0.0-20200604182044-b73af7476f6c // indirect
115109
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.3.0 // indirect
116-
github.com/distribution/reference v0.5.0 // indirect
110+
github.com/distribution/reference v0.6.0 // indirect
117111
github.com/docker/go-units v0.5.0 // indirect
118112
github.com/dustin/go-humanize v1.0.1 // indirect
119113
github.com/elastic/gosigar v0.14.3 // indirect
@@ -123,7 +117,8 @@ require (
123117
github.com/flynn/noise v1.1.0 // indirect
124118
github.com/francoispqt/gojay v1.2.13 // indirect
125119
github.com/fsnotify/fsnotify v1.8.0 // indirect
126-
github.com/gabriel-vasile/mimetype v1.4.4 // indirect
120+
github.com/gabriel-vasile/mimetype v1.4.5 // indirect
121+
github.com/getsentry/sentry-go v0.27.0 // indirect
127122
github.com/ghodss/yaml v1.0.0 // indirect
128123
github.com/gin-contrib/sse v0.1.0 // indirect
129124
github.com/go-jose/go-jose/v4 v4.0.5 // indirect
@@ -136,9 +131,9 @@ require (
136131
github.com/go-openapi/swag v0.23.0 // indirect
137132
github.com/go-playground/locales v0.14.1 // indirect
138133
github.com/go-playground/universal-translator v0.18.1 // indirect
139-
github.com/go-playground/validator/v10 v10.20.0 // indirect
134+
github.com/go-playground/validator/v10 v10.22.1 // indirect
140135
github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
141-
github.com/goccy/go-json v0.10.2 // indirect
136+
github.com/goccy/go-json v0.10.3 // indirect
142137
github.com/godbus/dbus/v5 v5.1.0 // indirect
143138
github.com/gogo/googleapis v1.4.1 // indirect
144139
github.com/gogo/protobuf v1.3.2 // indirect
@@ -178,6 +173,8 @@ require (
178173
github.com/klauspost/compress v1.17.11 // indirect
179174
github.com/klauspost/cpuid/v2 v2.2.8 // indirect
180175
github.com/koron/go-ssdp v0.0.4 // indirect
176+
github.com/kr/pretty v0.3.1 // indirect
177+
github.com/kr/text v0.2.0 // indirect
181178
github.com/leodido/go-urn v1.4.0 // indirect
182179
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
183180
github.com/libp2p/go-cidranger v1.1.0 // indirect
@@ -202,8 +199,8 @@ require (
202199
github.com/mmcloughlin/addchain v0.4.0 // indirect
203200
github.com/moby/docker-image-spec v1.3.1 // indirect
204201
github.com/moby/patternmatcher v0.6.0 // indirect
205-
github.com/moby/sys/sequential v0.5.0 // indirect
206-
github.com/moby/sys/user v0.1.0 // indirect
202+
github.com/moby/sys/sequential v0.6.0 // indirect
203+
github.com/moby/sys/user v0.3.0 // indirect
207204
github.com/moby/sys/userns v0.1.0 // indirect
208205
github.com/moby/term v0.5.0 // indirect
209206
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
@@ -222,7 +219,7 @@ require (
222219
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
223220
github.com/ncruces/go-strftime v0.1.9 // indirect
224221
github.com/opencontainers/go-digest v1.0.0 // indirect
225-
github.com/opencontainers/image-spec v1.1.0-rc6 // indirect
222+
github.com/opencontainers/image-spec v1.1.0 // indirect
226223
github.com/opencontainers/runtime-spec v1.2.0 // indirect
227224
github.com/opentracing/opentracing-go v1.2.0 // indirect
228225
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
@@ -243,6 +240,7 @@ require (
243240
github.com/pion/transport/v2 v2.2.10 // indirect
244241
github.com/pion/turn/v2 v2.1.6 // indirect
245242
github.com/pion/webrtc/v3 v3.3.4 // indirect
243+
github.com/pkg/errors v0.9.1 // indirect
246244
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
247245
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
248246
github.com/polydawn/refmt v0.89.0 // indirect
@@ -254,6 +252,7 @@ require (
254252
github.com/quic-go/webtransport-go v0.8.1-0.20241018022711-4ac2c9250e66 // indirect
255253
github.com/raulk/go-watchdog v1.3.0 // indirect
256254
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
255+
github.com/rogpeppe/go-internal v1.13.1 // indirect
257256
github.com/sagikazarmark/locafero v0.7.0 // indirect
258257
github.com/sirupsen/logrus v1.9.3 // indirect
259258
github.com/sourcegraph/conc v0.3.0 // indirect
@@ -288,13 +287,11 @@ require (
288287
go.uber.org/fx v1.23.0 // indirect
289288
go.uber.org/mock v0.5.0 // indirect
290289
go.uber.org/multierr v1.11.0 // indirect
291-
golang.org/x/arch v0.8.0 // indirect
290+
golang.org/x/arch v0.11.0 // indirect
292291
golang.org/x/crypto v0.37.0 // indirect
293292
golang.org/x/mod v0.24.0 // indirect
294-
golang.org/x/net v0.39.0 // indirect
295293
golang.org/x/oauth2 v0.27.0 // indirect
296294
golang.org/x/sys v0.32.0 // indirect
297-
golang.org/x/text v0.24.0
298295
golang.org/x/time v0.8.0 // indirect
299296
golang.org/x/tools v0.31.0 // indirect
300297
gonum.org/v1/gonum v0.15.0 // indirect
@@ -303,7 +300,6 @@ require (
303300
google.golang.org/genproto/googleapis/api v0.0.0-20250218202821-56aae31c358a // indirect
304301
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
305302
gopkg.in/yaml.v3 v3.0.1 // indirect
306-
gotest.tools/v3 v3.5.1 // indirect
307303
lukechampine.com/blake3 v1.3.0 // indirect
308304
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect
309305
modernc.org/libc v1.55.3 // indirect

0 commit comments

Comments
 (0)