Many users raise questions on how to test chaincode. It used
to be much easier with the old shim, as they could directly
use the old mock stub in the shim. Now that it no longer exists
the fabcar example can provide an example of how to test chaincode.
Also worth noting is our current directory structure of our Go
chaincodes prevents the creation of mocks due to import cycles.
This change also pushes the chaincode logic down into a `chaincode`
package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
Cleans up the code and pushes the smart contract
implementation down into a `chaincode` package.
This is in prep for implementing unit testing in the
chaincode, as you cannot mock code that is part of
the main package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
In Fabric v2.2, the gossip defaults are changed to make
peers org leaders instead of using leader election.
This change removes the config from the samples, so that
the samples simply inherit the new peer defaults.
This will simplify the sample configuration.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
Fabric 2.2 removes official support for CouchDB 2.x.
The migration to 3.1 was to address fsync issues
in the underlying storage implementation in Couch.
This change moves to CouchDB 3.1 which requires the
user to now set an admin identity at startup.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
- Update gradle version
- Switch to application plugin
(cc is started as an app not a lib, and java-library-distribution
is still incubating)
- make sure tests and coverage checks are run before installDist
Signed-off-by: James Taylor <jamest@uk.ibm.com>
- Add new generic asset transfer sample based on the existing marbles02 sample
- Add InitLedger() to create base assets
- Add AssetExists() to check for an assets existence in the world state
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
This patch adds missing config.yaml to msp folder for user1 in test-network
to make user1 work properly when using FabricCA.
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
- Move go chaincode to chaincode-go subdirectory
- Add public description argument to CreateAsset()
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
- Rename marbles_transfer to a more generic and streamlined asset
- Move sample to new directory
- Remove TODO for marbles by size query
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
In queryInstalled()
Removing line: echo PackageID is ${PACKAGE_ID}
the ```peer lifecycle chaincode queryinstalled``` cmd already prints the Package ID when successfull.
Signed-off-by: Rob Murgai <murgai@us.ibm.com>
`--tls` option of the peer command does not require any argument.
On the other hand, some scripts assign the arguments.
This patch deletes the unnecessary arguments.
Also, this patch fixes a minor problem on private data tutorial instructions
for base64 (Related to FAB-13777).
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
- Add query to verifies asset properties
- Delete price records from buyer and seller private data collections
when transfer is complete
- Add 'receipt' for asset transfer
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
To get rid of hard-coded versioning and use the latest version of fabric-ca
in test-network, this patch modifies the existence check logic of
the fabric-ca-client binary in the same way as peer and orderer.
Also, this patch updates addOrg3.sh to use cai <ca_imagetag> option.
Signed-off-by: Tatsuya Sato <Tatsuya.Sato@hal.hitachi.com>
Now that fabric-sdk-go beta2 has been released which contains the new programming model, update the dependency in the fabcar go sample
Signed-off-by: andrew-coleman <andrew_coleman@uk.ibm.com>
- Add marbles proposed sale and bid prices queries
- Add marbles history query
- Add verification of ownership when selling marble
Signed-off-by: Tiffany Harris <tiffany.harris@ibm.com>
Signed-off-by: Dereck Luo <dereckluo@gmail.com>
This updates the fabcar java application to work with the fabric
gateway java version 2.1.1.
It also changes pom.xml to produce a jar file that is self contained
for ease of use.
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
Nik has been the main source of progress in the fabric-samples
repository for several months, making significant improvements with
the introduction of test-network and updates of all the different
samples around it, among other things.
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>