Skip to content

Commit 0cd49b9

Browse files
chore(fabricx)!: Integrate fabric-x committer v0.1.7
Signed-off-by: Marcus Brandenburger <bur@zurich.ibm.com>
1 parent 5f48447 commit 0cd49b9

File tree

9 files changed

+226
-110
lines changed

9 files changed

+226
-110
lines changed

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ TOP = .
88
FABRIC_VERSION ?= 3.1.1
99
FABRIC_TWO_DIGIT_VERSION = $(shell echo $(FABRIC_VERSION) | cut -d '.' -f 1,2)
1010

11-
FABRIC_X_TOOLS_VERSION ?= v0.0.5
12-
FABRIC_X_COMMITTER_VERSION ?= 0.1.5
11+
FABRIC_X_TOOLS_VERSION ?= v0.0.6
12+
FABRIC_X_COMMITTER_VERSION ?= 0.1.7
1313

1414
# need to install fabric binaries outside of fsc tree for now (due to chaincode packaging issues)
1515
FABRIC_BINARY_BASE ?= $(PWD)/../fabric

go.mod

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ require (
2424
github.com/hyperledger/fabric-contract-api-go/v2 v2.2.0
2525
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5
2626
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7
27-
github.com/hyperledger/fabric-x-committer v0.1.5
28-
github.com/hyperledger/fabric-x-common v0.0.0-20250917075146-ac37a580bb6e
27+
github.com/hyperledger/fabric-x-committer v0.1.7
28+
github.com/hyperledger/fabric-x-common v0.0.0-20251023133631-047a3c32c228
2929
github.com/jackc/pgx/v5 v5.7.1
3030
github.com/jackc/pgxlisten v0.0.0-20241106001234-1d6f6656415c
3131
github.com/jaegertracing/jaeger-idl v0.6.0
@@ -38,7 +38,7 @@ require (
3838
github.com/onsi/gomega v1.38.2
3939
github.com/prometheus/client_golang v1.23.2
4040
github.com/spf13/cobra v1.8.1
41-
github.com/spf13/viper v1.20.1
41+
github.com/spf13/viper v1.21.0
4242
github.com/stretchr/testify v1.11.1
4343
github.com/tedsuo/ifrit v0.0.0-20230516164442-7862c310ad26
4444
github.com/uptrace/opentelemetry-go-extra/otelsql v0.3.2
@@ -112,7 +112,7 @@ require (
112112
github.com/felixge/httpsnoop v1.0.4 // indirect
113113
github.com/filecoin-project/go-clock v0.1.0 // indirect
114114
github.com/flynn/noise v1.1.0 // indirect
115-
github.com/fsnotify/fsnotify v1.8.0 // indirect
115+
github.com/fsnotify/fsnotify v1.9.0 // indirect
116116
github.com/gabriel-vasile/mimetype v1.4.10 // indirect
117117
github.com/getsentry/sentry-go v0.27.0 // indirect
118118
github.com/ghodss/yaml v1.0.0 // indirect
@@ -213,7 +213,7 @@ require (
213213
github.com/opencontainers/go-digest v1.0.0 // indirect
214214
github.com/opencontainers/image-spec v1.1.1 // indirect
215215
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 // indirect
216-
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
216+
github.com/pelletier/go-toml/v2 v2.2.4 // indirect
217217
github.com/pion/datachannel v1.5.10 // indirect
218218
github.com/pion/dtls/v2 v2.2.12 // indirect
219219
github.com/pion/dtls/v3 v3.0.6 // indirect
@@ -245,13 +245,13 @@ require (
245245
github.com/quic-go/webtransport-go v0.9.0 // indirect
246246
github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect
247247
github.com/rogpeppe/go-internal v1.14.1 // indirect
248-
github.com/sagikazarmark/locafero v0.7.0 // indirect
248+
github.com/sagikazarmark/locafero v0.11.0 // indirect
249249
github.com/sirupsen/logrus v1.9.3 // indirect
250-
github.com/sourcegraph/conc v0.3.0 // indirect
250+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 // indirect
251251
github.com/spaolacci/murmur3 v1.1.0 // indirect
252-
github.com/spf13/afero v1.12.0 // indirect
253-
github.com/spf13/cast v1.7.1 // indirect
254-
github.com/spf13/pflag v1.0.6 // indirect
252+
github.com/spf13/afero v1.15.0 // indirect
253+
github.com/spf13/cast v1.10.0 // indirect
254+
github.com/spf13/pflag v1.0.10 // indirect
255255
github.com/spiffe/go-spiffe/v2 v2.5.0 // indirect
256256
github.com/stretchr/objx v0.5.2 // indirect
257257
github.com/subosito/gotenv v1.6.0 // indirect
@@ -292,8 +292,8 @@ require (
292292
gonum.org/v1/gonum v0.16.0 // indirect
293293
google.golang.org/api v0.215.0 // indirect
294294
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 // indirect
295-
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 // indirect
296-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 // indirect
295+
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 // indirect
296+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f // indirect
297297
gopkg.in/yaml.v3 v3.0.1 // indirect
298298
lukechampine.com/blake3 v1.4.1 // indirect
299299
modernc.org/gc/v3 v3.0.0-20240107210532-573471604cb6 // indirect

go.sum

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -802,8 +802,8 @@ github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7z
802802
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
803803
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
804804
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
805-
github.com/fsnotify/fsnotify v1.8.0 h1:dAwr6QBTBZIkG8roQaJjGof0pp0EeF+tNV7YBP3F/8M=
806-
github.com/fsnotify/fsnotify v1.8.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
805+
github.com/fsnotify/fsnotify v1.9.0 h1:2Ml+OJNzbYCTzsxtv8vKSFD9PbJjmhYF14k/jKC7S9k=
806+
github.com/fsnotify/fsnotify v1.9.0/go.mod h1:8jBTzvmWwFyi3Pb8djgCCO5IBqzKJ/Jwo8TRcHyHii0=
807807
github.com/fsouza/go-dockerclient v1.12.0 h1:S2f2crEUbBNCFiF06kR/GvioEB8EMsb3Td/bpawD+aU=
808808
github.com/fsouza/go-dockerclient v1.12.0/go.mod h1:YWUtjg8japrqD/80L98nTtCoxQFp5B5wrSsnyeB5lFo=
809809
github.com/gabriel-vasile/mimetype v1.4.10 h1:zyueNbySn/z8mJZHLt6IPw0KoZsiQNszIpU+bX4+ZK0=
@@ -1049,10 +1049,10 @@ github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5 h1:RPW
10491049
github.com/hyperledger/fabric-lib-go v1.1.3-0.20240523144151-25edd1eaf5f5/go.mod h1:SHNCq8AB0VpHAmvJEtdbzabv6NNV1F48JdmDihasBjc=
10501050
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7 h1:sQ5qv8vQQfwewa1JlCiSCC8dLElmaU2/frLolpgibEY=
10511051
github.com/hyperledger/fabric-protos-go-apiv2 v0.3.7/go.mod h1:bJnwzfv03oZQeCc863pdGTDgf5nmCy6Za3RAE7d2XsQ=
1052-
github.com/hyperledger/fabric-x-committer v0.1.5 h1:G5GDVm+6z4tw7xbpUsZt7CHNw4PjstlYsltFZOWtFxc=
1053-
github.com/hyperledger/fabric-x-committer v0.1.5/go.mod h1:g1KiyxRmTJFee8xXaeT4WZ501IfxR1JnlGzMY4EcxRw=
1054-
github.com/hyperledger/fabric-x-common v0.0.0-20250917075146-ac37a580bb6e h1:0ZipVIJnz0O9VL4EtVnYGNeVM5EzgqeJ/Q44ZnL7MhY=
1055-
github.com/hyperledger/fabric-x-common v0.0.0-20250917075146-ac37a580bb6e/go.mod h1:nt9krLsa5b0fgOUs70dgmxr1jrLDf11I/GpUVggff94=
1052+
github.com/hyperledger/fabric-x-committer v0.1.7 h1:k/2Qas5etFpIE/qNZTQqEkDn/oHeI9omcjsNmApmN30=
1053+
github.com/hyperledger/fabric-x-committer v0.1.7/go.mod h1:aTwFOslAAXPPYCVDp7BT/LwcjcMfCiBgovrHam3sybs=
1054+
github.com/hyperledger/fabric-x-common v0.0.0-20251023133631-047a3c32c228 h1:JdVLvE5ExlHvGL2LuaX3IQLo+7ZExsJhPkDutmNCJEU=
1055+
github.com/hyperledger/fabric-x-common v0.0.0-20251023133631-047a3c32c228/go.mod h1:eztTd6MwzVOZtlWcOXWZepDBK/pQz3c3epu91BXAp6o=
10561056
github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47ZCWhYzw7ho=
10571057
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
10581058
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
@@ -1316,8 +1316,8 @@ github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgr
13161316
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
13171317
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58 h1:onHthvaw9LFnH4t2DcNVpwGmV9E1BkGknEliJkfwQj0=
13181318
github.com/pbnjay/memory v0.0.0-20210728143218-7b4eea64cf58/go.mod h1:DXv8WO4yhMYhSNPKjeNKa5WY9YCIEBRbNzFFPJbWO6Y=
1319-
github.com/pelletier/go-toml/v2 v2.2.3 h1:YmeHyLY8mFWbdkNWwpr+qIL2bEqT0o95WSdkNHvL12M=
1320-
github.com/pelletier/go-toml/v2 v2.2.3/go.mod h1:MfCQTFTvCcUyyvvwm1+G6H/jORL20Xlb6rzQu9GuUkc=
1319+
github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4=
1320+
github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY=
13211321
github.com/phpdave11/gofpdf v1.4.2/go.mod h1:zpO6xFn9yxo3YLyMvW8HcKWVdbNqgIfOOp2dXMnm1mY=
13221322
github.com/phpdave11/gofpdi v1.0.12/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
13231323
github.com/phpdave11/gofpdi v1.0.13/go.mod h1:vBmVV0Do6hSBHC8uKUQ71JGW+ZGQq74llk/7bXwjDoI=
@@ -1409,8 +1409,8 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
14091409
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
14101410
github.com/ruudk/golang-pdf417 v0.0.0-20181029194003-1af4ab5afa58/go.mod h1:6lfFZQK844Gfx8o5WFuvpxWRwnSoipWe/p622j1v06w=
14111411
github.com/ruudk/golang-pdf417 v0.0.0-20201230142125-a7e3863a1245/go.mod h1:pQAZKsJ8yyVxGRWYNEm9oFB8ieLgKFnamEyDmSA0BRk=
1412-
github.com/sagikazarmark/locafero v0.7.0 h1:5MqpDsTGNDhY8sGp0Aowyf0qKsPrhewaLSsFaodPcyo=
1413-
github.com/sagikazarmark/locafero v0.7.0/go.mod h1:2za3Cg5rMaTMoG/2Ulr9AwtFaIppKXTRYnozin4aB5k=
1412+
github.com/sagikazarmark/locafero v0.11.0 h1:1iurJgmM9G3PA/I+wWYIOw/5SyBtxapeHDcg+AAIFXc=
1413+
github.com/sagikazarmark/locafero v0.11.0/go.mod h1:nVIGvgyzw595SUSUE6tvCp3YYTeHs15MvlmU87WwIik=
14141414
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
14151415
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
14161416
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
@@ -1419,25 +1419,25 @@ github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N
14191419
github.com/smartystreets/assertions v1.2.0/go.mod h1:tcbTF8ujkAEcZ8TElKY+i30BzYlVhC/LOxJk7iOWnoo=
14201420
github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg=
14211421
github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM=
1422-
github.com/sourcegraph/conc v0.3.0 h1:OQTbbt6P72L20UqAkXXuLOj79LfEanQ+YQFNpLA9ySo=
1423-
github.com/sourcegraph/conc v0.3.0/go.mod h1:Sdozi7LEKbFPqYX2/J+iBAM6HpqSLTASQIKqDmF7Mt0=
1422+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8 h1:+jumHNA0Wrelhe64i8F6HNlS8pkoyMv5sreGx2Ry5Rw=
1423+
github.com/sourcegraph/conc v0.3.1-0.20240121214520-5f936abd7ae8/go.mod h1:3n1Cwaq1E1/1lhQhtRK2ts/ZwZEhjcQeJQ1RuC6Q/8U=
14241424
github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
14251425
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
14261426
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
14271427
github.com/spf13/afero v1.3.3/go.mod h1:5KUK8ByomD5Ti5Artl0RtHeI5pTF7MIDuXL3yY520V4=
14281428
github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I=
14291429
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
1430-
github.com/spf13/afero v1.12.0 h1:UcOPyRBYczmFn6yvphxkn9ZEOY65cpwGKb5mL36mrqs=
1431-
github.com/spf13/afero v1.12.0/go.mod h1:ZTlWwG4/ahT8W7T0WQ5uYmjI9duaLQGy3Q2OAl4sk/4=
1432-
github.com/spf13/cast v1.7.1 h1:cuNEagBQEHWN1FnbGEjCXL2szYEXqfJPbP2HNUaca9Y=
1433-
github.com/spf13/cast v1.7.1/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
1430+
github.com/spf13/afero v1.15.0 h1:b/YBCLWAJdFWJTN9cLhiXXcD7mzKn9Dm86dNnfyQw1I=
1431+
github.com/spf13/afero v1.15.0/go.mod h1:NC2ByUVxtQs4b3sIUphxK0NioZnmxgyCrfzeuq8lxMg=
1432+
github.com/spf13/cast v1.10.0 h1:h2x0u2shc1QuLHfxi+cTJvs30+ZAHOGRic8uyGTDWxY=
1433+
github.com/spf13/cast v1.10.0/go.mod h1:jNfB8QC9IA6ZuY2ZjDp0KtFO2LZZlg4S/7bzP6qqeHo=
14341434
github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
14351435
github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
14361436
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1437-
github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
1438-
github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1439-
github.com/spf13/viper v1.20.1 h1:ZMi+z/lvLyPSCoNtFCpqjy0S4kPbirhpTMwl8BkW9X4=
1440-
github.com/spf13/viper v1.20.1/go.mod h1:P9Mdzt1zoHIG8m2eZQinpiBjo6kCmZSKBClNNqjJvu4=
1437+
github.com/spf13/pflag v1.0.10 h1:4EBh2KAYBwaONj6b2Ye1GiHfwjqyROoF4RwYO+vPwFk=
1438+
github.com/spf13/pflag v1.0.10/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
1439+
github.com/spf13/viper v1.21.0 h1:x5S+0EU27Lbphp4UKm1C+1oQO+rKx36vfCoaVebLFSU=
1440+
github.com/spf13/viper v1.21.0/go.mod h1:P0lhsswPGWD/1lZJ9ny3fYnVqxiegrlNrEmgLjbTCAY=
14411441
github.com/spiffe/go-spiffe/v2 v2.5.0 h1:N2I01KCUkv1FAjZXJMwh95KK1ZIQLYbPfhaxw8WS0hE=
14421442
github.com/spiffe/go-spiffe/v2 v2.5.0/go.mod h1:P+NxobPc6wXhVtINNtFjNWGBTreew1GBUCwT2wPmb7g=
14431443
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
@@ -2221,10 +2221,10 @@ google.golang.org/genproto v0.0.0-20230331144136-dcfb400f0633/go.mod h1:UUQDJDOl
22212221
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
22222222
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697 h1:ToEetK57OidYuqD4Q5w+vfEnPvPpuTwedCNVohYJfNk=
22232223
google.golang.org/genproto v0.0.0-20241118233622-e639e219e697/go.mod h1:JJrvXBWRZaFMxBufik1a4RpFw4HhgVtBBWQeQgUj2cc=
2224-
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5 h1:BIRfGDEjiHRrk0QKZe3Xv2ieMhtgRGeLcZQ0mIVn4EY=
2225-
google.golang.org/genproto/googleapis/api v0.0.0-20250825161204-c5933d9347a5/go.mod h1:j3QtIyytwqGr1JUDtYXwtMXWPKsEa5LtzIFN1Wn5WvE=
2226-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5 h1:eaY8u2EuxbRv7c3NiGK0/NedzVsCcV6hDuU5qPX5EGE=
2227-
google.golang.org/genproto/googleapis/rpc v0.0.0-20250825161204-c5933d9347a5/go.mod h1:M4/wBTSeyLxupu3W3tJtOgB14jILAS/XWPSSa3TAlJc=
2224+
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8 h1:mepRgnBZa07I4TRuomDE4sTIYieg/osKmzIf4USdWS4=
2225+
google.golang.org/genproto/googleapis/api v0.0.0-20251022142026-3a174f9686a8/go.mod h1:fDMmzKV90WSg1NbozdqrE64fkuTv6mlq2zxo9ad+3yo=
2226+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f h1:1FTH6cpXFsENbPR5Bu8NQddPSaUUE6NA2XdZdDSAJK4=
2227+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251014184007-4626949a642f/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
22282228
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
22292229
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
22302230
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=

platform/fabricx/core/committer/v3/test_utils.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ package v3
88

99
const (
1010
CommitterVersion = "v3"
11-
ScalableCommitterImage = "hyperledger/fabric-x-committer-test-node:0.1.5"
11+
ScalableCommitterImage = "hyperledger/fabric-x-committer-test-node:0.1.7"
1212
SidecarDefaultPort = "4001/tcp"
1313
QueryServiceDefaultPort = "7001/tcp"
1414
)

platform/fabricx/core/transaction/marshal.go

Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package transaction
88

99
import (
1010
"encoding/json"
11-
"fmt"
1211

12+
"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/errors"
1313
"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/proto"
1414
"github.com/hyperledger-labs/fabric-smart-client/platform/fabric/core/generic/fabricutils"
1515
cb "github.com/hyperledger/fabric-protos-go-apiv2/common"
@@ -21,30 +21,31 @@ import (
2121
func (t *Transaction) createSCEnvelope() (*cb.Envelope, error) {
2222
logger.Debugf("generate envelope with sc transaction [txID=%s]", t.ID())
2323

24-
rawTx, err := t.Results()
24+
resps, err := t.ProposalResponses()
2525
if err != nil {
26-
return nil, fmt.Errorf("failed to get rws from proposal response: %w", err)
26+
return nil, errors.Wrap(err, "getting proposal responses")
27+
}
28+
29+
// TODO: pick the correct signed proposal response; currently we assume "the last" response is the correct one
30+
// Note that this will be changed once the committer-x fully supports msp-based endorsement policies
31+
if len(resps) < 1 {
32+
return nil, errors.Errorf("number of responses must be larger than 0, actual %d", len(resps))
2733
}
34+
response := resps[len(resps)-1]
35+
rawTx := response.Results()
2836

29-
// append signatures to tx
3037
var tx protoblocktx.Tx
3138
if err := proto.Unmarshal(rawTx, &tx); err != nil {
32-
return nil, fmt.Errorf("failed to deserialize tx [%s]: %w", t.ID(), err)
39+
return nil, errors.Wrapf(err, "unmarshal tx [txID=%s]", t.ID())
3340
}
3441

35-
// for _, response := range t.ProposalResponses() {
36-
// tx.Signatures = append(tx.Signatures, response.EndorserSignature())
37-
// //tx.Signatures = append(tx.Signatures, []byte{1, 2, 3, 4, 5, 6, 7, 8, 9, 10})
38-
// }
39-
40-
// just take the first one as we only support single signatures, which are meant to be threshold signatures
41-
resps, err := t.ProposalResponses()
42-
if err != nil {
43-
return nil, err
42+
var sigs [][]byte
43+
if err := json.Unmarshal(response.EndorserSignature(), &sigs); err != nil {
44+
return nil, errors.Wrap(err, "unmarshal endorser signatures")
4445
}
4546

46-
response := resps[len(resps)-1]
47-
tx.Signatures = [][]byte{response.EndorserSignature()}
47+
// attaching signatures to transactions
48+
tx.Signatures = sigs
4849

4950
if logger.IsEnabledFor(zapcore.DebugLevel) {
5051
str, _ := json.MarshalIndent(&tx, "", "\t")
@@ -53,21 +54,19 @@ func (t *Transaction) createSCEnvelope() (*cb.Envelope, error) {
5354

5455
rawTx, err = proto.Marshal(&tx)
5556
if err != nil {
56-
return nil, fmt.Errorf("failed to marshal tx [%s]", t.ID())
57+
return nil, errors.Wrapf(err, "marshal tx [txID=%s]", t.ID())
5758
}
5859

5960
// produce the envelope and sign it
6061
signerID := t.Creator()
6162
signer, err := t.fns.SignerService().GetSigner(signerID)
6263
if err != nil {
63-
e := fmt.Errorf("signer not found for %s while creating tx envelope for ordering: %w", signerID.UniqueID(), err)
64-
logger.Error(e)
65-
return nil, e
64+
return nil, errors.Wrapf(err, "signer not found for %s while creating tx envelope for ordering", signerID.UniqueID())
6665
}
6766

6867
signatureHeader := &cb.SignatureHeader{Creator: signerID, Nonce: t.Nonce()}
6968
channelHeader := protoutil.MakeChannelHeader(cb.HeaderType_MESSAGE, 0, t.Channel(), 0)
70-
channelHeader.TxId = protoutil.ComputeTxID(signatureHeader.Nonce, signatureHeader.Creator)
69+
channelHeader.TxId = t.ID()
7170
header := &cb.Header{
7271
ChannelHeader: protoutil.MarshalOrPanic(channelHeader),
7372
SignatureHeader: protoutil.MarshalOrPanic(signatureHeader),

0 commit comments

Comments
 (0)