Releases: hyperledger-labs/cc-tools
Releases · hyperledger-labs/cc-tools
v0.7.2
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
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 newgithub.com/hyperledger/fabric-chaincode-go
package. - We also moved the protobuf package from
github.com/hyperledger/fabric/protos
to the newgithub.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
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 newgithub.com/hyperledger/fabric-chaincode-go
package. - We also moved the protobuf package from
github.com/hyperledger/fabric/protos
to the newgithub.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
New Features
- Transaction
ReadAssetHistory
can now fetch asset's version from a specific point in time using thetimeTarget
argument. - The
shim.ChaincodeStubInterface
was wrapped to enable reading from entries not yet commited to ledger. - Types
assets.Asset
andassets.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.Update
now returnserrors.ICCError
instead of the standarderror
interface. - Transactions
CreateAsset
,UpdateAsset
andDeleteAsset
now must be explicitly included intxList
. - Transaction
DeleteAssetRecursive
is now integrated withDeleteAsset
with boolean argumentcascade
. - Transaction arguments referring to an asset type now should have a
->
before the type name. - Legacy support for
Validate
andKeyString
methods for custom data types were removed. shim.ChaincodeStubInterface
was changed tostubwrapper.StubWrapper
intransaction.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
andDeleteAsset
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 withtx.InitHeader
. Old format still works.
v0.7.0-rc.3
New Features
- Transaction
ReadAssetHistory
can now fetch asset's version from a specific point in time using thetimeTarget
argument. - The
shim.ChaincodeStubInterface
was wrapped to enable reading from entries not yet commited to ledger. - Types
assets.Asset
andassets.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.Update
now returnserrors.ICCError
instead of the standarderror
interface. - Transactions
CreateAsset
,UpdateAsset
andDeleteAsset
now must be explicitly included intxList
. - Transaction
DeleteAssetRecursive
is now integrated withDeleteAsset
with boolean argumentcascade
. - Transaction arguments referring to an asset type now should have a
->
before the type name. - Legacy support for
Validate
andKeyString
methods for custom data types were removed. shim.ChaincodeStubInterface
was changed tostubwrapper.StubWrapper
intransaction.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
andDeleteAsset
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 withtx.InitHeader
. Old format still works.
v0.7.0-rc.2
New Features
- Transaction
ReadAssetHistory
can now fetch asset's version from a specific point in time using thetimeTarget
argument. - The
shim.ChaincodeStubInterface
was wrapped to enable reading from entries not yet commited to ledger. - Types
assets.Asset
andassets.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.Update
now returnserrors.ICCError
instead of the standarderror
interface. - Transactions
CreateAsset
,UpdateAsset
andDeleteAsset
now must be explicitly included intxList
. - Transaction
DeleteAssetRecursive
is now integrated withDeleteAsset
with boolean argumentcascade
. - Transaction arguments referring to an asset type now should have a
->
before the type name. - Legacy support for
Validate
andKeyString
methods for custom data types were removed. shim.ChaincodeStubInterface
was changed tostubwrapper.StubWrapper
intransaction.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
andDeleteAsset
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 withtx.InitHeader
. Old format still works.
v0.7.0-rc.1
New Features
- Transaction
ReadAssetHistory
can now fetch asset's version from a specific point in time using thetimeTarget
argument. - The
shim.ChaincodeStubInterface
was wrapped to enable reading from entries not yet commited to ledger. - Types
assets.Asset
andassets.Key
now have a.JSON()
method to simplify marshaling.
Breaking Changes
- Method
asset.Update
now returnserrors.ICCError
instead of the standarderror
interface. - Transactions
CreateAsset
,UpdateAsset
andDeleteAsset
now must be explicitly included intxList
. - Transaction
DeleteAssetRecursive
is now integrated withDeleteAsset
with boolean argumentcascade
. - Transaction arguments referring to an asset type now should have a
->
before the type name. - Legacy support for
Validate
andKeyString
methods for custom data types were removed. shim.ChaincodeStubInterface
was changed tostubwrapper.StubWrapper
intransaction.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
andDeleteAsset
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 withtx.InitHeader
. Old format still works.
v0.6.9
Change update behavior to allow asset fixing after cc upgrade
v0.6.6
remove logs