diff --git a/.github/banner.jpg b/.github/banner.jpg deleted file mode 100644 index bb04a4319d..0000000000 Binary files a/.github/banner.jpg and /dev/null differ diff --git a/.github/banner.png b/.github/banner.png deleted file mode 100644 index 11cc6bf899..0000000000 Binary files a/.github/banner.png and /dev/null differ diff --git a/.github/workflows/ansible/update_edgenet.yaml b/.github/workflows/ansible/update_edgenet.yaml index 40df3f3fe5..042f1aef31 100644 --- a/.github/workflows/ansible/update_edgenet.yaml +++ b/.github/workflows/ansible/update_edgenet.yaml @@ -1,6 +1,6 @@ --- - - name: Update Polygon Edge binary + name: Update Blade binary hosts: - all become: yes @@ -11,58 +11,58 @@ upgrade: yes update_cache: yes - ## stop polygon-edge service - - name: Stop polygon edge service + ## stop blade service + - name: Stop Blade service systemd: state: stopped - name: polygon-edge + name: blade ## get the latest release - name: Get latest release link uri: - url: https://api.github.com/repos/0xPolygon/polygon-edge/releases/latest + url: https://api.github.com/repos/Ethernal-Tech/blade/releases/latest return_content: true register: edge_release ## download the latest release - - name: Download latest Polygon Edge release + - name: Download latest Blade release get_url: url: "{{ edge_release.json.assets[3].browser_download_url }}" - dest: /tmp/polygon-edge.tar.gz + dest: /tmp/blade.tar.gz force: yes ## create temp dir for release - - name: Create temp dir for Polygon Edge release + - name: Create temp dir for Blade release file: - path: /tmp/polygon-edge + path: /tmp/blade state: directory ## unpack release tar - - name: Unpack Polygon Edge release + - name: Unpack Blade release unarchive: remote_src: yes - src: /tmp/polygon-edge.tar.gz - dest: /tmp/polygon-edge + src: /tmp/blade.tar.gz + dest: /tmp/blade - ## set polygon-edge to PATH - - name: Place Polygon Edge binary to PATH + ## set blade to PATH + - name: Place Blade binary to PATH copy: remote_src: yes - src: /tmp/polygon-edge/polygon-edge + src: /tmp/blade/blade dest: /usr/local/bin/ mode: a+x force: yes ## remove release temp dir - - name: Remove temp Polygon Edge release dir + - name: Remove temp Blade release dir file: state: absent - path: /tmp/polygon-edge + path: /tmp/blade - ## start polygon edge service - - name: Start polygon-edge service + ## start Blade service + - name: Start blade service systemd: state: restarted - name: polygon-edge + name: blade daemon_reload: yes enabled: yes \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 73592d30a1..5535456f59 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,47 +1,45 @@ --- name: Build -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy workflow_dispatch: workflow_call: - # Map the workflow outputs to job outputs + # Map the workflow outputs to job outputs outputs: workflow_output: description: "Build output" - value: ${{ jobs.go_build.outputs.build_output_failure }} + value: ${{ jobs.go_build.outputs.build_output_failure }} jobs: go_build: - name: Polygon Edge + name: Blade runs-on: ubuntu-latest outputs: - build_output_failure: ${{ steps.edge_build_failure.outputs.build_output }} + build_output_failure: ${{ steps.blade_build_failure.outputs.build_output }} steps: - name: Checkout code uses: actions/checkout@v3 - + - name: Setup Go environment uses: actions/setup-go@v3 with: go-version: 1.20.x - - name: Build Polygon Edge - run: go build -tags netgo -ldflags="-s -w -linkmode external -extldflags "-static" -X \"github.com/0xPolygon/polygon-edge/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/0xPolygon/polygon-edge/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf polygon-edge.tar.gz polygon-edge + - name: Build Blade + run: go build -o blade -tags netgo -ldflags="-s -w -X \"github.com/Ethernal-Tech/blade/versioning.Version=${GITHUB_REF_NAME}\" -X \"github.com/Ethernal-Tech/blade/versioning.Commit=${GITHUB_SHA}\"" && tar -czvf blade.tar.gz blade env: - CC: gcc - CXX: g++ GOARC: amd64 GOOS: linux - - name: Build Polygon Edge Failed + - name: Build Blade Failed if: failure() - id: edge_build_failure + id: blade_build_failure run: echo "build_output=false" >> $GITHUB_OUTPUT - - name: 'Upload Artifact' + - name: "Upload Artifact" uses: actions/upload-artifact@v3 with: - name: polygon-edge - path: polygon-edge.tar.gz + name: blade + path: blade.tar.gz retention-days: 3 go_build_reproducibility: @@ -57,14 +55,14 @@ jobs: with: go-version: 1.20.x - - name: 'Reproduce builds' + - name: Reproduce builds continue-on-error: true run: | - go build -o ./edge-1 -trimpath -buildvcs=false - go build -o ./edge-2 -trimpath -buildvcs=false + go build -o ./blade-1 -trimpath -buildvcs=false + go build -o ./blade-2 -trimpath -buildvcs=false - buildsha1=$(shasum -a256 ./edge-1 | awk '{print $1}') - buildsha2=$(shasum -a256 ./edge-2 | awk '{print $1}') + buildsha1=$(shasum -a256 ./blade-1 | awk '{print $1}') + buildsha2=$(shasum -a256 ./blade-2 | awk '{print $1}') echo "Build 1 SHA: $buildsha1" echo "Build 2 SHA: $buildsha2" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 05acf5047c..83b401175d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,5 @@ --- -name: Pull Request CI +name: CI on: # yamllint disable-line rule:truthy workflow_dispatch: {} pull_request: diff --git a/.github/workflows/cla.yml b/.github/workflows/cla.yml index 939439fb4d..4e5b7e4444 100644 --- a/.github/workflows/cla.yml +++ b/.github/workflows/cla.yml @@ -1,29 +1,27 @@ --- name: "CLA Assistant" -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy issue_comment: types: - created pull_request_target: types: - opened - - closed - synchronize jobs: CLAssistant: runs-on: ubuntu-latest steps: - - name: "CLA Assistant" + - name: "Check CLA" if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target' - # Beta Release - uses: contributor-assistant/github-action@v2.2.0 + uses: contributor-assistant/github-action@v2.3.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # the below token should have repo scope and must be manually added by you in the repository's secret PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} with: - path-to-signatures: 'cla.json' - path-to-document: 'https://github.com/0xPolygon/polygon-edge/blob/develop/CLA.md' - branch: 'cla-signatures' + path-to-signatures: "cla.json" + path-to-document: "https://github.com/Ethernal-Tech/blade/blob/develop/CLA.md" + branch: "cla-signatures" allowlist: dependabot[bot],dependabot-preview[bot] diff --git a/.github/workflows/deploy.devnet.eph.yml b/.github/workflows/deploy.devnet.eph.yml index 6c42348402..4926e94e61 100644 --- a/.github/workflows/deploy.devnet.eph.yml +++ b/.github/workflows/deploy.devnet.eph.yml @@ -33,10 +33,10 @@ jobs: url: https://rpc.us-east-1.deph.testing.psdk.io/ runs-on: ubuntu-latest steps: - - name: Download Polygon Edge Artifact + - name: Download Blade Artifact uses: actions/download-artifact@v3 with: - name: polygon-edge + name: blade - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1-node16 @@ -74,7 +74,7 @@ jobs: - name: Publish Binary package to S3 run: | - aws s3 cp ./polygon-edge.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}" + aws s3 cp ./blade.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}" - name: Deploy Ephemeral DevNet continue-on-error: true @@ -86,8 +86,8 @@ jobs: echo "--------------------" # Should finish relatively fast. Can add a check to guard against pre-mature cycle - echo "Cleaning up the data directories and stopping Polygon-Edge service..." - aws ssm send-command --document-name polygon-edge-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null + echo "Cleaning up the data directories and stopping blade service..." + aws ssm send-command --document-name blade-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null for vasg in ${VALIDATOR_ASGS//,/ } do diff --git a/.github/workflows/deploy.devnet.yml b/.github/workflows/deploy.devnet.yml index 22ca89706b..68e9d209f7 100644 --- a/.github/workflows/deploy.devnet.yml +++ b/.github/workflows/deploy.devnet.yml @@ -33,10 +33,10 @@ jobs: url: https://rpc.us-east-1.testing.psdk.io/ runs-on: ubuntu-latest steps: - - name: Download Polygon Edge Artifact + - name: Download Blade Artifact uses: actions/download-artifact@v3 with: - name: polygon-edge + name: blade - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1-node16 @@ -74,7 +74,7 @@ jobs: - name: Publish Binary package to S3 run: | - aws s3 cp ./polygon-edge.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}" + aws s3 cp ./blade.tar.gz s3://${{ secrets.POLYGON_EDGE_ARTIFACT_BUCKET }} --metadata "{\"commit_sha\":\"${GITHUB_SHA}\"}" - name: Deploy DevNet continue-on-error: true @@ -86,8 +86,8 @@ jobs: echo "--------------------" # Should finish relatively fast. Can add a check to guard against pre-mature cycle - echo "Cleaning up the data directories and stopping Polygon-Edge Devnet service..." - aws ssm send-command --document-name polygon-edge-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null + echo "Cleaning up the data directories and stopping Blade Devnet service..." + aws ssm send-command --document-name blade-validators-maintenance-clean-data --targets Key=tag:aws:autoscaling:groupName,Values=$VALIDATOR_ASGS >> /dev/null for vasg in ${VALIDATOR_ASGS//,/ } do diff --git a/.github/workflows/deploy.testnet.yml b/.github/workflows/deploy.testnet.yml index 745776d196..8a806e80b1 100644 --- a/.github/workflows/deploy.testnet.yml +++ b/.github/workflows/deploy.testnet.yml @@ -32,10 +32,10 @@ jobs: url: https://rpc.us-east-1.tn.testing.psdk.io/ runs-on: ubuntu-latest steps: - - name: Download Polygon Edge Artifact + - name: Download Blade Artifact uses: actions/download-artifact@v3 with: - name: polygon-edge + name: blade - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1-node16 diff --git a/.github/workflows/deploy_edgenet.yaml b/.github/workflows/deploy_edgenet.yaml deleted file mode 100644 index 72683994d1..0000000000 --- a/.github/workflows/deploy_edgenet.yaml +++ /dev/null @@ -1,30 +0,0 @@ ---- -on: # yamllint disable-line rule:truthy - release: - types: - - published - -jobs: - deploy_to_edge_net: - name: Update EdgeNet - runs-on: ubuntu-latest - steps: - - name: Get aws-commander - run: | - wget https://github.com/Trapesys/aws-commander/releases/download/v0.2.0/aws-commander_0.2.0_Linux_x86_64.tar.gz - tar -xf aws-commander_0.2.0_Linux_x86_64.tar.gz - sudo mv aws-commander /usr/local/bin - - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run deployment Ansible - env: - AWS_ACCESS_KEY_ID: ${{ secrets.EDGENET_AWS_ACCESS_KEY_ID }} - AWS_SECRET_ACCESS_KEY: ${{ secrets.EDGENET_AWS_SECRET_ACCESS_KEY }} - run: > - /usr/local/bin/aws-commander - -instances i-039f7c0b3328a00f8,i-035b9f2d78cfb8ea9,i-00a6c7cb3a213f21f,i-03ac2f42ddcba6120 - -mode ansible - -playbook .github/workflows/ansible/update_edgenet.yaml - -aws-zone us-west-2 diff --git a/.github/workflows/fuzz-test.yml b/.github/workflows/fuzz-test.yml index d37a391044..e16a0b0ee5 100644 --- a/.github/workflows/fuzz-test.yml +++ b/.github/workflows/fuzz-test.yml @@ -15,7 +15,7 @@ on: # yamllint disable-line rule:truthy jobs: fuzz_test: - name: Polygon Edge + name: Blade runs-on: ubuntu-latest outputs: fuzz_output_failure: ${{ steps.run_fuzz_failure.outputs.test_output }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 292c1c19ec..1b88355531 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,13 +1,13 @@ --- name: Lint -on: # yamllint disable-line rule:truthy +on: # yamllint disable-line rule:truthy push: branches: - - '*' + - "*" tags-ignore: - - 'v*' + - "v*" paths: - - '**.go' + - "**.go" pull_request: types: - opened @@ -19,6 +19,7 @@ on: # yamllint disable-line rule:truthy jobs: golangci_lint: + name: Linter runs-on: ubuntu-latest steps: - name: Install Go diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d865dbfe6..db65302a22 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,7 @@ jobs: ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \ --rm-dist --skip-validate env: - PACKAGE_NAME: github.com/0xPolygon/polygon-edge + PACKAGE_NAME: github.com/Ethernal-Tech/blade GOLANG_CROSS_VERSION: v1.20.5 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} VERSION: ${{ steps.prepare.outputs.tag_name }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5505e24dab..061261db47 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,7 +13,7 @@ on: # yamllint disable-line rule:truthy jobs: go_test: - name: Polygon Edge + name: Blade runs-on: ubuntu-latest outputs: test_output_failure: ${{ steps.run_tests_failure.outputs.test_output }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 2a5c4f3cd1..0dfca84bdb 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -72,28 +72,6 @@ archives: - LICENSE - README.md -#nfpms: -# - vendor: 0xPolygon -# homepage: https://polygon.technology -# maintainer: Polygon Edge Team -# description: A Framework for Building Ethereum-compatible Blockchain Networks -# license: GPLv3 LGPLv3 -# -# formats: -# - apk -# - deb -# - rpm -# -# contents: -# - src: polygon-edge.service -# dst: /lib/systemd/system/polygon-edge.service -# type: config -# -# overrides: -# rpm: -# replacements: -# amd64: x86_64 - snapshot: name_template: "{{ .Tag }}.next" diff --git a/Makefile b/Makefile index 8adaee8392..af6a6998a3 100644 --- a/Makefile +++ b/Makefile @@ -42,11 +42,11 @@ build: check-go check-git $(eval VERSION = $(shell git tag --points-at ${COMMIT_HASH})) $(eval BRANCH = $(shell git rev-parse --abbrev-ref HEAD | tr -d '\040\011\012\015\n')) $(eval TIME = $(shell date)) - go build -o polygon-edge -ldflags="\ - -X 'github.com/0xPolygon/polygon-edge/versioning.Version=$(VERSION)' \ - -X 'github.com/0xPolygon/polygon-edge/versioning.Commit=$(COMMIT_HASH)'\ - -X 'github.com/0xPolygon/polygon-edge/versioning.Branch=$(BRANCH)'\ - -X 'github.com/0xPolygon/polygon-edge/versioning.BuildTime=$(TIME)'" \ + go build -o blade -ldflags="\ + -X 'github.com/Ethernal-Tech/blade/versioning.Version=$(VERSION)' \ + -X 'github.com/Ethernal-Tech/blade/versioning.Commit=$(COMMIT_HASH)'\ + -X 'github.com/Ethernal-Tech/blade/versioning.Branch=$(BRANCH)'\ + -X 'github.com/Ethernal-Tech/blade/versioning.BuildTime=$(TIME)'" \ main.go .PHONY: lint @@ -67,19 +67,19 @@ fuzz-test: check-go .PHONY: test-e2e test-e2e: check-go - go build -race -o artifacts/polygon-edge . - env EDGE_BINARY=${PWD}/artifacts/polygon-edge go test -v -timeout=30m ./e2e/... + go build -race -o artifacts/blade . + env EDGE_BINARY=${PWD}/artifacts/blade go test -v -timeout=30m ./e2e/... .PHONY: test-e2e-polybft test-e2e-polybft: check-go - go build -o artifacts/polygon-edge . - env EDGE_BINARY=${PWD}/artifacts/polygon-edge E2E_TESTS=true E2E_LOGS=true \ + go build -o artifacts/blade . + env EDGE_BINARY=${PWD}/artifacts/blade E2E_TESTS=true E2E_LOGS=true \ go test -v -timeout=1h30m ./e2e-polybft/e2e/... .PHONY: test-property-polybft test-property-polybft: check-go - go build -o artifacts/polygon-edge . - env EDGE_BINARY=${PWD}/artifacts/polygon-edge E2E_TESTS=true E2E_LOGS=true go test -v -timeout=30m ./e2e-polybft/property/... \ + go build -o artifacts/blade . + env EDGE_BINARY=${PWD}/artifacts/blade E2E_TESTS=true E2E_LOGS=true go test -v -timeout=30m ./e2e-polybft/property/... \ -rapid.checks=10 .PHONY: compile-core-contracts