mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-22 17:45:10 +00:00
Compare commits
3 commits
917873be2d
...
f52f48e6e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f52f48e6e8 | ||
|
|
119d3bc53f | ||
|
|
e4e7122a5f |
11 changed files with 37 additions and 20 deletions
4
.github/actions/fsat-setup/action.yaml
vendored
4
.github/actions/fsat-setup/action.yaml
vendored
|
|
@ -12,10 +12,10 @@ inputs:
|
||||||
default: v0.50.15
|
default: v0.50.15
|
||||||
fabric-version:
|
fabric-version:
|
||||||
description: Version of Hyperledger Fabric
|
description: Version of Hyperledger Fabric
|
||||||
default: "2.5.15"
|
default: "2.5.16"
|
||||||
ca-version:
|
ca-version:
|
||||||
description: Version of Hyperledger Fabric CA
|
description: Version of Hyperledger Fabric CA
|
||||||
default: "1.5.15"
|
default: "1.5.21"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|
|
||||||
|
|
@ -12,10 +12,10 @@ inputs:
|
||||||
default: 25.x
|
default: 25.x
|
||||||
fabric-version:
|
fabric-version:
|
||||||
description: Version of Hyperledger Fabric
|
description: Version of Hyperledger Fabric
|
||||||
default: 2.5.15
|
default: 2.5.16
|
||||||
ca-version:
|
ca-version:
|
||||||
description: Version of Hyperledger Fabric CA
|
description: Version of Hyperledger Fabric CA
|
||||||
default: 1.5.15
|
default: 1.5.21
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ jobs:
|
||||||
# Note: The default Fabric version for CI is currently the latest LTS (v2.5.x).
|
# Note: The default Fabric version for CI is currently the latest LTS (v2.5.x).
|
||||||
# To test BFT Orderers, Fabric v3.x is explicitly specified here.
|
# To test BFT Orderers, Fabric v3.x is explicitly specified here.
|
||||||
with:
|
with:
|
||||||
fabric-version: 3.1.4
|
fabric-version: 3.1.5
|
||||||
|
|
||||||
- name: Run Test Network with BFT Orderers
|
- name: Run Test Network with BFT Orderers
|
||||||
working-directory: test-network
|
working-directory: test-network
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package web
|
package web
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"encoding/json"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
|
|
@ -18,6 +19,22 @@ func (setup *OrgSetup) Invoke(w http.ResponseWriter, r *http.Request) {
|
||||||
channelID := r.FormValue("channelid")
|
channelID := r.FormValue("channelid")
|
||||||
function := r.FormValue("function")
|
function := r.FormValue("function")
|
||||||
args := r.Form["args"]
|
args := r.Form["args"]
|
||||||
|
|
||||||
|
if len(args) == 1 {
|
||||||
|
var parsed []string
|
||||||
|
err := json.Unmarshal([]byte(args[0]), &parsed)
|
||||||
|
if err == nil {
|
||||||
|
args = parsed
|
||||||
|
} else {
|
||||||
|
fmt.Printf("Warning: failed to parse args as JSON: %s\n", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if len(args) == 0 {
|
||||||
|
fmt.Fprintf(w, "Error: args is empty")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
fmt.Printf("channel: %s, chaincode: %s, function: %s, args: %s\n", channelID, chainCodeName, function, args)
|
fmt.Printf("channel: %s, chaincode: %s, function: %s, args: %s\n", channelID, chainCodeName, function, args)
|
||||||
network := setup.Gateway.GetNetwork(channelID)
|
network := setup.Gateway.GetNetwork(channelID)
|
||||||
contract := network.GetContract(chainCodeName)
|
contract := network.GetContract(chainCodeName)
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ write_files:
|
||||||
# set -o pipefail
|
# set -o pipefail
|
||||||
|
|
||||||
if [ -z $1 ]; then
|
if [ -z $1 ]; then
|
||||||
HLF_VERSION=2.5.15
|
HLF_VERSION=2.5.16
|
||||||
else
|
else
|
||||||
HLF_VERSION=$1
|
HLF_VERSION=$1
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
|
|
@ -33,8 +33,8 @@ function context() {
|
||||||
export ${name}="${!override_name:-${default_value}}"
|
export ${name}="${!override_name:-${default_value}}"
|
||||||
}
|
}
|
||||||
|
|
||||||
context FABRIC_VERSION 2.5.15
|
context FABRIC_VERSION 2.5.16
|
||||||
context FABRIC_CA_VERSION 1.5.15
|
context FABRIC_CA_VERSION 1.5.21
|
||||||
|
|
||||||
context CLUSTER_RUNTIME kind # or k3s for Rancher
|
context CLUSTER_RUNTIME kind # or k3s for Rancher
|
||||||
context CONTAINER_CLI docker # or nerdctl for containerd
|
context CONTAINER_CLI docker # or nerdctl for containerd
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,12 @@ fabric-ca-client register \
|
||||||
--id.name $USERNAME \
|
--id.name $USERNAME \
|
||||||
--id.secret $PASSWORD \
|
--id.secret $PASSWORD \
|
||||||
--id.type client \
|
--id.type client \
|
||||||
--url https://$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN \
|
--url https://$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN:443 \
|
||||||
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
||||||
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/rcaadmin/msp
|
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/rcaadmin/msp
|
||||||
|
|
||||||
fabric-ca-client enroll \
|
fabric-ca-client enroll \
|
||||||
--url https://$USERNAME:$PASSWORD@$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN \
|
--url https://$USERNAME:$PASSWORD@$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN:443 \
|
||||||
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
||||||
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/$USERNAME/msp
|
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/$USERNAME/msp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -332,12 +332,12 @@ fabric-ca-client register \
|
||||||
--id.name $USERNAME \
|
--id.name $USERNAME \
|
||||||
--id.secret $PASSWORD \
|
--id.secret $PASSWORD \
|
||||||
--id.type client \
|
--id.type client \
|
||||||
--url https://$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN \
|
--url https://$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN:443 \
|
||||||
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
||||||
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/rcaadmin/msp
|
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/rcaadmin/msp
|
||||||
|
|
||||||
fabric-ca-client enroll \
|
fabric-ca-client enroll \
|
||||||
--url https://$USERNAME:$PASSWORD@$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN \
|
--url https://$USERNAME:$PASSWORD@$WORKSHOP_NAMESPACE-$ORG-ca-ca.$WORKSHOP_INGRESS_DOMAIN:443 \
|
||||||
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
--tls.certfiles $WORKSHOP_CRYPTO/cas/$ORG-ca/tls-cert.pem \
|
||||||
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/$USERNAME/msp
|
--mspdir $WORKSHOP_CRYPTO/enrollments/$ORG/users/$USERNAME/msp
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,8 +39,8 @@ First, run the following command to verify that the environment variables are co
|
||||||
```shell
|
```shell
|
||||||
$ ./network
|
$ ./network
|
||||||
|
|
||||||
Fabric image versions: Peer (3.1.4), CA (1.5.15)
|
Fabric image versions: Peer (3.1.5), CA (1.5.21)
|
||||||
Fabric binary versions: Peer (3.1.4), CA (1.5.15)
|
Fabric binary versions: Peer (3.1.5), CA (1.5.21)
|
||||||
|
|
||||||
--- Fabric Information
|
--- Fabric Information
|
||||||
Fabric Version : 3.1
|
Fabric Version : 3.1
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
# default image tag, example: "2.5.13". "default" will download the latest. (-i)
|
# default image tag, example: "2.5.16". "default" will download the latest. (-i)
|
||||||
IMAGETAG="default"
|
IMAGETAG="default"
|
||||||
|
|
||||||
# default ca image tag, example: "1.5.15". "default" will download the latest. (-cai)
|
# default ca image tag, example: "1.5.21". "default" will download the latest. (-cai)
|
||||||
CA_IMAGETAG="default"
|
CA_IMAGETAG="default"
|
||||||
|
|
||||||
# Using crpto vs CA. default is cryptogen
|
# Using crpto vs CA. default is cryptogen
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,8 @@ function printHelp() {
|
||||||
println
|
println
|
||||||
println " Flags:"
|
println " Flags:"
|
||||||
println " Used with \033[0;32mnetwork.sh prereq\033[0m:"
|
println " Used with \033[0;32mnetwork.sh prereq\033[0m:"
|
||||||
println " -i FabricVersion (default: '2.5.15')"
|
println " -i FabricVersion (default: '2.5.16')"
|
||||||
println " -cai Fabric CA Version (default: '1.5.15')"
|
println " -cai Fabric CA Version (default: '1.5.21')"
|
||||||
println
|
println
|
||||||
elif [ "$USAGE" == "up" ]; then
|
elif [ "$USAGE" == "up" ]; then
|
||||||
println "Usage: "
|
println "Usage: "
|
||||||
|
|
@ -159,8 +159,8 @@ function printHelp() {
|
||||||
println
|
println
|
||||||
println " Flags:"
|
println " Flags:"
|
||||||
println " Used with \033[0;32mnetwork.sh prereq\033[0m"
|
println " Used with \033[0;32mnetwork.sh prereq\033[0m"
|
||||||
println " -i FabricVersion (default: '2.5.15')"
|
println " -i FabricVersion (default: '2.5.16')"
|
||||||
println " -cai Fabric CA Version (default: '1.5.15')"
|
println " -cai Fabric CA Version (default: '1.5.21')"
|
||||||
println
|
println
|
||||||
println " Used with \033[0;32mnetwork.sh up\033[0m, \033[0;32mnetwork.sh createChannel\033[0m:"
|
println " Used with \033[0;32mnetwork.sh up\033[0m, \033[0;32mnetwork.sh createChannel\033[0m:"
|
||||||
println " -ca - Use Certificate Authorities to generate network crypto material"
|
println " -ca - Use Certificate Authorities to generate network crypto material"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue