Skip to content

Commit

Permalink
Updating Wever dependency to latest Cacti
Browse files Browse the repository at this point in the history
Signed-off-by: VRamakrishna <vramakr2@in.ibm.com>
  • Loading branch information
VRamakrishna committed Aug 29, 2023
1 parent 9e42100 commit 77008d2
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 27 deletions.
21 changes: 11 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
FABRIC_VERSION ?= 2.5.0
FABRIC_TWO_DIGIT_VERSION = $(shell echo $(FABRIC_VERSION) | cut -d '.' -f 1,2)
ORION_VERSION=v0.2.5
CACTI_VERSION=2.0.0-alpha.1

# need to install fabric binaries outside of fsc tree for now (due to chaincode packaging issues)
FABRIC_BINARY_BASE=$(PWD)/../fabric
Expand Down Expand Up @@ -49,7 +50,7 @@ unit-tests-race:
cd integration/nwo/; export FAB_BINS=$(FAB_BINS); go test -cover ./...

.PHONY: docker-images
docker-images: fabric-docker-images weaver-docker-images fpc-docker-images orion-server-images monitoring-docker-images
docker-images: fabric-docker-images cacti-weaver-docker-images fpc-docker-images orion-server-images monitoring-docker-images

.PHONY: fabric-docker-images
fabric-docker-images:
Expand All @@ -58,12 +59,12 @@ fabric-docker-images:
docker pull hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION)
docker image tag hyperledger/fabric-ccenv:$(FABRIC_TWO_DIGIT_VERSION) hyperledger/fabric-ccenv:latest

.PHONY: weaver-docker-images
weaver-docker-images:
docker pull ghcr.io/hyperledger-labs/weaver-fabric-driver:1.2.1
docker image tag ghcr.io/hyperledger-labs/weaver-fabric-driver:1.2.1 hyperledger-labs/weaver-fabric-driver:latest
docker pull ghcr.io/hyperledger-labs/weaver-relay-server:1.2.1
docker image tag ghcr.io/hyperledger-labs/weaver-relay-server:1.2.1 hyperledger-labs/weaver-relay-server:latest
.PHONY: cacti-weaver-docker-images
cacti-weaver-docker-images:
docker pull ghcr.io/hyperledger/cacti/cacti-weaver-fabric-driver:$(CACTI_VERSION)
docker image tag ghcr.io/hyperledger/cacti/cacti-weaver-fabric-driver:$(CACTI_VERSION) hyperledger/cacti/cacti-weaver-fabric-driver:latest
docker pull ghcr.io/hyperledger/cacti/cacti-weaver-relay-server:$(CACTI_VERSION)
docker image tag ghcr.io/hyperledger/cacti/cacti-weaver-relay-server:$(CACTI_VERSION) hyperledger/cacti/cacti-weaver-relay-server:latest

.PHONY: fpc-docker-images
fpc-docker-images:
Expand Down Expand Up @@ -132,8 +133,8 @@ integration-tests-twonets:
integration-tests-fpc-echo:
cd ./integration/fabric/fpc/echo; export FAB_BINS=$(FAB_BINS); ginkgo $(GINKGO_TEST_OPTS) .

.PHONY: integration-tests-weaver-relay
integration-tests-weaver-relay:
.PHONY: integration-tests-cacti-weaver-relay
integration-tests-cacti-weaver-relay:
cd ./integration/fabric/weaver/relay; export FAB_BINS=$(FAB_BINS); ginkgo $(GINKGO_TEST_OPTS) .

.PHONY: integration-tests-fabric-stoprestart
Expand Down Expand Up @@ -180,4 +181,4 @@ clean:

.PHONY: fsccli
fsccli:
@go install ./cmd/fsccli
@go install ./cmd/fsccli
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ If you are a skilled software engineer, you will be able to leverage the full po
But, this is not all. The Fabric Smart Client is a client-side component that can be used to develop applications:

