diff --git a/.github/workflows/test-unit.yml b/.github/workflows/test-unit.yml index 51fa8c2..b31e73a 100644 --- a/.github/workflows/test-unit.yml +++ b/.github/workflows/test-unit.yml @@ -40,24 +40,24 @@ jobs: name: code-coverage-report path: test/coverage.out - sonar-cloud: - needs: test-unit - name: SonarCloud - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v3 - with: - submodules: recursive - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - - name: Download code coverage results - uses: actions/download-artifact@v3 - with: - name: code-coverage-report - - - name: Analyze with SonarCloud - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} +# sonar-cloud: +# needs: test-unit +# name: SonarCloud +# runs-on: ubuntu-latest +# steps: +# - name: Checkout Code +# uses: actions/checkout@v3 +# with: +# submodules: recursive +# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis +# +# - name: Download code coverage results +# uses: actions/download-artifact@v3 +# with: +# name: code-coverage-report +# +# - name: Analyze with SonarCloud +# uses: sonarsource/sonarcloud-github-action@master +# env: +# GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN }} +# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/Dockerfile b/Dockerfile index ac49d99..ac292bb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN make build # CONTAINER FOR RUNNING BINARY FROM alpine:3.16.0 -COPY --from=build /go/src/github.com/0xPolygon/cdk-data-availability/dist/cdk-data-availability /app/cdk-data-availability +COPY --from=build /go/src/github.com/0xPolygon/cdk-data-availability/dist/xlayer-data-availability /app/xlayer-data-availability EXPOSE 8444 -CMD ["/bin/sh", "-c", "/app/cdk-data-availability run"] +CMD ["/bin/sh", "-c", "/app/xlayer-data-availability run"] diff --git a/Makefile b/Makefile index 10cdfcb..3b4b5c7 100644 --- a/Makefile +++ b/Makefile @@ -53,7 +53,7 @@ GOBASE := $(shell pwd) GOBIN := $(GOBASE)/dist GOOS := $(shell uname -s | tr '[:upper:]' '[:lower:]') GOENVVARS := GOBIN=$(GOBIN) CGO_ENABLED=0 GOOS=$(GOOS) GOARCH=$(ARCH) -GOBINARY := cdk-data-availability +GOBINARY := xlayer-data-availability GOCMD := $(GOBASE)/cmd LDFLAGS += -X 'github.com/0xPolygon/cdk-data-availability.Version=$(VERSION)' diff --git a/README.md b/README.md index 6df8afb..a007fe1 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# CDK Data Availability +# X Layer CDK Data Availability ### Data Availability Layer for CDK Validium -The cdk-data-availability project is a specialized Data Availability Node (DA Node) that is part of Polygon's CDK (Chain Development Kit) Validium. +The xlayer-data-availability project is a specialized Data Availability Node (DA Node) that is part of Polygon's CDK (Chain Development Kit) Validium. ## Overview of Validium diff --git a/cmd/main.go b/cmd/main.go index 7a79883..52befaf 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -25,7 +25,7 @@ import ( "github.com/urfave/cli/v2" ) -const appName = "cdk-data-availability" +const appName = "xlayer-data-availability" var ( configFileFlag = cli.StringFlag{ diff --git a/services/datacom/datacom.go b/services/datacom/datacom.go index 50e8b2c..b347b41 100644 --- a/services/datacom/datacom.go +++ b/services/datacom/datacom.go @@ -57,8 +57,9 @@ func (d *Endpoints) signSequence(signedSequence types.SignedSequenceInterface) ( if err != nil || d.isEmptyAddress(sender) { return "0x0", rpc.NewRPCError(rpc.DefaultErrorCode, "failed to verify sender") } - log.Infof("SignSequence, signedSequence sender: %v, sequencerTracker:%v, permitApiAddress:%s", sender.String(), d.sequencerTracker.GetAddr().String(), d.permitApiAddress.String()) - if sender != d.sequencerTracker.GetAddr() && sender != d.permitApiAddress { + log.Infof("SignSequence, signedSequence sender: %v, sequencerTracker:%v, permitApiAddress:%s", + sender.String(), d.sequencerTracker.GetAddr().String(), d.permitApiAddress.String()) + if sender != d.sequencerTracker.GetAddr() && sender != d.permitApiAddress { return "0x0", rpc.NewRPCError(rpc.DefaultErrorCode, "unauthorized") } diff --git a/test/docker-compose.yml b/test/docker-compose.yml index 00f96f1..17bb6be 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -26,7 +26,7 @@ services: command: - "/bin/sh" - "-c" - - "/app/cdk-data-availability run --cfg /app/config.toml" + - "/app/xlayer-data-availability run --cfg /app/config.toml" cdk-data-availability-db: container_name: cdk-data-availability-db