Repository navigation
feat(tokens): bump Panurus and Fabric Smart Client to v0.22.0 - #32
Closed
atharrva01 wants to merge 1 commit into
Closed
atharrva01 wants to merge 1 commit into
atharrva01 wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Issue #66 deliverable 1: bumps
github.com/LFDT-Panurus/panurusandgithub.com/hyperledger-labs/fabric-smart-clientfrom v0.18.0 to v0.22.0 (go get+go mod tidy, including thecmd/tokengenandfabric-smart-client/integrationnested modules, which needed the same bump explicitly). Panurus v0.22.0 requires Go >= 1.27.1, sogo.mod'sgodirective and both Dockerfiles'golangbase 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'sAssertTokens, is updated to check it. Thehtlcpackage (#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.
tlsRootCertFilekey is gone in favor offabric.<network>.tls.rootCAs.files, inherited by everypeers[]/orderers[]entry. The old key isn't rejected at startup: the node comes up healthy, and only the first real request fails, every time, withx509: certificate signed by unknown authority— the trust pool built from the unrecognized key is empty. Migrated all fiveconf-f3/*/core.yamlfiles.conf/(fabricx/xdev) never used this key, so that platform is unaffected.GetTransactionspassedpagination.None()(unchanged itself), but every read is now checked andNoneis 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/Dockerfilepins Panurus by git commit hash independently ofgo.mod(agit 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-commonstays pinned atv0.2.8after a fullgo mod tidy— the separate, already-known xdevconfigtxgenbug is unaffected by this change.Test plan
go build/go vetclean on both the default andfabricxbuild tagsPLATFORM=fabric3 ./scripts/test.shpasses: issue/transfer/redeem, transaction history, and the full HTLC block (feat(tokens): add HTLC lock, claim, and reclaim service layer #29/feat(tokens): add HTLC lock, claim and reclaim REST endpoints #30), with the fabric3 CCaaS chaincode rebuilt from source at the new pinned commit