- Based on other backends like [`Orion`](https://github.com/hyperledger-labs/orion-server).
- With interoperability using the [`Weaver`](https://github.com/hyperledger-labs/weaver-dlt-interoperability) framework.
- With interoperability using the [`Cacti Weaver`](https://github.com/hyperledger/cacti/weaver) framework.
- With TEE support as offered by [`Fabric Private Chaincode`](https://github.com/hyperledger/fabric-private-chaincode).
- And more...

Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/hyperledger-labs/orion-sdk-go v0.2.5
github.com/hyperledger-labs/orion-server v0.2.5
github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go v1.2.3-alpha.1
github.com/hyperledger-labs/weaver-dlt-interoperability/sdks/fabric/go-sdk v1.2.3-alpha.1.0.20210812140206-37f430515b8c
github.com/hyperledger/cacti/weaver/common/protos-go/v2 v2.0.0-alpha.1
github.com/VRamakrishna/cacti/weaver/sdks/fabric/go-sdk/v2 v2.0.0-alpha.1
github.com/hyperledger/fabric v1.4.0-rc1.0.20230401164317-bd8e24856939
github.com/hyperledger/fabric-chaincode-go v0.0.0-20220920210243-7bc6fa0dd58b
github.com/hyperledger/fabric-contract-api-go v1.1.1
Expand Down
2 changes: 1 addition & 1 deletion integration/fabric/weaver/relay/relay_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

func TestEndToEnd(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Two Fabric Networks Suite with Weaver Relay")
RunSpecs(t, "Two Fabric Networks Suite with Cacti Weaver Relay")
}

func StartPort() int {
Expand Down
2 changes: 1 addition & 1 deletion integration/fabric/weaver/relay/relay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var _ = Describe("EndToEnd", func() {
ii.Stop()
})

Describe("Two Fabric Networks with Weaver Relay Life Cycle", func() {
Describe("Two Fabric Networks with Cacti Weaver Relay Life Cycle", func() {

var testdataPath = "./testdata"

Expand Down
2 changes: 2 additions & 0 deletions integration/nwo/weaver/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ func (p *Platform) RunRelayServer(name string, serverConfigPath, port string) {
Env: []string{
"DEBUG=true",
"RELAY_CONFIG=/opt/relay/config/server.toml",
"RELAY_TLS=false",
"DRIVER_TLS=false",
},
ExposedPorts: nat.PortSet{
nat.Port(port + "/tcp"): struct{}{},
Expand Down
4 changes: 2 additions & 2 deletions integration/nwo/weaver/platform.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (
)

const (
RelayServerImage = "hyperledger-labs/weaver-relay-server:latest"
FabricDriverImage = "hyperledger-labs/weaver-fabric-driver:latest"
RelayServerImage = "hyperledger/cacti-weaver-relay-server:latest"
FabricDriverImage = "hyperledger/cacti-weaver-fabric-driver:latest"
// FabricDriverImage = "fabric-driver:latest"
)

Expand Down
6 changes: 5 additions & 1 deletion integration/nwo/weaver/templates.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ remote_db_path="db/{{ Name }}/remote_request"
# FOR TLS
cert_path="credentials/fabric_cert.pem"
key_path="credentials/fabric_key"
# tls=true
tls=false
[networks]{{ range Networks }}
[networks.{{ .Name }}]
Expand All @@ -32,12 +32,16 @@ network="{{ .Type }}"
[relays.{{ .Name }}]
hostname="{{ .Hostname }}"
port="{{ .Port }}"
tls=false
tlsca_cert_path="credentials/fabric_ca_cert.pem"
{{- end }}
[drivers]{{ range Drivers }}
[drivers.{{ .Name }}]
hostname="{{ .Hostname }}"
port="{{ .Port }}"
tls=false
tlsca_cert_path="credentials/fabric_ca_cert.pem"
{{- end }}
`

Expand Down
2 changes: 1 addition & 1 deletion integration/nwo/weaver/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (t *Topology) AddRelayServer(ft *topology.Topology, org string) *RelayServe
Label: "interop",
Channel: ft.Channels[0].Name,
Namespace: "interop",
Path: "github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop",
Path: "github.com/hyperledger/cacti/weaver/core/network/fabric-interop-cc/contracts/interop",
},
}
t.Relays = append(t.Relays, r)
Expand Down
4 changes: 2 additions & 2 deletions integration/nwo/weaver/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
)

const (
interopCCPath = `https://github.com/hyperledger-labs/weaver-dlt-interoperability/archive/refs/tags/core/network/fabric-interop-cc/contracts/interop/v1.2.2.zip`
interopCCPath = `https://github.com/hyperledger/cacti/weaver/archive/refs/tags/core/network/fabric-interop-cc/contracts/interop/v2.0.0-alpha.1.zip`
)

func packageChaincode() (tmpDir string, cleanup func(), err error) {
metadataContent := `{"path":"github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop","type":"golang","label":"interop"}`
metadataContent := `{"path":"github.com/hyperledger/cacti/weaver/core/network/fabric-interop-cc/contracts/interop","type":"golang","label":"interop"}`
_ = metadataContent
resp, err := http.Get(interopCCPath)
if err != nil {
Expand Down
4 changes: 2 additions & 2 deletions platform/fabric/services/weaver/relay/fabric/proof.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (

"github.com/hyperledger-labs/fabric-smart-client/pkg/utils/proto"
"github.com/hyperledger-labs/fabric-smart-client/platform/fabric"
"github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/common"
fabric2 "github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/fabric"
"github.com/hyperledger/cacti/weaver/common/protos-go/common"
fabric2 "github.com/hyperledger/cacti/weaver/common/protos-go/fabric"
"github.com/hyperledger/fabric/protoutil"
"github.com/pkg/errors"
)
Expand Down
8 changes: 4 additions & 4 deletions platform/fabric/services/weaver/relay/fabric/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import (
"github.com/hyperledger-labs/fabric-smart-client/platform/fabric"
"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/assert"
"github.com/hyperledger-labs/fabric-smart-client/platform/view/services/flogging"
"github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/common"
fabric2 "github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/fabric"
"github.com/hyperledger-labs/weaver-dlt-interoperability/sdks/fabric/go-sdk/interoperablehelper"
"github.com/hyperledger-labs/weaver-dlt-interoperability/sdks/fabric/go-sdk/types"
"github.com/hyperledger/cacti/weaver/common/protos-go/common"
fabric2 "github.com/hyperledger/cacti/weaver/common/protos-go/fabric"
"github.com/VRamakrishna/cacti/weaver/sdks/fabric/go-sdk/interoperablehelper"
"github.com/VRamakrishna/cacti/weaver/sdks/fabric/go-sdk/types"
"github.com/hyperledger/fabric-protos-go/msp"
"github.com/hyperledger/fabric/protoutil"
"github.com/pkg/errors"
Expand Down

0 comments on commit 77008d2

Please sign in to comment.