From 42f2f3c2b4464156d967a8f5c6cad6eacb31bcb7 Mon Sep 17 00:00:00 2001 From: Chen Kai <281165273grape@gmail.com> Date: Mon, 9 Dec 2024 11:51:23 +0800 Subject: [PATCH] remove code from shisui Signed-off-by: Chen Kai <281165273grape@gmail.com> --- .github/workflows/image.yml | 44 ---------------------------- .github/workflows/release.yml | 54 ----------------------------------- Dockerfile.portal | 16 ----------- Makefile | 14 --------- metrics/config.go | 20 ------------- 5 files changed, 148 deletions(-) delete mode 100644 .github/workflows/image.yml delete mode 100644 .github/workflows/release.yml delete mode 100644 Dockerfile.portal diff --git a/.github/workflows/image.yml b/.github/workflows/image.yml deleted file mode 100644 index 8d14faf9a0..0000000000 --- a/.github/workflows/image.yml +++ /dev/null @@ -1,44 +0,0 @@ -name: shisui latest image - -on: - push: - branches: [ portal ] - -defaults: - run: - shell: bash - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: write - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - - push_image_to_github: - name: Push Docker image to Github - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile.portal - push: true - tags: ${{ env.REGISTRY }}/${{ github.repository }}:latest \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 09d4a5fbd9..0000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: shisui release image - -on: - release: - types: [created] - -defaults: - run: - shell: bash - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -permissions: - contents: write - -env: - releaseBuild: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - - push_image_to_github: - name: Push Docker image to Github - runs-on: ubuntu-latest - permissions: write-all - steps: - - name: Check out the repo - uses: actions/checkout@v4 - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: ${{ env.REGISTRY }}/${{ github.repository }} - tags: | - type=semver,pattern={{raw}} - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./Dockerfile.portal - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file diff --git a/Dockerfile.portal b/Dockerfile.portal deleted file mode 100644 index d544cbd3ca..0000000000 --- a/Dockerfile.portal +++ /dev/null @@ -1,16 +0,0 @@ -FROM --platform=linux/amd64 golang:1.22 as builder - -WORKDIR /app - -COPY . . -RUN go env -w GOPROXY=https://goproxy.cn,direct -RUN CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build ./cmd/shisui/main.go - - -FROM --platform=linux/amd64 ubuntu:22.04 - -COPY --from=builder /app/main /usr/local/bin/app - -EXPOSE 8545 9009/udp - -ENTRYPOINT [ "app" ] \ No newline at end of file diff --git a/Makefile b/Makefile index 11e53d4ca4..f4932165a4 100644 --- a/Makefile +++ b/Makefile @@ -8,20 +8,6 @@ GOBIN = ./build/bin GO ?= latest GORUN = go run -#? shisui: Build shisui -shisui: - go build ./cmd/shisui/main.go - mkdir -p $(GOBIN) - mv main $(GOBIN)/shisui - @echo "Done building." - @echo "Run \"$(GOBIN)/shisui\" to launch shisui." - -#? shisui-image: Build shisui image -shisui-image: - docker build -t ghcr.io/optimism-java/shisui:latest -f Dockerfile.portal . - -#? geth: Build geth -#? geth: Build geth. #? geth: Build geth. geth: $(GORUN) build/ci.go install ./cmd/geth diff --git a/metrics/config.go b/metrics/config.go index 435f84e855..72f94dd194 100644 --- a/metrics/config.go +++ b/metrics/config.go @@ -54,23 +54,3 @@ var DefaultConfig = Config{ InfluxDBBucket: "geth", InfluxDBOrganization: "geth", } - -// ShisuiDefaultConfig is the default config for metrics used in shisui. -var ShisuiDefaultConfig = Config{ - Enabled: false, - EnabledExpensive: false, - HTTP: "127.0.0.1", - Port: 6060, - EnableInfluxDB: false, - InfluxDBEndpoint: "http://localhost:8086", - InfluxDBDatabase: "shisui", - InfluxDBUsername: "test", - InfluxDBPassword: "test", - InfluxDBTags: "host=localhost", - - // influxdbv2-specific flags - EnableInfluxDBV2: false, - InfluxDBToken: "test", - InfluxDBBucket: "shisui", - InfluxDBOrganization: "shisui", -}