Skip to content

add test for go chaincode in fabric v3 and bump tools version to 3.1.3#661

Open
arner wants to merge 2 commits intohyperledger-labs:mainfrom
arner:go-chaincode
Open

add test for go chaincode in fabric v3 and bump tools version to 3.1.3#661
arner wants to merge 2 commits intohyperledger-labs:mainfrom
arner:go-chaincode

Conversation

@arner
Copy link
Contributor

@arner arner commented Feb 7, 2026

The updated test in this PR (which adds a go chaincode to fabric 3) fails because the fabric tools image version 3.1.3 does not exist (yet?). But it also fails if you use fabric-tools:3.0.0, because it cannot build go chaincode.

To make this test work locally:

git clone git@github.com:arner/fabric-tools.git
git checkout go
./build.sh

And in this repo, run the docker test-05-v3.sh.

I don't know if you agree with this approach and how you would like to manage versions of fabric tools, so please let me know if you'd like me to change anything (or feel free to edit my PR directly).

The pull request for the updated docker image is here: fablo-io/fabric-tools#1.

Copy link
Contributor

@umegbewe umegbewe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! @arner

const below3_0_0 = (v: string) => (v.startsWith("3.") ? "2.5" : v);

const is_or_above3_0_0 = (v: string) => (v.startsWith("3.") ? "3.0.0" : v);
const is_or_above3_0_0 = (v: string) => (v.startsWith("3.") ? "3.1.3" : v);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't sure about this one. Even though I added "fabricToolsVersion" to the sample config for that network, it's ignored because fablo now always uses 3.1.3. Maybe you'd prefer to make it possible for the user to override the value?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @arner, great suggestion it has been in the works.
In #662 we implemented support for user defined fabric images (this includes the tools image), will be available soon.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @arner, this PR is good to go after the merge conflicts are resolved.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @umegbewe , I'll see what I can do! Getting an error now, not sure yet where it comes from but will try again later.

Creating channelTx for my-channel1...
   CONFIG_PATH: /home/runner/work/fablo/fablo/e2e-network/docker/test-01-v3-simple.sh.tmpdir/fablo-target/fabric-config 
   CONFIG_PROFILE: MyChannel1 
   OUTPUT_PATH: /home/runner/work/fablo/fablo/e2e-network/docker/test-01-v3-simple.sh.tmpdir/fablo-target/fabric-config/config 
   CHANNEL_TX_PATH: /home/runner/work/fablo/fablo/e2e-network/docker/test-01-v3-simple.sh.tmpdir/fablo-target/fabric-config/config/my-channel1.pb 
2026-02-26 14:39:15.151 UTC 0001 INFO [common.tools.configtxgen] main -> Loading configuration
2026-02-26 14:39:15.153 UTC 0002 INFO [common.tools.configtxgen.localconfig] completeInitialization -> orderer type: BFT
2026-02-26 14:39:15.153 UTC 0003 INFO [common.tools.configtxgen.localconfig] Load -> Loaded configuration: /fabric-config/configtx.yaml
2026-02-26 14:39:15.153 UTC 0004 FATA [common.tools.configtxgen] main -> Error on outputBlock: could not create bootstrapper: could not create channel group: could not create orderer group: cannot load consenter config for orderer type BFT: cannot load client cert for consenter orderer0.group1.orderer.example.com:7030: open /fabric-config/crypto-config/peerOrganizations/orderer.example.com/peers/orderer0.group1.orderer.example.com/tls/server.crt: no such file or directory

Signed-off-by: Arne Rutjes <arne123@gmail.com>
Signed-off-by: Arne Rutjes <arne123@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants