* fixed json dependencies for java
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* updated dependency for asset-tranfer-sbe: now declaing also org.hyperledger.fabric.protos.common
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* "corrected typo of last commit and added testImplementation 'org.hyperledger.fabric.protos.common'"
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* included correct dependecy for fabric-protos and added com.google.protobuf as well
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
It's been some time since I've had the cycles available to review
anything here, so removing myself.
Signed-off-by: Jason Yellick <jason-github@unaddressable.org>
Test network Nano bash provides a set of minimal bash scripts
to run a Fabric network on your local machine.
The network is functionally equivalent to the docker-based Test Network,
you can therefore run all the tutorials and samples that target the Test Network.
The Fabric release binaries are utilized rather than using docker containers
to avoid all unnecessary layers. Only the chaincode and chaincode builder
runs in a docker container behind the scenes.
Using the Fabric binaries also makes it simple for Fabric developers
to iteratively and quickly modify Fabric code and test a Fabric network as a user.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* change docker-compose version from 2 to 2.4 on folder addOrg3/docker
Signed-off-by: Saliou <boomse@hotmail.fr>
* changing all docker-compose version from 2 to 2.4 under addOrg3/docker
Signed-off-by: Saliou <boomse@hotmail.fr>
Co-authored-by: Saliou <admin@example.com>
Docker version 20.10 support rootless mode. That features
changes a mount path of docker.sock.
This PR loads a mount path from DOCKER_HOST environment,
and if not set, a mount path will be /var/run/docker.sock
FAB-18481
Signed-off-by: Nao Nishijima <nao.nishijima.xt@hitachi.com>
The Golang and Java sample chaincode returned an error when trying to create an asset which already exists
JavaScript and TypeScript samples should now do the same
Signed-off-by: James Taylor <jamest@uk.ibm.com>
The off_chain_data sample fails to put data to the off-chain
database. The application does not read fetched blocks because
it uses the old interface of `addBlockListener()` to handle
block events.
This PR fixes the application to use the latest block listener
and build the off-chain database.
Signed-off-by: Yuki Kondo <yuki.kondo.ob@hitachi.com>
- In CreateAsset, await was never called on putState causing issues
especially with tools such as caliper and is not correct practice.
Unfortunately all the other examples use `return` which works but is
actually not the idiomatic way of handling promises, so here await is
chosen rather than return
Signed-off-by: D <d_kelsey@uk.ibm.com>
Co-authored-by: D <d_kelsey@uk.ibm.com>
Peers and Orderers by default disable Go pprof profiling, however test
network was enabling pprof in peers by default. As a good practice,
pprof should be disabled by default and only enabled when needed
for debug profiling.
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
* Enable TLS on asset-transfer-basic external chaincode
1. Introduce environment variables to enable or disable TLS
at runtime. Also, introduce environment variables which carries
the server key, cert and the client machine's root CA cert
information.
2. Read the environment variables to decide with appropriate
assumptions on default values to work as is today.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
* Update the chaincode.env with new options
1. Introduce four new environment variables to the default
chaincode environment file.
2. Add two new environment files for easy/automation running
of the external chaincodes for different organizations.
Note that when TLS enabled, the package contents will change.
So each organization will have their own package ID
generated unlike earlier. Also, there will be two chaincode
containers running instead of one for the given example.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
* Add docker compose file for running chaincodes
The file will build and run the chaincode on the fly.
Also, it will make use of the available files which is
configured by the user as part of execution. This will
help in bringup/bringdown of the chaincode containers.
In addition, it will help in updating the environment
variables on the go.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
* Introduce crypto directory and ignore the pem contents
The directory is used by the docker-compose file for
automation. Instructions in the README.md file will
suffice the filling up of required files in this directory.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
* Instructions on TLS enabled external chaincode server
1. Add instructions to generate a chaincode server TLS
parameters.
2. Add instructions on different parameters that peer node
expects and the chaincode expects.
3. Add instructions on steps to be followed in asset-transfer
-basic to work with iTLS enabled exteral chaincode.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
* Enable chaincode to work without TLS as well
1. Root certificate is an optional parameter supplied for
chaincode to verify the peer's connection in response.
2. If TLS is enabled, then specify the key and cert
parameters. Do not expect it otherwise.
Signed-off-by: S m, Aruna <arun.s.m.cse@gmail.com>
Using the ERC-20 sample, you can submit a transfer to and from
the same account. Because the code doesn't handle this, it ends
up minting new tokens into that account.
The correct behaviour is not specified by the ERC-20 specification,
although the OpenZeppelin implementation seems to permit it.
IMO we should just block it with an error because I can't see a use
case for allowing it and it is most likely a user error.
Signed-off-by: Simon Stone <sstone1@uk.ibm.com>
This PR adds a new non-fungible token sample using ERC721
functionalities. It includes javascript Chaincode and the README
explaining how to mint and transfer a non-fungible token in the
Fabric's test-network.
Signed-off-by: Yuki Kondo <yuki.kondo.ob@hitachi.com>
The `-i` flag was originally added to support an
upgrade sample. Since that sample is no longer available
remove the `-i` flag to clean up the network.sh options
and avoid confusion as it's possible now to specify
an image version that is no longer backwards compatible
with the new test-network with osnadmin.
Signed-off-by: Brett Logan <lindluni@github.com>
The new lint.sh script no longer requires the use
of a matrix and instead dynamically finds and lints
directories.
Signed-off-by: Brett Logan <lindluni@github.com>
Fix a small linting issue and add the es6 tag to handle
the return of a Promise as it is not defined in the ECMA
spec.
Signed-off-by: Brett Logan <lindluni@github.com>
The auction example had no ESLint configuration.
This change adds a .eslintrc.js file that matches
the rest of the projects.
This change also fixes all the linting issue in
the auction example.
Signed-off-by: Brett Logan <lindluni@github.com>
Add a service label to all containers launch by compose.
This allows us to filter on the label for removing running
containers.
Use filtering for querying running containers and
images to make sure we only target the containers
and images we want to remove.
Signed-off-by: Brett Logan <lindluni@github.com>
There have been lots of changes and quirks with the
docker-compose .env file, this change removes the file
and explicitly creates and assigns the networks in the
compose yaml files.
Signed-off-by: Brett Logan <lindluni@github.com>