Aim: to get up and working with Java Chaincode as quick as possible. Also as a sanity check that everything is setup correctly.
That you have:
- git installed
- docker and docker-compose installed
## Cheat Sheet for sequence of commands for v2.0 lifecycle and byfn | |
docker kill $(docker ps -q) && docker rm $(docker ps -aq) | |
docker rmi $(docker images dev-* -q) --force | |
docker volume prune -f && docker network prune -f | |
./byfn.sh generate | |
./byfn.sh restart | |
# org1 -> | |
docker exec -it cli bash |
#!/bin/bash | |
# You can use this command to get this script | |
# | |
# curl -LOs https://gist.github.com/mbwhite/a32abc57a0a45ecc466977ceef67df1f/raw/monitordocker.sh && chmod +x monitordocker.sh | |
# | |
# This script uses the logspout and http stream tools to let you watch the docker containers | |
# in action. | |
# | |
# More information at https://github.com/gliderlabs/logspout/tree/master/httpstream |
https://www.tecmint.com/rsync-local-remote-file-synchronization-commands/ | |
rsync -azvh ~/github.com $BACKUP/ | |
https://www.raspberrypi.org/documentation/remote-access/ssh/README.md | |
https://www.raspberrypi.org/documentation/configuration/raspi-config.md | |
Change pwd |
#!/bin/bash -e | |
set -euo pipefail | |
echo "======== PULL DOCKER IMAGES ========" | |
############################################################### | |
# Pull and Tag the fabric and fabric-ca images from Artifactory | |
############################################################### | |
echo "Fetching images from Artifactory" | |
ARTIFACTORY_URL=hyperledger-fabric.jfrog.io |
# Download Fabric CLI | |
wget -q -P /tmp https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-linux-amd64-latest.tar.gz | |
sudo tar xzvf /tmp/hyperledger-fabric-linux-amd64-latest.tar.gz -C /usr/local | |
# Download Fabric-ca CLI | |
wget -q -P /tmp https://hyperledger.jfrog.io/hyperledger/fabric-binaries/hyperledger-fabric-ca-linux-amd64-latest.tar.gz | |
sudo tar xzvf /tmp/hyperledger-fabric-ca-linux-amd64-latest.tar.gz -C /usr/local | |
export FABRIC_CFG_PATH=/usr/local/config |
// Grammar for parsing of the Fabric Endorsment Policies | |
// | |
// Defined in the documentation at | |
// https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html#endorsement-policy-syntax | |
// The expression will be an operator with arguments, each of the arguments can be an expression | |
// The OutOf operator is a bit different as that demands the first agument be a number | |
Expression | |
= op:Operator '(' _ args:Some_Expression_Args _ ')' | |
{ |
The starting point of deploying a brand new chaincode starts with the chaincode package.
Irrespective of what language or api you have used to write your contract or chaincode, from the peer's perspective when deploying it can be considered a BLOB (Binary Object). Therefore the package is made up of your code (treated as a BLOB) and some metadata.
This metadata is a JSON file with
No internet connection or limited. npm install
will access npmjs to install node modules, any native modules will attempt to load the native modules that have been pre-built. This is defined the relavent package author's in each module's package.json.
However if there is no prebuilt binary available either because ones not defined, or the connection can not be established it will be rebuilt. This itself though will access the internet to get the node headers.
If you can, but sometimes not practical or possible
// Apache-2 | |
// Import and IBP Node SDK, and also two cli helpers | |
const ibp = require('ibp-node-sdk'); | |
const { table } = require('table'); | |
const chalk = require('chalk'); | |
// package JSON contains | |
// "chalk": "^4.1.0", | |
// "ibp-node-sdk": "^0.1.11", |