Skip to content

feat(tokens): bump Panurus and Fabric Smart Client to v0.22.0 - #32

Closed
atharrva01 wants to merge 1 commit into
hyperledger:mainfrom
atharrva01:feature/issue-66-week5-dep-bump
Closed

atharrva01 wants to merge 1 commit into
hyperledger:mainfrom
atharrva01:feature/issue-66-week5-dep-bump

Conversation

@atharrva01

Copy link
Copy Markdown
Contributor

Summary

Issue #66 deliverable 1: bumps github.com/LFDT-Panurus/panurus and github.com/hyperledger-labs/fabric-smart-client from v0.18.0 to v0.22.0 (go get + go mod tidy, including the cmd/tokengen and fabric-smart-client/integration nested modules, which needed the same bump explicitly). Panurus v0.22.0 requires Go >= 1.27.1, so go.mod's go directive and both Dockerfiles' golang base image move to 1.27.1 too.

The Go API surface this repo actually calls is almost entirely unchanged between the two versions (confirmed by diffing every package this repo's source imports, file by file, before writing any code). The one exception is SignatureService.IsMe, which gained an error return (token/sig.go); its only call site, common/views/utils.go's AssertTokens, is updated to check it. The htlc package (#29, #30) is byte-identical between v0.18.0 and v0.22.0.

Two runtime-only breaks

Neither of these shows up in a Go API diff — both were only found by actually bringing the app up and exercising it end to end.

  • Fabric Smart Client v0.22.0 renamed its Fabric network TLS config schema. The flat per-peer tlsRootCertFile key is gone in favor of fabric.<network>.tls.rootCAs.files, inherited by every peers[]/orderers[] entry. The old key isn't rejected at startup: the node comes up healthy, and only the first real request fails, every time, with x509: certificate signed by unknown authority — the trust pool built from the unrecognized key is empty. Migrated all five conf-f3/*/core.yaml files. conf/ (fabricx/xdev) never used this key, so that platform is unaffected.
  • Panurus v0.22.0 added a storage guard that rejects unlimited pagination. GetTransactions passed pagination.None() (unchanged itself), but every read is now checked and None is explicitly rejected: 500: unlimited pagination (None) is not allowed. Fixed by requesting a single bounded page sized to the guard's own default cap (pagination.Offset(0, guard.DefaultMaxPageSize), 1000 rows), which preserves the existing "return everything" behavior for a sample-sized dataset. Real REST-level pagination for this endpoint is a separate, not-yet-chosen issue #66 deliverable.

Other changes

conf-f3/namespace/Dockerfile pins Panurus by git commit hash independently of go.mod (a git clone && git checkout <hash> for the fabric3 CCaaS chaincode build). Moved that hash to the v0.22.0 tag's commit, or the on-chain validator would silently run an older Panurus than the app.

fabric-x-common stays pinned at v0.2.8 after a full go mod tidy — the separate, already-known xdev configtxgen bug is unaffected by this change.

Test plan

Bumps github.com/LFDT-Panurus/panurus and github.com/hyperledger-labs/
fabric-smart-client from v0.18.0 to v0.22.0 (go get + go mod tidy,
including the cmd/tokengen and fabric-smart-client/integration nested
modules, which needed the same bump explicitly). Panurus v0.22.0
requires Go >= 1.27.1, so go.mod's go directive and both Dockerfiles'
golang base image move to 1.27.1 too.

The Go API surface this repo actually calls is almost entirely
unchanged; the one exception is SignatureService.IsMe, which gained an
error return (token/sig.go). Its only call site, common/views/utils.go's
AssertTokens, is updated to check it. The htlc package (Weeks 3-4) is
byte-identical between the two versions.

Two runtime-only issues surfaced by actually running the app, neither
visible from the Go API diff:

- Fabric Smart Client v0.22.0 renamed its Fabric network TLS config
  schema: the flat per-peer `tlsRootCertFile` key is gone in favor of
  `fabric.<network>.tls.rootCAs.files`, inherited by every peer/orderer
  entry. The old key isn't rejected at startup -- the node comes up
  healthy and every request then fails with "x509: certificate signed
  by unknown authority" the first time it dials the peer, because the
  trust pool FSC built from the unrecognized key is empty. Migrated all
  five conf-f3/*/core.yaml files. conf/ (fabricx/xdev) has no occurrences
  of the old key.

- Panurus v0.22.0 added a storage guard that rejects unlimited
  pagination. GetTransactions passed pagination.None() (unchanged
  itself), but the new guard now calls pagination.ValidateLimited on
  every read and rejects it: "unlimited pagination (None) is not
  allowed". Fixed by requesting a single bounded page sized to the
  guard's own default cap (pagination.Offset(0,
  guard.DefaultMaxPageSize)), which preserves the existing
  "return everything" behavior for a sample-sized dataset.

Also updates the fabric3 CCaaS chaincode's pinned Panurus commit
(conf-f3/namespace/Dockerfile) to the v0.22.0 tag, so the on-chain
validator and the app run the same driver version.

Verified: go build/go vet clean on the default and fabricx build tags;
a full clean PLATFORM=fabric3 ./scripts/test.sh run passes, including
the Week 4 HTLC block, transaction history, and the fabric3 CCaaS
chaincode rebuilt from source at the new pinned commit.

fabric-x-common stays at v0.2.8, so the separate, already-known xdev
configtxgen bug is unaffected by this change.

Signed-off-by: atharrva01 <atharvaborade568@gmail.com>
@atharrva01 atharrva01 closed this Sep 22, 2026
@atharrva01
atharrva01 deleted the feature/issue-66-week5-dep-bump branch September 22, 2026 07:38
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.

1 participant