Skip to content

Releases: hyperledger-labs/cc-tools

v0.7.2

08 Feb 03:10
bc12b84
Compare
Choose a tag to compare

New Features

  • New method Referrers to obtain all assets pointing to a particular asset.
  • Search is now available as a standalone method to make rich queries to CouchDB.
  • Transaction request timestamp is now embedded in asset data as @lastUpdated.
  • CommitedInLedger method enables checking asset existence in actual ledger state.

Breaking Changes

  • No breaking changes! Just need to update using the following inside your chaincode folder:
$ go get -d github.com/goledgerdev/[email protected]
$ go mod vendor

Bug Fixes & Improvements

  • Check for duplicate arg tags in transactions during startup.

v0.7.1

05 Aug 21:01
Compare
Choose a tag to compare

New Features

  • Automated tests! Coverage is not nearly complete but at least the basic features are now backed by automated tests with GitHub Actions integration.
  • Accessible commited state. On v0.7.0 we launched the stubwrapper package to make it easier to develop transactions with multiple Put calls that referenced each other. But if in any case you need access to the committed state of the ledger, the GetCommittedState method is now available too.

Breaking Changes

  • This is a minor update so there shouldn't be breaking changes, but...
  • We moved the chaincode SDK from github.com/hyperledger/fabric/core/chaincode to the new github.com/hyperledger/fabric-chaincode-go package.
  • We also moved the protobuf package from github.com/hyperledger/fabric/protos to the new github.com/hyperledger/fabric-protos-go.
  • To upgrade your chaincode from v0.7.0, replace both packages in your import declarations and run:
$ go mod tidy
$ go get -d github.com/goledgerdev/[email protected]
$ go mod vendor

If you get an error involving github.com/hyperledger/fabric/core/chaincode/lib/cid when running go mod tidy, substitute your cid.GetMSPID(stub) calls with stubwrapper.GetMSPID() calls and do it again.

Bug Fixes & Improvements

  • Read-only methods now give a clearer error message if the key is not properly initialized.
  • DeleteCascade now respect writer permissions.
  • The ExistsInLedger method is now available for the Asset object and the Delete and DeleteCascade methods are available for the Key object.

v0.7.1-rc.1

28 Jul 22:57
Compare
Choose a tag to compare
v0.7.1-rc.1 Pre-release
Pre-release

New Features

  • Automated tests! Coverage is not nearly complete but at least the basic features are now backed by automated tests with GitHub Actions integration.
  • Accessible commited state. On v0.7.0 we launched the stubwrapper package to make it easier to develop transactions with multiple Put calls that referenced each other. But if in any case you need access to the committed state of the ledger, the GetCommittedState method is now available too.

Breaking Changes

  • This is a minor update so there shouldn't be breaking changes, but...
  • We moved the chaincode SDK from github.com/hyperledger/fabric/core/chaincode to the new github.com/hyperledger/fabric-chaincode-go package.
  • We also moved the protobuf package from github.com/hyperledger/fabric/protos to the new github.com/hyperledger/fabric-protos-go.
  • To upgrade your chaincode, replace both packages in your import declarations and run:
$ go mod tidy
$ go get -d github.com/goledgerdev/[email protected]
$ go mod vendor

If you get an error involving github.com/hyperledger/fabric/core/chaincode/lib/cid when running go mod tidy, substitute your cid.GetMSPID(stub) calls with stubwrapper.GetMSPID() calls and do it again.

Bug Fixes & Improvements

  • Read-only methods now give a clearer error message if the key is not properly initialized.
  • DeleteCascade now respect writer permissions.
  • The ExistsInLedger method is now available for the Asset object and the Delete and DeleteCascade methods are available for the Key object.

v0.7.0

12 Jul 16:40
Compare
Choose a tag to compare

New Features

  • Transaction ReadAssetHistory can now fetch asset's version from a specific point in time using the timeTarget argument.
  • The shim.ChaincodeStubInterface was wrapped to enable reading from entries not yet commited to ledger.
  • Types assets.Asset and assets.Key now have a .JSON() method to simplify marshaling.
  • Asset history data is now improved with _txId and more consistent _isDelete metadata.
  • Last transaction name is now present in asset metadata as @lastTx.

Breaking Changes

  • Method asset.Updatenow returns errors.ICCError instead of the standard error interface.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset now must be explicitly included in txList.
  • Transaction DeleteAssetRecursive is now integrated with DeleteAsset with boolean argument cascade.
  • Transaction arguments referring to an asset type now should have a -> before the type name.
  • Legacy support for Validate and KeyString methods for custom data types were removed.
  • shim.ChaincodeStubInterface was changed to stubwrapper.StubWrapper in transaction.Routine signature.

