Skip to content

Commit 4eb3f50

Browse files
Jeroen Offerijnscdamian
andauthored
Update readme for POD name (#1583)
* Update readme for POD name * pod: Update go package name and related paths --------- Co-authored-by: cdamian <17934949+cdamian@users.noreply.github.com>
1 parent e09cce1 commit 4eb3f50

File tree

284 files changed

+1319
-1317
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+1319
-1317
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ FROM golang:1.18-buster as builder
22

33
RUN apt-get -y update && apt-get -y upgrade && apt-get -y install wget && apt-get install ca-certificates -y
44

5-
ADD . /go/src/github.com/centrifuge/go-centrifuge
6-
WORKDIR /go/src/github.com/centrifuge/go-centrifuge
5+
ADD . /go/src/github.com/centrifuge/pod
6+
WORKDIR /go/src/github.com/centrifuge/pod
77

8-
RUN go install -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
8+
RUN go install -ldflags "-X github.com/centrifuge/pod/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
99

1010
FROM debian:buster-slim
1111
RUN apt-get -y update && apt-get -y upgrade && apt-get install ca-certificates -y

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ run-testworld-tests:
3939
go test ./... -v -race -coverprofile=profile.out -covermode=atomic -tags=testworld -timeout 70m
4040

4141
install: ## Builds and Install binary
42-
@go install -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
42+
@go install -ldflags "-X github.com/centrifuge/pod/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
4343

44-
IMAGE_NAME?=centrifugeio/go-centrifuge
44+
IMAGE_NAME?=centrifugeio/pod
4545
BRANCH=`git rev-parse --abbrev-ref HEAD`
4646
GIT_SHORT_COMMIT=`git rev-parse --short HEAD`
4747
TIMESTAMP=`date -u +%Y%m%d%H`
@@ -65,7 +65,7 @@ os?=`go env GOOS`
6565
arch?=amd64
6666
build-binary: install-deps
6767
@echo "Building binary for ${os}-${arch}"
68-
@GOOS=${os} GOARCH=${arch} go build -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
68+
@GOOS=${os} GOARCH=${arch} go build -ldflags "-X github.com/centrifuge/pod/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
6969
@if [ -z `git tag --points-at HEAD` ]; then\
7070
tar -zcf centrifuge-${os}-${arch}-${GIT_SHORT_COMMIT}.tar.gz ./centrifuge;\
7171
else\
@@ -81,7 +81,7 @@ recreate_config?=false
8181
start-local-node:
8282
@echo "Building node..."
8383
@go mod vendor
84-
@go build -ldflags "-X github.com/centrifuge/go-centrifuge/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
84+
@go build -ldflags "-X github.com/centrifuge/pod/version.gitCommit=`git rev-parse HEAD`" ./cmd/centrifuge/...
8585
@if [[ ! -f "${targetDir}"/config.yaml || "${recreate_config}" == "true" ]]; then \
8686
rm -rf "${targetDir}"; \
8787
echo "Creating local test config for the Node at ${targetDir}"; \

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# Centrifuge P2P node
1+
# Centrifuge POD (P2P Node)
22

3-
[![Tests](https://github.com/centrifuge/go-centrifuge/actions/workflows/tests.yml/badge.svg?branch=develop)](https://github.com/centrifuge/go-centrifuge/actions/workflows/tests.yml)
4-
[![GoDoc Reference](https://godoc.org/github.com/centrifuge/go-centrifuge?status.svg)](https://godoc.org/github.com/centrifuge/go-centrifuge)
5-
[![codecov](https://codecov.io/gh/centrifuge/go-centrifuge/branch/develop/graph/badge.svg)](https://codecov.io/gh/centrifuge/go-centrifuge)
6-
[![Go Report Card](https://goreportcard.com/badge/github.com/centrifuge/go-centrifuge)](https://goreportcard.com/report/github.com/centrifuge/go-centrifuge)
3+
[![Tests](https://github.com/centrifuge/pod/actions/workflows/tests.yml/badge.svg?branch=develop)](https://github.com/centrifuge/pod/actions/workflows/tests.yml)
4+
[![GoDoc Reference](https://godoc.org/github.com/centrifuge/pod?status.svg)](https://godoc.org/github.com/centrifuge/pod)
5+
[![codecov](https://codecov.io/gh/centrifuge/pod/branch/main/graph/badge.svg)](https://codecov.io/gh/centrifuge/pod)
6+
[![Go Report Card](https://goreportcard.com/badge/github.com/centrifuge/pod)](https://goreportcard.com/report/github.com/centrifuge/pod)
77

8-
`go-centrifuge` is the go implementation of the Centrifuge P2P protocol. It connects to other nodes via libp2p2 and uses Centrifuge Chain for on-chain interactions.
8+
This repository contains the Go implementation of the Centrifuge POD (Private Off-chain Data) protocol. It connects to other nodes via libp2p and uses [Centrifuge Chain](https://github.com/centrifuge/centrifuge-chain) for on-chain interactions.
99

1010
**Getting help:** Head over to our documentation at [docs.centrifuge.io](http://docs.centrifuge.io) to learn how to setup a node and interact with it. If you have any questions, feel free to join our [discord](https://centrifuge.io/discord)
1111

@@ -29,7 +29,7 @@ Ensure `GOBIN` is under `PATH` to call the binary globally.
2929
There 4 different flavours of tests in the project
3030
- Unit tests(unit)
3131
- Integration tests(integration)
32-
- Environment tests(testworld): spins up multiple go-centrifuge nodes and local ethereum and centrifuge chains
32+
- Environment tests(testworld): spins up multiple PODs and local ethereum and centrifuge chains
3333

3434
To run all the tests:
3535
- `make run-unit-tests`

bootstrap/bootstrappers/bootstrapper.go

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
11
package bootstrappers
22

33
import (
4-
"github.com/centrifuge/go-centrifuge/bootstrap"
5-
"github.com/centrifuge/go-centrifuge/centchain"
6-
"github.com/centrifuge/go-centrifuge/config"
7-
"github.com/centrifuge/go-centrifuge/config/configstore"
8-
"github.com/centrifuge/go-centrifuge/dispatcher"
9-
"github.com/centrifuge/go-centrifuge/documents"
10-
"github.com/centrifuge/go-centrifuge/documents/entity"
11-
"github.com/centrifuge/go-centrifuge/documents/entityrelationship"
12-
"github.com/centrifuge/go-centrifuge/documents/generic"
13-
"github.com/centrifuge/go-centrifuge/http"
14-
httpv2 "github.com/centrifuge/go-centrifuge/http/v2"
15-
httpv3 "github.com/centrifuge/go-centrifuge/http/v3"
16-
identityv2 "github.com/centrifuge/go-centrifuge/identity/v2"
17-
"github.com/centrifuge/go-centrifuge/ipfs"
18-
"github.com/centrifuge/go-centrifuge/jobs"
19-
nftv3 "github.com/centrifuge/go-centrifuge/nft/v3"
20-
"github.com/centrifuge/go-centrifuge/node"
21-
"github.com/centrifuge/go-centrifuge/p2p"
22-
"github.com/centrifuge/go-centrifuge/pallets"
23-
"github.com/centrifuge/go-centrifuge/pending"
24-
"github.com/centrifuge/go-centrifuge/storage/leveldb"
25-
"github.com/centrifuge/go-centrifuge/version"
4+
"github.com/centrifuge/pod/bootstrap"
5+
"github.com/centrifuge/pod/centchain"
6+
"github.com/centrifuge/pod/config"
7+
"github.com/centrifuge/pod/config/configstore"
8+
"github.com/centrifuge/pod/dispatcher"
9+
"github.com/centrifuge/pod/documents"
10+
"github.com/centrifuge/pod/documents/entity"
11+
"github.com/centrifuge/pod/documents/entityrelationship"
12+
"github.com/centrifuge/pod/documents/generic"
13+
"github.com/centrifuge/pod/http"
14+
httpv2 "github.com/centrifuge/pod/http/v2"
15+
httpv3 "github.com/centrifuge/pod/http/v3"
16+
identityv2 "github.com/centrifuge/pod/identity/v2"
17+
"github.com/centrifuge/pod/ipfs"
18+
"github.com/centrifuge/pod/jobs"
19+
nftv3 "github.com/centrifuge/pod/nft/v3"
20+
"github.com/centrifuge/pod/node"
21+
"github.com/centrifuge/pod/p2p"
22+
"github.com/centrifuge/pod/pallets"
23+
"github.com/centrifuge/pod/pending"
24+
"github.com/centrifuge/pod/storage/leveldb"
25+
"github.com/centrifuge/pod/version"
2626
log2 "github.com/ipfs/go-log"
2727
)
2828

bootstrap/bootstrappers/integration_test/test_bootstrapper.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ import (
99
"os/exec"
1010
"time"
1111

12-
"github.com/centrifuge/go-centrifuge/testingutils/path"
13-
1412
gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4"
13+
"github.com/centrifuge/pod/testingutils/path"
1514
logging "github.com/ipfs/go-log"
1615
)
1716

bootstrap/bootstrappers/testlogging/test_bootstrapper.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ package testlogging
55
import (
66
"os"
77

8-
"github.com/centrifuge/go-centrifuge/utils"
8+
"github.com/centrifuge/pod/utils"
99
logging "github.com/ipfs/go-log"
1010
gologging "github.com/whyrusleeping/go-logging"
1111
)

bootstrap/doc.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
/*
22
3-
Package bootstrap maintains the bootstrapping interface design for go-centrifuge.
3+
Package bootstrap maintains the bootstrapping interface design for the Centrifuge POD.
44
These interfaces are defined to enable decoupling between implementation of various implementation packages of
5-
go-centrifuge and their runtime instantiation logic.
5+
the Centrifuge POD and their runtime instantiation logic.
66
77
Why Bootstrapper interface was needed
88
99
Unlike a regular library, process runtime code has certain dependencies on a central instantiation
10-
point in the software for it to be initialised properly. For go-centrifuge this made it difficult to
10+
point in the software for it to be initialised properly. For the Centrifuge POD this made it difficult to
1111
change instantiation logic based on the need(eg: commands vs daemon) because of cyclic dependencies or to reuse that logic for purposes of testing.
1212
The use of global variables to access already initialised implementations meant that it was hard to identify the dependencies needed for each module to function properly.
1313
Also this meant that instantiation logic got coupled to a particular implementation of a package interface. For example leveldb implementation of storage
@@ -57,6 +57,6 @@ After this a downstream package bootstrapped can use the context[storage.Bootstr
5757
5858
repo := NewDocRepository(ldb)
5959
60-
Check go-centrifuge/cmd package to see how the Bootstrapper interfaces are used to bootstrap go-centrifuge.
60+
Check the cmd package to see how the Bootstrapper interfaces are used to bootstrap the Centrifuge POD.
6161
*/
6262
package bootstrap

build/scripts/run_centrifuge_chain.sh

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ fi
2020
# Setup
2121
PARENT_DIR=$(pwd)
2222

23-
mkdir -p /tmp/go-centrifuge/deps/res
24-
cp "${PARENT_DIR}"/build/centrifuge-chain/docker-compose-local-relay.yml /tmp/go-centrifuge/deps/
25-
cp "${PARENT_DIR}"/build/centrifuge-chain/docker-compose-local-chain.yml /tmp/go-centrifuge/deps/
26-
cp "${PARENT_DIR}"/build/centrifuge-chain/res/rococo-local.json /tmp/go-centrifuge/deps/res/
23+
mkdir -p /tmp/centrifuge-pod/deps/res
24+
cp "${PARENT_DIR}"/build/centrifuge-chain/docker-compose-local-relay.yml /tmp/centrifuge-pod/deps/
25+
cp "${PARENT_DIR}"/build/centrifuge-chain/docker-compose-local-chain.yml /tmp/centrifuge-pod/deps/
26+
cp "${PARENT_DIR}"/build/centrifuge-chain/res/rococo-local.json /tmp/centrifuge-pod/deps/res/
2727
docker network inspect docker_default
2828
if [ $? -ne 0 ]; then
2929
docker network create docker_default
@@ -32,17 +32,17 @@ fi
3232
################## Run RelayChain #########################
3333
cd "${PARENT_DIR}"/build/centrifuge-chain || exit
3434
## Tweaking network
35-
default_network=$(cat /tmp/go-centrifuge/deps/docker-compose-local-relay.yml | grep "name: docker_default")
35+
default_network=$(cat /tmp/centrifuge-pod/deps/docker-compose-local-relay.yml | grep "name: docker_default")
3636
if [[ $default_network == "" ]]; then
37-
cat <<EOT >> /tmp/go-centrifuge/deps/docker-compose-local-relay.yml
37+
cat <<EOT >> /tmp/centrifuge-pod/deps/docker-compose-local-relay.yml
3838
networks:
3939
default:
4040
external:
4141
name: docker_default
4242
EOT
4343
fi
4444

45-
docker-compose -f /tmp/go-centrifuge/deps/docker-compose-local-relay.yml up -d
45+
docker-compose -f /tmp/centrifuge-pod/deps/docker-compose-local-relay.yml up -d
4646

4747
echo "Waiting for Relay Chain to Start Up ..."
4848
maxCount=$(( CENT_CHAIN_DOCKER_START_TIMEOUT / CENT_CHAIN_DOCKER_START_INTERVAL ))
@@ -65,9 +65,9 @@ done
6565
################## Run CentChain #########################
6666
## Centrifuge Chain local Development testnet
6767
## Tweaking network
68-
default_network=$(cat /tmp/go-centrifuge/deps/docker-compose-local-chain.yml | grep "name: docker_default")
68+
default_network=$(cat /tmp/centrifuge-pod/deps/docker-compose-local-chain.yml | grep "name: docker_default")
6969
if [[ $default_network == "" ]]; then
70-
cat <<EOT >> /tmp/go-centrifuge/deps/docker-compose-local-chain.yml
70+
cat <<EOT >> /tmp/centrifuge-pod/deps/docker-compose-local-chain.yml
7171
networks:
7272
default:
7373
external:
@@ -76,7 +76,7 @@ EOT
7676
fi
7777

7878
PARA_CHAIN_SPEC=development-local \
79-
docker-compose -f /tmp/go-centrifuge/deps/docker-compose-local-chain.yml up -d
79+
docker-compose -f /tmp/centrifuge-pod/deps/docker-compose-local-chain.yml up -d
8080

8181
echo "Waiting for Centrifuge Chain to Start Up ..."
8282
maxCount=$(( CENT_CHAIN_DOCKER_START_TIMEOUT / CENT_CHAIN_DOCKER_START_INTERVAL ))

centchain/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import (
88
"sync"
99
"time"
1010

11-
"github.com/centrifuge/go-centrifuge/contextutil"
12-
"github.com/centrifuge/go-centrifuge/errors"
13-
"github.com/centrifuge/go-centrifuge/jobs"
1411
gsrpc "github.com/centrifuge/go-substrate-rpc-client/v4"
1512
"github.com/centrifuge/go-substrate-rpc-client/v4/client"
1613
"github.com/centrifuge/go-substrate-rpc-client/v4/signature"
1714
"github.com/centrifuge/go-substrate-rpc-client/v4/types"
1815
"github.com/centrifuge/go-substrate-rpc-client/v4/types/codec"
1916
"github.com/centrifuge/gocelery/v2"
17+
"github.com/centrifuge/pod/contextutil"
18+
"github.com/centrifuge/pod/errors"
19+
"github.com/centrifuge/pod/jobs"
2020
"github.com/ethereum/go-ethereum/common/hexutil"
2121
logging "github.com/ipfs/go-log"
2222
)

centchain/api_integration_test.go

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ import (
77
"os"
88
"testing"
99

10-
genericUtils "github.com/centrifuge/go-centrifuge/testingutils/generic"
11-
12-
"github.com/centrifuge/go-centrifuge/bootstrap"
13-
"github.com/centrifuge/go-centrifuge/bootstrap/bootstrappers/integration_test"
14-
"github.com/centrifuge/go-centrifuge/bootstrap/bootstrappers/testlogging"
15-
"github.com/centrifuge/go-centrifuge/centchain"
16-
"github.com/centrifuge/go-centrifuge/config"
17-
"github.com/centrifuge/go-centrifuge/config/configstore"
18-
"github.com/centrifuge/go-centrifuge/contextutil"
19-
"github.com/centrifuge/go-centrifuge/dispatcher"
20-
v2 "github.com/centrifuge/go-centrifuge/identity/v2"
21-
"github.com/centrifuge/go-centrifuge/jobs"
22-
"github.com/centrifuge/go-centrifuge/pallets"
23-
"github.com/centrifuge/go-centrifuge/storage/leveldb"
24-
"github.com/centrifuge/go-centrifuge/testingutils/keyrings"
2510
"github.com/centrifuge/go-substrate-rpc-client/v4/types"
11+
"github.com/centrifuge/pod/bootstrap"
12+
"github.com/centrifuge/pod/bootstrap/bootstrappers/integration_test"
13+
"github.com/centrifuge/pod/bootstrap/bootstrappers/testlogging"
14+
"github.com/centrifuge/pod/centchain"
15+
"github.com/centrifuge/pod/config"
16+
"github.com/centrifuge/pod/config/configstore"
17+
"github.com/centrifuge/pod/contextutil"
18+
"github.com/centrifuge/pod/dispatcher"
19+
v2 "github.com/centrifuge/pod/identity/v2"
20+
"github.com/centrifuge/pod/jobs"
21+
"github.com/centrifuge/pod/pallets"
22+
"github.com/centrifuge/pod/storage/leveldb"
23+
genericUtils "github.com/centrifuge/pod/testingutils/generic"
24+
"github.com/centrifuge/pod/testingutils/keyrings"
2625
"github.com/stretchr/testify/assert"
2726
)
2827

0 commit comments

Comments
 (0)