Skip to content

Commit 0a47711

Browse files
[BREAKING] fxconfig: Integrate committer v0.1.8 (#50)
#### Type of change - Dependency update - Integration test with committer test container - Breaking change #### Description This PR integrates the latest release of the fabric-x committer v0.1.8. While most changes are under the hood, the main user facing change is the naming of the `--pk` flag into `--policy-ecdsa-threshold`. Moreover, this PR introduces an integration test using the committer test container. Changes to `configtxgen`, `configtxlator`, and `cryptogen` are pulled from fabric-x-common and needed to make these tools work again. #### Related issues Resolves #54 --------- Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
1 parent 898e185 commit 0a47711

30 files changed

Lines changed: 2703 additions & 1066 deletions

.github/workflows/tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,8 @@ jobs:
2525
with:
2626
go-version-file: go.mod
2727

28+
- name: Generate test artifacts
29+
run: make generate
30+
2831
- name: Run unit tests
2932
run: make test

.golangci.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#
21
# Copyright IBM Corp. All Rights Reserved.
32
#
43
# SPDX-License-Identifier: Apache-2.0
54
#
6-
75
version: "2"
86
linters:
97
enable:
@@ -53,6 +51,10 @@ linters:
5351
deny:
5452
- pkg: github.com/pkg/errors
5553
desc: github.com/pkg/errors is no longer maintained
54+
staticcheck:
55+
checks:
56+
- all
57+
- "-ST1000" # Disable ST1000: "should have a package comment"
5658
errcheck:
5759
# Report about not checking of errors in type assertions: `a := b.(MyStruct)`.
5860
# Such cases aren't reported by default.
@@ -144,6 +146,9 @@ linters:
144146
arguments:
145147
- fmt.Printf
146148
- fmt.Println
149+
- strings.Builder.WriteString
150+
- strings.Builder.WriteByte
151+
- strings.Builder.Write
147152
- name: confusing-naming
148153
disabled: true
149154
- name: comment-spacings
@@ -176,7 +181,7 @@ linters:
176181
- .Wrapf(
177182
- status.Error(
178183
- .Wait() # The error reported by errorgroup.Wait() (external) actually
179-
# originates from the internal code.
184+
# originates from the internal code.
180185
# An array of strings that specify regular expressions of signatures to ignore.
181186
# Default: []
182187
ignore-sig-regexps:
@@ -194,6 +199,8 @@ linters:
194199
195200
SPDX-License-Identifier: Apache-2.0
196201
exclusions:
202+
paths:
203+
- protolator
197204
# Mode of the generated files analysis.
198205
#
199206
# - `strict`: sources are excluded by strictly following the Go generated file convention.
@@ -204,7 +211,7 @@ linters:
204211
# - `disable`: disable the generated files exclusion.
205212
#
206213
# Default: lax
207-
generated: lax
214+
generated: strict
208215
# Log a warning if an exclusion rule is unused.
209216
# Default: false
210217
warn-unused: true
@@ -224,6 +231,10 @@ formatters:
224231
# with the given prefixes are grouped after 3rd-party packages.
225232
# Default: ""
226233
local-prefixes:
227-
- github.com/hyperledger/fabric-x-common
234+
- github.com/hyperledger/fabric-x
228235
exclusions:
229236
generated: lax
237+
sort-order:
238+
- file # filepath, line, and column.
239+
- severity
240+
- linter

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ tools: $(TOOLS_EXES) ## Builds all tools
4141

4242
GO_TEST_FMT_FLAGS := -hide empty-packages
4343

44+
## Run generate
45+
.PHONY: generate
46+
generate: FORCE
47+
go generate ./...
48+
4449
## Run all tests
4550
.PHONY: test
4651
test: FORCE

go.mod

Lines changed: 64 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,31 @@
55

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

8-
go 1.24.3
8+
go 1.25.5
99

10-
toolchain go1.24.6
10+
tool (
11+
github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt
12+
github.com/hyperledger/fabric-x-common/cmd/configtxgen
13+
github.com/hyperledger/fabric-x-common/cmd/cryptogen
14+
)
1115

1216
require (
17+
github.com/alecthomas/kingpin/v2 v2.4.0
18+
github.com/cockroachdb/errors v1.12.0
1319
github.com/gorilla/handlers v1.5.1
14-
github.com/hyperledger/fabric-config v0.3.0
1520
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5
1621
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7
17-
github.com/hyperledger/fabric-x-committer v0.1.7
18-
github.com/hyperledger/fabric-x-common v0.0.0-20251023133631-047a3c32c228
19-
github.com/pkg/errors v0.9.1
20-
github.com/spf13/cobra v1.8.1
22+
github.com/hyperledger/fabric-x-committer v0.1.8
23+
github.com/hyperledger/fabric-x-common v0.1.0
24+
github.com/spf13/cobra v1.10.2
2125
github.com/stretchr/testify v1.11.1
22-
golang.org/x/text v0.28.0
23-
google.golang.org/protobuf v1.36.10
24-
gopkg.in/alecthomas/kingpin.v2 v2.2.6
25-
gopkg.in/yaml.v2 v2.4.0
26+
github.com/testcontainers/testcontainers-go v0.40.0
27+
golang.org/x/text v0.33.0
28+
google.golang.org/protobuf v1.36.11
2629
)
2730

2831
require (
29-
github.com/AdaLogics/go-fuzz-headers v0.0.0-20230811130428-ced1acdcaa24 // indirect
32+
dario.cat/mergo v1.0.2 // indirect
3033
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
3134
github.com/IBM/idemix v0.0.2-0.20240913182345-72941a5f41cd // indirect
3235
github.com/IBM/idemix/bccsp/schemes/aries v0.0.0-20240913182345-72941a5f41cd // indirect
@@ -35,32 +38,42 @@ require (
3538
github.com/IBM/mathlib v0.0.3-0.20250709075152-a138079496c3 // indirect
3639
github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible // indirect
3740
github.com/Microsoft/go-winio v0.6.2 // indirect
38-
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
39-
github.com/alecthomas/units v0.0.0-20240626203959-61d1e3462e30 // indirect
41+
github.com/alecthomas/units v0.0.0-20240927000941-0f3dac36c52b // indirect
4042
github.com/beorn7/perks v1.0.1 // indirect
4143
github.com/bits-and-blooms/bitset v1.20.0 // indirect
4244
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
45+
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
4346
github.com/cespare/xxhash/v2 v2.3.0 // indirect
44-
github.com/cockroachdb/errors v1.11.3 // indirect
4547
github.com/cockroachdb/logtags v0.0.0-20230118201751-21c54148d20b // indirect
4648
github.com/cockroachdb/redact v1.1.5 // indirect
47-
github.com/consensys/gnark-crypto v0.18.1 // indirect
49+
github.com/consensys/gnark-crypto v0.19.2 // indirect
50+
github.com/containerd/errdefs v1.0.0 // indirect
51+
github.com/containerd/errdefs/pkg v0.3.0 // indirect
4852
github.com/containerd/log v0.1.0 // indirect
53+
github.com/containerd/platforms v0.2.1 // indirect
54+
github.com/cpuguy83/dockercfg v0.3.2 // indirect
4955
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
50-
github.com/docker/docker v28.0.0+incompatible // indirect
51-
github.com/docker/go-connections v0.5.0 // indirect
56+
github.com/distribution/reference v0.6.0 // indirect
57+
github.com/docker/docker v28.5.2+incompatible // indirect
58+
github.com/docker/go-connections v0.6.0 // indirect
5259
github.com/docker/go-units v0.5.0 // indirect
60+
github.com/ebitengine/purego v0.8.4 // indirect
5361
github.com/felixge/httpsnoop v1.0.4 // indirect
5462
github.com/fsnotify/fsnotify v1.9.0 // indirect
55-
github.com/fsouza/go-dockerclient v1.12.0 // indirect
63+
github.com/fsouza/go-dockerclient v1.12.3 // indirect
5664
github.com/getsentry/sentry-go v0.27.0 // indirect
65+
github.com/go-logr/logr v1.4.3 // indirect
66+
github.com/go-logr/stdr v1.2.2 // indirect
67+
github.com/go-ole/go-ole v1.2.6 // indirect
5768
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
5869
github.com/gogo/protobuf v1.3.2 // indirect
5970
github.com/golang/protobuf v1.5.4 // indirect
6071
github.com/google/go-cmp v0.7.0 // indirect
72+
github.com/google/uuid v1.6.0 // indirect
6173
github.com/gorilla/mux v1.8.1 // indirect
6274
github.com/gotesttools/gotestfmt/v2 v2.5.0 // indirect
6375
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
76+
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.4 // indirect
6477
github.com/hyperledger-labs/SmartBFT v0.0.0-20250503203013-eb005eef8866 // indirect
6578
github.com/hyperledger/aries-bbs-go v0.0.0-20240528084656-761671ea73bc // indirect
6679
github.com/hyperledger/fabric-amcl v0.0.0-20230602173724-9e02669dceb2 // indirect
@@ -74,30 +87,36 @@ require (
7487
github.com/jackc/pgtype v1.14.3 // indirect
7588
github.com/jackc/puddle v1.3.0 // indirect
7689
github.com/kilic/bls12-381 v0.1.0 // indirect
77-
github.com/klauspost/compress v1.17.10 // indirect
90+
github.com/klauspost/compress v1.18.0 // indirect
7891
github.com/kr/pretty v0.3.1 // indirect
7992
github.com/kr/text v0.2.0 // indirect
93+
github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 // indirect
94+
github.com/magiconair/properties v1.8.10 // indirect
8095
github.com/miekg/pkcs11 v1.1.1 // indirect
8196
github.com/mitchellh/mapstructure v1.5.0 // indirect
8297
github.com/moby/docker-image-spec v1.3.1 // indirect
98+
github.com/moby/go-archive v0.1.0 // indirect
8399
github.com/moby/patternmatcher v0.6.0 // indirect
84100
github.com/moby/sys/sequential v0.6.0 // indirect
85-
github.com/moby/sys/user v0.3.0 // indirect
101+
github.com/moby/sys/user v0.4.0 // indirect
86102
github.com/moby/sys/userns v0.1.0 // indirect
87103
github.com/moby/term v0.5.0 // indirect
88104
github.com/morikuni/aec v1.0.0 // indirect
89105
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
90-
github.com/onsi/gomega v1.34.2 // indirect
106+
github.com/onsi/gomega v1.38.2 // indirect
91107
github.com/opencontainers/go-digest v1.0.0 // indirect
92-
github.com/opencontainers/image-spec v1.1.0 // indirect
108+
github.com/opencontainers/image-spec v1.1.1 // indirect
93109
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
110+
github.com/pkg/errors v0.9.1 // indirect
94111
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
112+
github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c // indirect
95113
github.com/prometheus/client_golang v1.20.5 // indirect
96114
github.com/prometheus/client_model v0.6.1 // indirect
97115
github.com/prometheus/common v0.60.0 // indirect
98116
github.com/prometheus/procfs v0.15.1 // indirect
99-
github.com/rogpeppe/go-internal v1.13.1 // indirect
117+
github.com/rogpeppe/go-internal v1.14.1 // indirect
100118
github.com/sagikazarmark/locafero v0.11.0 // indirect
119+
github.com/shirou/gopsutil/v4 v4.25.6 // indirect
101120
github.com/sirupsen/logrus v1.9.3 // indirect
102121
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
103122
github.com/spf13/afero v1.15.0 // indirect
@@ -106,19 +125,30 @@ require (
106125
github.com/spf13/viper v1.21.0 // indirect
107126
github.com/subosito/gotenv v1.6.0 // indirect
108127
github.com/sykesm/zap-logfmt v0.0.4 // indirect
128+
github.com/tklauser/go-sysconf v0.3.12 // indirect
129+
github.com/tklauser/numcpus v0.6.1 // indirect
130+
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
109131
github.com/yugabyte/pgx/v4 v4.14.8 // indirect
132+
github.com/yusufpapurcu/wmi v1.2.4 // indirect
133+
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
134+
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.61.0 // indirect
135+
go.opentelemetry.io/otel v1.40.0 // indirect
136+
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.40.0 // indirect
137+
go.opentelemetry.io/otel/metric v1.40.0 // indirect
138+
go.opentelemetry.io/otel/sdk v1.40.0 // indirect
139+
go.opentelemetry.io/otel/sdk/metric v1.40.0 // indirect
140+
go.opentelemetry.io/otel/trace v1.40.0 // indirect
141+
go.opentelemetry.io/proto/otlp v1.9.0 // indirect
110142
go.uber.org/multierr v1.11.0 // indirect
111143
go.uber.org/zap v1.27.0 // indirect
112144
go.yaml.in/yaml/v3 v3.0.4 // indirect
113-
golang.org/x/crypto v0.41.0 // indirect
114-
golang.org/x/exp v0.0.0-20241004190924-225e2abe05e6 // indirect
115-
golang.org/x/net v0.43.0 // indirect
116-
golang.org/x/sync v0.16.0 // indirect
117-
golang.org/x/sys v0.35.0 // indirect
118-
golang.org/x/time v0.5.0 // indirect
119-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect
120-
google.golang.org/grpc v1.75.0 // indirect
145+
golang.org/x/crypto v0.47.0 // indirect
146+
golang.org/x/net v0.49.0 // indirect
147+
golang.org/x/sync v0.19.0 // indirect
148+
golang.org/x/sys v0.40.0 // indirect
149+
golang.org/x/time v0.14.0 // indirect
150+
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
121153
gopkg.in/yaml.v3 v3.0.1 // indirect
122154
)
123-
124-
tool github.com/gotesttools/gotestfmt/v2/cmd/gotestfmt

0 commit comments

Comments
 (0)