Bug Fixes & Improvements

  • Fix method DeleteCascade failing on second deletion.
  • Method GetRecursive is now resilient to asset definition changes after chaincode upgrades.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset are now optional.
  • Invalid transaction argument types are now checked and will make chaincode instantiation fail.
  • Transaction GetHeader is now standard and should be initialized with tx.InitHeader. Old format still works.

v0.7.0-rc.3

21 Jun 15:29
Compare
Choose a tag to compare
v0.7.0-rc.3 Pre-release
Pre-release

New Features

  • Transaction ReadAssetHistory can now fetch asset's version from a specific point in time using the timeTarget argument.
  • The shim.ChaincodeStubInterface was wrapped to enable reading from entries not yet commited to ledger.
  • Types assets.Asset and assets.Key now have a .JSON() method to simplify marshaling.
  • Asset history data is now improved with _txId and more consistent _isDelete metadata.
  • Last transaction name is now present in asset metadata as @lastTx.

Breaking Changes

  • Method asset.Updatenow returns errors.ICCError instead of the standard error interface.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset now must be explicitly included in txList.
  • Transaction DeleteAssetRecursive is now integrated with DeleteAsset with boolean argument cascade.
  • Transaction arguments referring to an asset type now should have a -> before the type name.
  • Legacy support for Validate and KeyString methods for custom data types were removed.
  • shim.ChaincodeStubInterface was changed to stubwrapper.StubWrapper in transaction.Routine signature.

Bug Fixes & Improvements

  • Fix method DeleteCascade failing on second deletion.
  • Method GetRecursive is now resilient to asset definition changes after chaincode upgrades.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset are now optional.
  • Invalid transaction argument types are now checked and will make chaincode instantiation fail.
  • Transaction GetHeader is now standard and should be initialized with tx.InitHeader. Old format still works.

v0.7.0-rc.2

16 Jun 14:56
Compare
Choose a tag to compare
v0.7.0-rc.2 Pre-release
Pre-release

New Features

  • Transaction ReadAssetHistory can now fetch asset's version from a specific point in time using the timeTarget argument.
  • The shim.ChaincodeStubInterface was wrapped to enable reading from entries not yet commited to ledger.
  • Types assets.Asset and assets.Key now have a .JSON() method to simplify marshaling.
  • Asset history data is now improved with _txId and more consistent _isDelete metadata.
  • Last transaction name is now present in asset metadata as @lastTx.

Breaking Changes

  • Method asset.Updatenow returns errors.ICCError instead of the standard error interface.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset now must be explicitly included in txList.
  • Transaction DeleteAssetRecursive is now integrated with DeleteAsset with boolean argument cascade.
  • Transaction arguments referring to an asset type now should have a -> before the type name.
  • Legacy support for Validate and KeyString methods for custom data types were removed.
  • shim.ChaincodeStubInterface was changed to stubwrapper.StubWrapper in transaction.Routine signature.

Bug Fixes & Improvements

  • Fix method DeleteCascade failing on second deletion.
  • Method GetRecursive is now resilient to asset definition changes after chaincode upgrades.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset are now optional.
  • Invalid transaction argument types are now checked and will make chaincode instantiation fail.
  • Transaction GetHeader is now standard and should be initialized with tx.InitHeader. Old format still works.

v0.7.0-rc.1

11 Jun 18:33
Compare
Choose a tag to compare
v0.7.0-rc.1 Pre-release
Pre-release

New Features

  • Transaction ReadAssetHistory can now fetch asset's version from a specific point in time using the timeTarget argument.
  • The shim.ChaincodeStubInterface was wrapped to enable reading from entries not yet commited to ledger.
  • Types assets.Asset and assets.Key now have a .JSON() method to simplify marshaling.

Breaking Changes

  • Method asset.Updatenow returns errors.ICCError instead of the standard error interface.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset now must be explicitly included in txList.
  • Transaction DeleteAssetRecursive is now integrated with DeleteAsset with boolean argument cascade.
  • Transaction arguments referring to an asset type now should have a -> before the type name.
  • Legacy support for Validate and KeyString methods for custom data types were removed.
  • shim.ChaincodeStubInterface was changed to stubwrapper.StubWrapper in transaction.Routine signature.

Bug Fixes & Improvements

  • Fix method DeleteCascade failing on second deletion.
  • Method GetRecursive is now resilient to asset definition changes after chaincode upgrades.
  • Transactions CreateAsset, UpdateAsset and DeleteAsset are now optional.
  • Invalid transaction argument types are now checked and will make chaincode instantiation fail.
  • Transaction GetHeader is now standard and should be initialized with tx.InitHeader. Old format still works.

v0.6.9

20 Apr 13:54
Compare
Choose a tag to compare
Change update behavior to allow asset fixing after cc upgrade

v0.6.6

22 Feb 19:14
Compare
Choose a tag to compare
remove logs