diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 9f4eb5f..0000000 --- a/.dockerignore +++ /dev/null @@ -1,2 +0,0 @@ -.gradle -.idea \ No newline at end of file diff --git a/.github/workflows/develop.yaml b/.github/workflows/develop.yaml deleted file mode 100644 index 72220ad..0000000 --- a/.github/workflows/develop.yaml +++ /dev/null @@ -1,121 +0,0 @@ -name: Tests - -on: - pull_request: - branches: - - main -jobs: - build_docker_image: - runs-on: ubuntu-latest - outputs: - DOCKER_IMAGE: ${{ steps.build_docker.outputs.DOCKER_IMAGE }} - env: - architecture: "amd64" - GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4" - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - - name: Set up QEMU for Docker - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - platforms: linux/amd64,linux/arm64 - - - name: Check Dockerfile syntax - run: | - docker run --rm -i hadolint/hadolint < docker/Dockerfile - - - name: Build Docker image - id: build_docker - run: | - output=$(./gradlew distDocker) - echo "$output" - image=$(echo "$output" | grep "DOCKER_IMAGE=" | cut -d'=' -f2) - if [ -z "$image" ]; then - echo "Error: Docker image name could not be extracted." - exit 1 - fi - echo "DOCKER_IMAGE=$image" >> "$GITHUB_OUTPUT" - echo "Docker image name: $image" - docker images - - - name: Save Docker image - run: | - docker save ${{ steps.build_docker.outputs.DOCKER_IMAGE }} -o /tmp/docker-image.tar - - - name: Upload artifact - uses: actions/upload-artifact@v4 - with: - name: docker-image - path: /tmp/docker-image.tar - retention-days: 1 - - prepare_tests: - runs-on: ubuntu-latest - needs: build_docker_image - outputs: - files: ${{ steps.list.outputs.files }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Split profiles - id: list - run: | - files=$(ls linea-besu/profiles/* | xargs -n 1 basename | sed 's/\.[^.]*$//') - files_json=$(echo "$files" | tr ' ' '\n' | jq -R -s -c 'split("\n") | map(select(length > 0))') - echo "files=$files_json" >> "$GITHUB_OUTPUT" - echo "Files: $files_json" - - test-profile: - timeout-minutes: 4 - runs-on: ubuntu-latest - continue-on-error: true - needs: [prepare_tests, build_docker_image] - strategy: - fail-fast: false - matrix: - file: ${{ fromJSON(needs.prepare_tests.outputs.files) }} - env: - CONTAINER_NAME: linea-besu-profile-check-${{ matrix.file }} - DOCKER_IMAGE: ${{needs.build_docker_image.outputs.DOCKER_IMAGE}} - steps: - - name: Check repository - uses: actions/checkout@v4 - - - name: Download artifact - uses: actions/download-artifact@v4 - with: - name: docker-image - path: /tmp - - - name: Load image - run: | - docker load --input /tmp/docker-image.tar - - - name: Start container - run: | - COMMAND="docker run -d --name ${{ env.CONTAINER_NAME }} -e BESU_PROFILE=${{ matrix.file }} ${{ env.DOCKER_IMAGE }}" - echo $COMMAND - eval $COMMAND - - - name: Verify besu container - run: bash .github/workflows/BesuContainerVerify.sh - env: - CONTAINER_NAME: ${{ env.CONTAINER_NAME }} - - - name: Stop container - run: docker stop ${{ env.CONTAINER_NAME }} - diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index 8bfd0dc..0000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Validate Gradle Wrapper" -on: [push, pull_request] - -jobs: - validation: - name: "Validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: gradle/wrapper-validation-action@v1 diff --git a/.github/workflows/linea-devnet.yml b/.github/workflows/linea-devnet.yml deleted file mode 100644 index 606e487..0000000 --- a/.github/workflows/linea-devnet.yml +++ /dev/null @@ -1,117 +0,0 @@ -name: linea-devnet - -on: - workflow_call: - outputs: - workflow_run_id: - description: "the run id of the workflow" - value: ${{ jobs.build.outputs.workflow_run_id }} - workflow_dispatch: - -permissions: - id-token: write - contents: read - -jobs: - build: - runs-on: ubuntu-latest - environment: build - outputs: - workflow_run_id: ${{ steps.workflow_details.outputs.id }} - steps: - - - name: checkout - uses: actions/checkout@v4 - - - name: get workflow_details - id: workflow_details - run: echo "id=${{ github.run_id }}" >> $GITHUB_OUTPUT - - - name: get versions via dotenv - id: dotenv - uses: falti/dotenv-action@v1 - with: - path: versions/linea-devnet.env - mode: development - keys-case: lower - log-variables: true - load-mode: strict - - - name: set docker tag - id: dockertag - run: | - if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then - echo "IMAGE=devnet-${{ github.ref_name }}" >> $GITHUB_OUTPUT - else - echo "IMAGE=devnet-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT - fi - - - name: download and untar the linea-besu archive - run: | - cd /tmp/ - echo "downloading linea-besu: ${{ steps.dotenv.outputs.linea_besu_tar_gz }}" - wget -nv "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/${{ steps.dotenv.outputs.linea_besu_tar_gz }}/linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}.tar.gz" - tar -xvf linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}.tar.gz - mkdir -p /opt/besu - mv /tmp/linea-besu-${{ steps.dotenv.outputs.linea_besu_tar_gz }}/* /opt/besu/ - echo "moved to /opt/besu" - - - name: copy the list of versions to the container - run: | - cp ./versions/linea-devnet.env /opt/besu/versions.txt - mkdir -p /opt/besu/plugins - - - name: get the plugins - run: | - cd /opt/besu/plugins - - echo "getting linea_sequencer_plugin_version: ${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}" - wget -nv "https://github.com/Consensys/linea-sequencer/releases/download/v${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}/besu-sequencer-plugins-v${{ steps.dotenv.outputs.linea_sequencer_plugin_version }}.jar" -P /opt/besu/plugins - - echo "getting finalized_tag_updater_plugin_version: ${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}" - wget -nv "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}/finalized-tag-updater-v${{ steps.dotenv.outputs.finalized_tag_updater_plugin_version }}.jar" -P /opt/besu/plugins - - echo "getting linea_tracer_plugin_version: ${{ steps.dotenv.outputs.linea_tracer_plugin_version }}" - wget -nv "https://github.com/Consensys/linea-tracer/releases/download/v${{ steps.dotenv.outputs.linea_tracer_plugin_version }}/linea-tracer-v${{ steps.dotenv.outputs.linea_tracer_plugin_version }}.jar" -P /opt/besu/plugins - - echo "getting shomei_plugin_version: ${{ steps.dotenv.outputs.shomei_plugin_version }}" - wget -nv "https://github.com/Consensys/besu-shomei-plugin/releases/download/v${{ steps.dotenv.outputs.shomei_plugin_version }}/besu-shomei-plugin-v${{ steps.dotenv.outputs.shomei_plugin_version }}.jar" -P /opt/besu/plugins - - - name: piece the package together to build the docker images - run: | - cd linea-besu - mv /opt/besu ./ - mv config/ genesis/ profiles/ besu/ - tree . - - # - name: set up docker buildx - # uses: docker/setup-buildx-action@v3 - - # - name: login to docker - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKER_USER_RW }} - # password: ${{ secrets.DOCKER_PASSWORD_RW }} - - # - name: set docker build args - # run: | - # echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} - # echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}" - - # - name: build and push the combined manifest - # uses: docker/build-push-action@v6 - # env: - # DOCKER_BUILD_SUMMARY: false - # with: - # context: besu-fleet/. - # platforms: linux/arm64,linux/amd64 - # provenance: false - # cache-from: type=local,src=/tmp/.buildx-cache - # cache-to: type=local,dest=/tmp/.buildx-cache - # build-args: | - # VERSION=${{ steps.dockertag.outputs.IMAGE }} - # VCS_REF=${{ github.sha }} - # BUILD_DATE=${{ env.BUILD_DATE }} - # push: true - # tags: | - # consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} \ No newline at end of file diff --git a/.github/workflows/linea-mainnet.yml b/.github/workflows/linea-mainnet.yml index c4607fc..7885c84 100644 --- a/.github/workflows/linea-mainnet.yml +++ b/.github/workflows/linea-mainnet.yml @@ -15,7 +15,7 @@ permissions: jobs: build: runs-on: ubuntu-latest - environment: build + environment: dockerhub outputs: workflow_run_id: ${{ steps.workflow_details.outputs.id }} steps: @@ -82,35 +82,104 @@ jobs: mv config/ genesis/ profiles/ besu/ tree . - # - name: set up docker buildx - # uses: docker/setup-buildx-action@v3 - - # - name: login to docker - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKER_USER_RW }} - # password: ${{ secrets.DOCKER_PASSWORD_RW }} - - # - name: set docker build args - # run: | - # echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} - # echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}" - - # - name: build and push the combined manifest - # uses: docker/build-push-action@v6 - # env: - # DOCKER_BUILD_SUMMARY: false - # with: - # context: besu-fleet/. - # platforms: linux/arm64,linux/amd64 - # provenance: false - # cache-from: type=local,src=/tmp/.buildx-cache - # cache-to: type=local,dest=/tmp/.buildx-cache - # build-args: | - # VERSION=${{ steps.dockertag.outputs.IMAGE }} - # VCS_REF=${{ github.sha }} - # BUILD_DATE=${{ env.BUILD_DATE }} - # push: true - # tags: | - # consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} + - name: set up docker buildx + uses: docker/setup-buildx-action@v3 + - name: login to docker + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USER_RW }} + password: ${{ secrets.DOCKER_PASSWORD_RW }} + + - name: set docker build args + run: | + echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} + echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}" + + - name: build and push the combined manifest + uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_SUMMARY: false + with: + context: linea-besu/. + platforms: linux/arm64,linux/amd64 + provenance: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: | + VERSION=${{ steps.dockertag.outputs.IMAGE }} + VCS_REF=${{ github.sha }} + BUILD_DATE=${{ env.BUILD_DATE }} + push: true + tags: | + consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} + + ### release process artifacts + ## adds one more tag :latest the above push on a release + - name: build and push the combined manifest + if: startsWith(github.ref, 'refs/tags/v') + uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_SUMMARY: false + with: + context: linea-besu/. + platforms: linux/arm64,linux/amd64 + provenance: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: | + VERSION=${{ steps.dockertag.outputs.IMAGE }} + VCS_REF=${{ github.sha }} + BUILD_DATE=${{ env.BUILD_DATE }} + push: true + tags: | + consensys/linea-besu-package:mainnet-latest + + ### release package artifacts + - name: release on tag - create artifacts for a release + if: startsWith(github.ref, 'refs/tags/v') + id: release_create_artifacts + run: | + mkdir release && cd release + tar -czvf linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz ../linea-besu/ + + echo "## Release Artifact: Linea - Mainnet" > output.md + echo "linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz" >> output.md + echo "SHA256: $(sha256sum linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz | awk '{ print $1 }' )" >> output.md + echo "" >> output.md + + echo "## Besu and Plugin Details" >> output.md + echo "| Module | Version | SHA-256 |" >> output.md + echo "|--------|---------|--------------|" >> output.md + echo "| linea-besu | ${{ steps.dotenv.outputs.LINEA_BESU_TAR_GZ }} | $(sha256sum /tmp/linea-besu-${{ steps.dotenv.outputs.LINEA_BESU_TAR_GZ }}.tar.gz | awk '{ print $1 }' ) |" >> output.md + echo "| linea-sequencer-plugin | ${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-sequencer-plugins-v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| linea-tracer-plugin | ${{ steps.dotenv.outputs.LINEA_TRACER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-tracer-v${{ steps.dotenv.outputs.LINEA_TRACER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| linea-finalized-tag-updater-plugin | ${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/finalized-tag-updater-v${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| shomei-plugin | ${{ steps.dotenv.outputs.SHOMEI_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-shomei-plugin-v${{ steps.dotenv.outputs.SHOMEI_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "" >> output.md + + MANIFEST=$(consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }}) + if [ $? -eq 0 ]; then + echo "## Docker Image Details" >> output.md + echo "" >> output.md + echo "To pull the image, use the following command:" >> output.md + echo "\`\`\`" >> output.md + echo "docker pull consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }}" >> output.md + echo "\`\`\`" >> output.md + echo "" >> output.md + echo "| Digest | OS | Architecture |" >> output.md + echo "|--------|----|--------------|" >> output.md + echo "$MANIFEST" | jq -r '.manifests[] | select(.platform.architecture != "unknown" and .platform.os != "unknown") | "| \(.digest) | \(.platform.os) | \(.platform.architecture) |"' >> output.md + else + echo "Docker image consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} does not exist on dockerhub" + exit 1 + fi + + - name: upload linea-mainnet artifacts + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-artifact@v4 + with: + name: linea-mainnet + retention-days: 1 + path: | + ./release diff --git a/.github/workflows/linea-sepolia.yml b/.github/workflows/linea-sepolia.yml index 21a906d..e76a372 100644 --- a/.github/workflows/linea-sepolia.yml +++ b/.github/workflows/linea-sepolia.yml @@ -15,7 +15,7 @@ permissions: jobs: build: runs-on: ubuntu-latest - environment: build + environment: dockerhub outputs: workflow_run_id: ${{ steps.workflow_details.outputs.id }} steps: @@ -64,7 +64,7 @@ jobs: cd /tmp/besu/plugins echo "getting linea_sequencer_plugin_version: ${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}" - wget -nv "https://github.com/Consensys/linea-sequencer/releases/download/v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}/besu-sequencer-plugins-v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}.jar" -P /tmp/besu/plugins + wget -nv "https://github.com/Consensys/linea-sequencer/releases/download/v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}/linea-sequencer-v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}.jar" -P /tmp/besu/plugins echo "getting finalized_tag_updater_plugin_version: ${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }}" wget -nv "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }}/finalized-tag-updater-v${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }}.jar" -P /tmp/besu/plugins @@ -82,35 +82,103 @@ jobs: mv config/ genesis/ profiles/ besu/ tree . - # - name: set up docker buildx - # uses: docker/setup-buildx-action@v3 - - # - name: login to docker - # uses: docker/login-action@v3 - # with: - # username: ${{ secrets.DOCKER_USER_RW }} - # password: ${{ secrets.DOCKER_PASSWORD_RW }} - - # - name: set docker build args - # run: | - # echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} - # echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}" - - # - name: build and push the combined manifest - # uses: docker/build-push-action@v6 - # env: - # DOCKER_BUILD_SUMMARY: false - # with: - # context: besu-fleet/. - # platforms: linux/arm64,linux/amd64 - # provenance: false - # cache-from: type=local,src=/tmp/.buildx-cache - # cache-to: type=local,dest=/tmp/.buildx-cache - # build-args: | - # VERSION=${{ steps.dockertag.outputs.IMAGE }} - # VCS_REF=${{ github.sha }} - # BUILD_DATE=${{ env.BUILD_DATE }} - # push: true - # tags: | - # consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} + - name: set up docker buildx + uses: docker/setup-buildx-action@v3 + - name: login to docker + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USER_RW }} + password: ${{ secrets.DOCKER_PASSWORD_RW }} + + - name: set docker build args + run: | + echo "BUILD_DATE=$(date --rfc-3339=date)" >> ${GITHUB_ENV} + echo "Building image tag: ${{ steps.dockertag.outputs.IMAGE }}" + + - name: build and push the combined manifest + uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_SUMMARY: false + with: + context: linea-besu/. + platforms: linux/arm64,linux/amd64 + provenance: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: | + VERSION=${{ steps.dockertag.outputs.IMAGE }} + VCS_REF=${{ github.sha }} + BUILD_DATE=${{ env.BUILD_DATE }} + push: true + tags: | + consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} + + ### release process artifacts + ## adds one more tag :latest the above push on a release + - name: build and push the combined manifest + uses: docker/build-push-action@v6 + env: + DOCKER_BUILD_SUMMARY: false + with: + context: linea-besu/. + platforms: linux/arm64,linux/amd64 + provenance: false + cache-from: type=local,src=/tmp/.buildx-cache + cache-to: type=local,dest=/tmp/.buildx-cache + build-args: | + VERSION=${{ steps.dockertag.outputs.IMAGE }} + VCS_REF=${{ github.sha }} + BUILD_DATE=${{ env.BUILD_DATE }} + push: true + tags: | + consensys/linea-besu-package:sepolia-latest + + ### release package artifacts + - name: release on tag - create artifacts for a release + if: startsWith(github.ref, 'refs/tags/v') + id: release_create_artifacts + run: | + mkdir release && cd release + tar -czvf linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz ../linea-besu/ + + echo "## Release Artifact: Linea - Sepolia" > output.md + echo "linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz" >> output.md + echo "SHA256: $(sha256sum linea-besu-${{ steps.dockertag.outputs.IMAGE }}.tar.gz | awk '{ print $1 }' )" >> output.md + echo "" >> output.md + + echo "## Besu and Plugin Details" >> output.md + echo "| Module | Version | SHA-256 |" >> output.md + echo "|--------|---------|--------------|" >> output.md + echo "| linea-besu | ${{ steps.dotenv.outputs.LINEA_BESU_TAR_GZ }} | $(sha256sum /tmp/linea-besu-${{ steps.dotenv.outputs.LINEA_BESU_TAR_GZ }}.tar.gz | awk '{ print $1 }' ) |" >> output.md + echo "| linea-sequencer-plugin | ${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-sequencer-plugins-v${{ steps.dotenv.outputs.LINEA_SEQUENCER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| linea-tracer-plugin | ${{ steps.dotenv.outputs.LINEA_TRACER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-tracer-v${{ steps.dotenv.outputs.LINEA_TRACER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| linea-finalized-tag-updater-plugin | ${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/finalized-tag-updater-v${{ steps.dotenv.outputs.FINALIZED_TAG_UPDATER_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "| shomei-plugin | ${{ steps.dotenv.outputs.SHOMEI_PLUGIN_VERSION }} | $(sha256sum ../linea-besu/besu/plugins/besu-shomei-plugin-v${{ steps.dotenv.outputs.SHOMEI_PLUGIN_VERSION }}.jar | awk '{ print $1 }' ) |" >> output.md + echo "" >> output.md + + MANIFEST=$(consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }}) + if [ $? -eq 0 ]; then + echo "## Docker Image Details" >> output.md + echo "" >> output.md + echo "To pull the image, use the following command:" >> output.md + echo "\`\`\`" >> output.md + echo "docker pull consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }}" >> output.md + echo "\`\`\`" >> output.md + echo "" >> output.md + echo "| Digest | OS | Architecture |" >> output.md + echo "|--------|----|--------------|" >> output.md + echo "$MANIFEST" | jq -r '.manifests[] | select(.platform.architecture != "unknown" and .platform.os != "unknown") | "| \(.digest) | \(.platform.os) | \(.platform.architecture) |"' >> output.md + else + echo "Docker image consensys/linea-besu-package:${{ steps.dockertag.outputs.IMAGE }} does not exist on dockerhub" + exit 1 + fi + + - name: upload linea-sepolia artifacts + if: startsWith(github.ref, 'refs/tags/v') + uses: actions/upload-artifact@v4 + with: + name: linea-sepolia + retention-days: 1 + path: | + ./release diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml deleted file mode 100644 index 266291e..0000000 --- a/.github/workflows/publish.yaml +++ /dev/null @@ -1,95 +0,0 @@ -name: CI - -on: - push: - branches: - - main - release: - types: [released] - tags: - - 'v[0-9]+.[0-9]+.[0-9]+' -jobs: - build_and_publish_docker_image: - runs-on: ubuntu-latest - env: - architecture: "amd64" - GRADLE_OPTS: "-Xmx6g -Dorg.gradle.parallel=true -Dorg.gradle.workers.max=4" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up JDK 21 - uses: actions/setup-java@v3 - with: - java-version: 21 - distribution: temurin - - - name: Set up QEMU for Docker - uses: docker/setup-qemu-action@v3 - with: - platforms: arm64 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - with: - platforms: linux/amd64,linux/arm64 - - - name: Check Dockerfile syntax - run: | - docker run --rm -i hadolint/hadolint < docker/Dockerfile - - - name: Get VERSION output - if: github.event_name == 'release' - id: get_version - run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_OUTPUT - - - name: Login to Docker Hub for self hosted - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USER_RW }} - password: ${{ secrets.DOCKER_PAT_RW }} - - - name: Build Docker Image - run: | - if [ "${{ github.event_name }}" == "release" ]; then \ - ./gradlew -PdockerOrgName=consensys -Pdocker-platform=linux/amd64,linux/arm64 distDocker -PreleaseVersion=${{ steps.get_version.outputs.VERSION }} -PpublishDocker=true; \ - else \ - ./gradlew -PdockerOrgName=consensys -Pdocker-platform=linux/amd64,linux/arm64 distDocker -PpublishDocker=true; \ - fi - - - name: Verify Docker image - if: github.event_name == 'release' - id: verify - run: | - MANIFEST=$(docker manifest inspect consensys/linea-besu-package:${{ steps.get_version.outputs.VERSION }}) - if [ $? -eq 0 ]; then - echo "## Docker Image Details" > output.md - echo "" >> output.md - echo "To pull the image, use the following command:" >> output.md - echo "\`\`\`" >> output.md - echo "docker pull consensys/linea-besu-package:${{ steps.get_version.outputs.VERSION }}" >> output.md - echo "\`\`\`" >> output.md - echo "" >> output.md - echo "| Digest | OS | Architecture |" >> output.md - echo "|--------|----|--------------|" >> output.md - echo "$MANIFEST" | jq -r '.manifests[] | select(.platform.architecture != "unknown" and .platform.os != "unknown") | "| \(.digest) | \(.platform.os) | \(.platform.architecture) |"' >> output.md - else - echo "Docker image consensys/linea-besu-package:${{ steps.get_version.outputs.VERSION }} does not exist on Docker Hub." - exit 1 - fi - - - name: Update Release - uses: softprops/action-gh-release@v2 - if: startsWith(github.ref, 'refs/tags/') - with: - body_path: output.md - append_body: true - - - name: Pull, Tag, and Push Docker Image as latest - if: github.event_name == 'release' - run: | - docker pull consensys/linea-besu-package:${{ steps.get_version.outputs.VERSION }} - docker buildx imagetools create \ - --tag consensys/linea-besu-package:latest \ - consensys/linea-besu-package:${{ steps.get_version.outputs.VERSION }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 66926b9..5baf79e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,43 +1,86 @@ -name: Release +name: release on: push: tags: - 'v[0-9]+.[0-9]+.[0-9]+' + workflow_dispatch: + +permissions: + actions: read + id-token: write + contents: write jobs: - create_release: + linea-mainnet: + uses: ./.github/workflows/linea-mainnet.yml + secrets: inherit + + linea-sepolia: + uses: ./.github/workflows/linea-sepolia.yml + secrets: inherit + + release: + needs: + - linea-mainnet + - linea-sepolia runs-on: ubuntu-latest + environment: dockerhub steps: - - uses: actions/checkout@v3 - - name: Set up JDK 21 - uses: actions/setup-java@v3 + - name: checkout + uses: actions/checkout@v4 + + - name: collate the artifacts into a folder + run: | + mkdir dist + echo "Artifacts workflow_run_id: ${{ needs.ethereum.outputs.workflow_run_id }}" + + - name: download linea-mainnet + uses: actions/download-artifact@v4 with: - java-version: 21 - distribution: temurin - cache: 'gradle' + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: Consensys/linea-besu-package + name: linea-mainnet + path: dist/linea-mainnet + run-id: ${{ needs.linea-mainnet.outputs.workflow_run_id }} - - name: Grant execute permission for gradlew - run: chmod +x gradlew + - name: download linea-sepolia + uses: actions/download-artifact@v4 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: Consensys/linea-besu-package + name: linea-sepolia + path: dist/linea-sepolia + run-id: ${{ needs.linea-sepolia.outputs.workflow_run_id }} - - name: Get VERSION output - id: get_version - run: echo "VERSION=${{ github.ref_name }}" >> $GITHUB_OUTPUT + - name: set release tag + id: releasetag + run: | + if [ "${{ github.event_name }}" == "push" ] && [ "${{ github.ref_type }}" == "tag" ]; then + echo "TAG=${{ github.ref_name }}" >> $GITHUB_OUTPUT + else + echo "TAG=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + fi - - name: Build without tests - run: ./gradlew build -PreleaseVersion=${{ steps.get_version.outputs.VERSION }} - env: - JAVA_OPTS: -Xmx2g -Dorg.gradle.daemon=false + - name: concatenate the three release files + run: | + tree dist + tar -czvf linea-besu-package-mainnet${{ steps.releasetag.outputs.TAG }}.tar.gz ./dist/linea-mainnet + tar -czvf linea-besu-package-sepolia${{ steps.releasetag.outputs.TAG }}.tar.gz ./dist/linea-sepolia + cat dist/linea-mainnet/output.md >> output.md + cat dist/linea-sepolia/output.md >> output.md - - name: Draft Release + - name: release on tag - publish artifacts and release notes + if: startsWith(github.ref, 'refs/tags/v') + id: release_publish uses: softprops/action-gh-release@v2 with: name: Release ${{ github.ref_name }} - body_path: build/release-notes.md + body_path: output.md generate_release_notes: true fail_on_unmatched_files: true - draft: true files: | - ./build/distributions/linea-besu-package-${{ steps.get_version.outputs.VERSION }}.tar.gz \ No newline at end of file + linea-besu-package-mainnet${{ steps.releasetag.outputs.TAG }}.tar.gz + linea-besu-package-sepolia${{ steps.releasetag.outputs.TAG }}.tar.gz \ No newline at end of file diff --git a/README.md b/README.md index 038656d..e753260 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,12 @@ docker compose -f ./docker/docker-compose-basic-mainnet.yaml up Alternatively, to run a node with a specific profile, set the `BESU_PROFILE` environment variable to the desired profile name: ```sh -docker run -e BESU_PROFILE=basic-mainnet consensys/linea-besu-package:latest +docker run -e BESU_PROFILE=basic-mainnet consensys/linea-besu-package:mainnet-latest +``` +Or use the sepolia image +```sh +docker run -e BESU_PROFILE=basic-mainnet consensys/linea-besu-package:sepolia-latest ``` - ## Run with a binary distribution ### Step 1. Install Linea Besu from packaged binaries @@ -60,41 +63,21 @@ bin/besu --profile=advanced-mainnet --plugin-linea-l1-rpc-endpoint=YOUR_L1_RPC_E ## Build from source -The build process is driven by the following configuration file: - -- [linea-besu/build.json](https://github.com/Consensys/linea-besu-package/tree/main/linea-besu/build.json): This file specifies the modules to be downloaded, extracted, or copied. - -To execute the complete build process, which includes downloading, extracting, copying plugins, and creating -distributions, use the following command: - -```sh -./gradlew build -``` - -This command will generate two distribution files: - -- `/build/distributions/linea-besu-package-.tar.gz` -- `/build/distributions/linea-besu-package-.zip` - -To create the Docker image, run: +1. Make a branch with changes to `versions/linea-*.env` as needed +2. Go to the [actions tab](https://github.com/Consensys/linea-besu-package/actions) and click on the appropriate workflow and select your branch - docker image will get published -```sh -./gradlew distDocker -``` ## How-To Release Releases are automated using GitHub Actions and are triggered by pushing a tag that matches the pattern `'v[0-9]+.[0-9]+.[0-9]+`. (e.g., `v1.0.0`, `v2.1.3`) -The tag creation will draft a release and include the distribution artifact uploaded as an asset. +The tag creation will create a release and include the distribution artifact uploaded as an asset. ```sh - git tag -a 'v0.0.1' 5cf01f9 -m 'Release test' - git push upstream v1.0.0 + git tag v0.0.1 + git push upstream v0.0.1 ``` -Once the GitHub draft release is published, the Docker image will be created and pushed to the registry. Additionally, -the `latest` tag will be updated to match this release. - +Additionally, the `latest` tag will be updated to match this release. ## Profiles diff --git a/build.gradle b/build.gradle deleted file mode 100644 index 2740c3b..0000000 --- a/build.gradle +++ /dev/null @@ -1,344 +0,0 @@ -plugins { - id 'com.diffplug.spotless' version '6.25.0' - id 'com.github.ben-manes.versions' version '0.26.0' - id 'com.github.hierynomus.license' version '0.16.1' - id 'io.spring.dependency-management' version '1.1.0' - id 'net.ltgt.errorprone' version '2.0.2' - id 'de.undercouch.download' version '5.6.0' - id 'maven-publish' - id 'groovy' -} - -repositories { - mavenCentral() -} - -dependencies { - implementation 'org.codehaus.groovy:groovy-json:3.0.9' -} - -version = calculateVersion() - -tasks.named('jar').configure { - enabled = false -} - -import de.undercouch.gradle.tasks.download.Download -import groovy.json.JsonSlurper -import org.apache.commons.codec.digest.DigestUtils - -def configFile = file('linea-besu/build.json') -def config = new JsonSlurper().parseText(configFile.text) -def modules = config.modules - -// Constants for paths -ext { - DOWNLOADS_DIR = "$buildDir/downloads" - TAR_DIR = "$buildDir/tar" - DIST_OUTPUT_DIR = "$buildDir/${config.distOutput}" - DISTRIBUTIONS_INSTALL_DIR = "$buildDir/distributions/install" - DISTRIBUTIONS_DIR = "$buildDir/distributions" -} - -static def getFileNameFromUrl(url) { - return url.split('/').last() -} - -// Register a task to download a file -def registerDownloadTask(taskName, distributionUrl) { - def fileName = getFileNameFromUrl(distributionUrl) - return tasks.register("download${taskName}", Download) { - src distributionUrl - dest "$DOWNLOADS_DIR/$fileName" - overwrite true - doLast { - def sha256Hex = DigestUtils.sha256Hex(new FileInputStream("$DOWNLOADS_DIR/$fileName")) - println "Downloaded $fileName $sha256Hex" - } - } -} - -// Download and copy a file to the output directory -def downloadAndCopy(taskName, distributionUrl, distOutput, outputDir) { - def fileName = getFileNameFromUrl(distributionUrl) - def outputPath = outputDir ? "$DIST_OUTPUT_DIR/$outputDir" : DIST_OUTPUT_DIR - registerDownloadTask(taskName, distributionUrl).configure { - doLast { - copy { - from file("$DOWNLOADS_DIR/$fileName") - into outputPath - } - } - } -} - -// Register a task to download and extract a tar file -def registerDownloadAndExtractTask(taskName, distributionUrl, distOutput, outputDir) { - def downloadTask = registerDownloadTask(taskName, distributionUrl) - def outputPath = outputDir ? "$DIST_OUTPUT_DIR/$outputDir" : DIST_OUTPUT_DIR - def fileName = getFileNameFromUrl(distributionUrl) - tasks.register("extract${taskName}", Copy) { - from(tarTree("$DOWNLOADS_DIR/$fileName")) { - eachFile { fileCopyDetails -> - def segments = fileCopyDetails.path.split('/') - if (segments.length > 1) { - fileCopyDetails.path = segments.drop(1).join('/') - } else { - fileCopyDetails.exclude() - } - } - } - into(outputPath) - includeEmptyDirs = false - dependsOn(downloadTask) - } -} - -// Register a task to copy files -def registerCopyTask(taskName, src, distOutput, outputDir) { - if (!outputDir) { - throw new GradleException("outputDir must be defined for copy type") - } - tasks.register("copy${taskName}", Copy) { - from(src) - into "$DIST_OUTPUT_DIR/$outputDir" - includeEmptyDirs = false - } -} - -// Process each module based on its type -modules.each { module -> - def taskName = module.name.capitalize() - switch (module.type) { - case 'download': - def distributionUrl = module.url.replace("{version}", module.version) - downloadAndCopy(taskName, distributionUrl, config.distOutput, module.outputDir) - break - case 'extract': - def distributionUrl = module.url.replace("{version}", module.version) - registerDownloadAndExtractTask(taskName, distributionUrl, config.distOutput, module.outputDir) - break - case 'copy': - registerCopyTask(taskName, module.src, config.distOutput, module.outputDir) - break - } -} - -// Register a task to process all modules -tasks.register('processModules') { - dependsOn modules.collect { module -> - def taskName = module.name.capitalize() - switch (module.type) { - case 'compile': - return "compile${taskName}" - case 'download': - return "download${taskName}" - case 'extract': - return "extract${taskName}" - case 'copy': - return "copy${taskName}" - default: - return null - } - }.findAll { it != null } -} - -// Register a task to prepare the distribution folder -tasks.register('prepareDistFolder', Copy) { - dependsOn processModules - def newFolderName = "${config.distIdentifier}-${version}" - def newFolderPath = "$TAR_DIR/$newFolderName" - - doFirst { - delete newFolderPath - } - - from(DIST_OUTPUT_DIR) { - includeEmptyDirs = false - exclude "**/LICENSE" - } - into newFolderPath -} - -tasks.register('updateModifiedDates') { - dependsOn 'prepareDistFolder' - - def newFolderName = "${config.distIdentifier}-${version}" - def newFolderPath = "$TAR_DIR/$newFolderName" - - doLast { - // Get the last commit timestamp - def lastCommitTimestamp = 'git log -1 --format=%ct'.execute().text.trim() - def lastCommitTimeInMillis = Long.parseLong(lastCommitTimestamp) * 1000 - - println "Last commit timestamp (in milliseconds): ${lastCommitTimeInMillis}" - - // Update the modified date of all files and folders in the specified folder - def folder = file(newFolderPath) - if (folder.exists() && folder.isDirectory()) { - folder.eachFileRecurse { file -> - file.setLastModified(lastCommitTimeInMillis) - } - // Update the modified date of the folder itself - folder.setLastModified(lastCommitTimeInMillis) - } else { - println "Folder does not exist or is not a directory: ${newFolderPath}" - } - } -} - -// Register a task to create a tar archive of the distribution -tasks.register('distTar', Tar) { - dependsOn 'prepareDistFolder', 'updateModifiedDates' - - def outputTarGzFileName = "${config.distIdentifier}-${version}.tar.gz" - - from(TAR_DIR) { - includeEmptyDirs = false - } - - archiveFileName.set(outputTarGzFileName) - destinationDirectory.set(file("$DISTRIBUTIONS_DIR")) - compression = Compression.GZIP - - doLast { - def tarFile = file("$DISTRIBUTIONS_DIR/${config.distIdentifier}-${version}.tar.gz") - if (!tarFile.exists()) { - throw new GradleException("Tar file not found: $tarFile") - } - - def sha256Hex = DigestUtils.sha256Hex(new FileInputStream(tarFile)) - println "SHA-256 hash: $sha256Hex" - } -} - -ext.besuPluginsIdentifier = "${config.distIdentifier}-${version}" - -// Register a task to install the distribution -tasks.register('installDist', Copy) { - dependsOn distTar - - from(tarTree(distTar.outputs.files.singleFile)) { - eachFile { path = path.replaceFirst(besuPluginsIdentifier, config.distIdentifier) } - includeEmptyDirs = false - } - into DISTRIBUTIONS_INSTALL_DIR -} - -// Register a task to create a zip archive of the distribution -tasks.register('distZip', Zip) { - dependsOn installDist - - archiveBaseName.set(config.distIdentifier) - from installDist.outputs.files - archiveExtension.set('zip') -} - -// Define artifacts for publishing -artifacts { - archives tasks.distTar - archives tasks.distZip -} - -// Register a task to verify the distributions -tasks.register("verifyDistributions") { - dependsOn distTar - dependsOn distZip - def distTarFile = distTar.outputs.files.singleFile - def distZipFile = distZip.outputs.files.singleFile - def minDistributionSize = 20000000 - - doFirst { - if (distTarFile.length() < minDistributionSize) { - throw new GradleException("Distribution tar is suspiciously small: ${distTarFile.length()} bytes") - } - if (distZipFile.length() < minDistributionSize) { - throw new GradleException("Distribution zip is suspiciously small: ${distZipFile.length()} bytes") - } - } -} - -// Takes the version, and if -SNAPSHOT is part of it replaces SNAPSHOT -// with the git commit version. -def calculateVersion() { - String version = project.hasProperty('releaseVersion') ? project.getProperty('releaseVersion') : 'snapshot' - if (version.endsWith("-SNAPSHOT")) { - version = version.replace("-SNAPSHOT","-dev-" + getCheckedOutGitCommitHash()) - } - return version -} - -def getCheckedOutGitCommitHash() { - def gitFolder = "$projectDir/.git/" - if (!file(gitFolder).isDirectory()) { - // We are in a submodule. The file's contents are `gitdir: \n`. - // Read the file, cut off the front, and trim the whitespace. - gitFolder = file(gitFolder).text.substring(8).trim() + "/" - } - def takeFromHash = 8 - /* - * '.git/HEAD' contains either - * in case of detached head: the currently checked out commit hash - * otherwise: a reference to a file containing the current commit hash - */ - def head = new File(gitFolder + "HEAD").text.split(":") // .git/HEAD - def isCommit = head.length == 1 // e5a7c79edabbf7dd39888442df081b1c9d8e88fd - - if(isCommit) return head[0].trim().take(takeFromHash) // e5a7c79edabb - - def refHead = new File(gitFolder + head[1].trim()) // .git/refs/heads/master - refHead.text.trim().take takeFromHash -} - - -tasks.register('cleanDist') { - delete "$DOWNLOADS_DIR" - delete "$TAR_DIR" - delete "$DIST_OUTPUT_DIR" - delete "$DISTRIBUTIONS_INSTALL_DIR" - delete "$DISTRIBUTIONS_DIR" -} - -// Task to generate release-notes.md -tasks.register('generateReleaseNotes') { - dependsOn distTar - doLast { - def releaseNotesFile = file("$buildDir/release-notes.md") - if (releaseNotesFile.exists()) { - releaseNotesFile.delete() - } - releaseNotesFile.text = "## Release Notes\n\n| Module | Version | SHA-256 |\n|--------|---------|---------|\n" - modules.each { module -> - if (module.src == null) { - def versionInfo = module.version ? module.version : "[source](${module.url})" - def fileName = getFileNameFromUrl(module.url.replace("{version}", module.version)) - def filePath = "$DOWNLOADS_DIR/$fileName" - def sha256Hex = file(filePath).exists() ? DigestUtils.sha256Hex(new FileInputStream(filePath)) : "N/A" - releaseNotesFile.append("| **${module.name}** | ${versionInfo} | ${sha256Hex} |\n") - } - } - - // Add title and SHA-256 digest of the distTar artifact - def tarFile = file("$DISTRIBUTIONS_DIR/${config.distIdentifier}-${version}.tar.gz") - if (tarFile.exists()) { - def sha256Hex = DigestUtils.sha256Hex(new FileInputStream(tarFile)) - releaseNotesFile.append("\n### Release Artifact\n") - releaseNotesFile.append("${tarFile.name}\n") - releaseNotesFile.append("SHA-256: ${sha256Hex}\n") - } else { - throw new GradleException("Tar file not found: $tarFile") - } - } -} - - - -// Ensure release notes are generated during the build -tasks.build { - dependsOn 'generateReleaseNotes' -} - -processModules.dependsOn(cleanDist) - -// Apply additional Gradle script for Docker -apply from: rootProject.file("gradle/docker.gradle") \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index a4e950a..0000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,64 +0,0 @@ -FROM ubuntu:24.04 -ARG VERSION="dev" -ENV NO_PROXY_CACHE="-o Acquire::BrokenProxy=true -o Acquire::http::No-Cache=true -o Acquire::http::Pipeline-Depth=0" - -# Update and install dependencies without using any cache -RUN apt-get update $NO_PROXY_CACHE && \ - # $NO_PROXY_CACHE must not be used here or otherwise will trigger a hadolint error - apt-get -o Acquire::BrokenProxy=true -o Acquire::http::No-Cache=true -o Acquire::http::Pipeline-Depth=0 \ - --no-install-recommends -q --assume-yes install openjdk-21-jre-headless=21* libjemalloc-dev=5.* adduser=3* && \ - # Clean apt cache - apt-get clean && \ - rm -rf /var/cache/apt/archives/* /var/cache/apt/archives/partial/* && \ - rm -rf /var/lib/apt/lists/* && \ - # Starting from version 23.10, Ubuntu comes with an "ubuntu" user with uid 1000. We need 1000 for besu. - userdel ubuntu 2>/dev/null || true && rm -rf /home/ubuntu && \ - # Ensure we use a stable UID for besu, as file permissions are tied to UIDs. - adduser --uid 1000 --disabled-password --gecos "" --home /opt/besu besu && \ - chown besu:besu /opt/besu && \ - chmod 0755 /opt/besu && \ - # Create /data folder and set permissions - mkdir /data && \ - chown besu:besu /data && \ - chmod 0755 /data - -USER besu -WORKDIR /opt/besu - -COPY --chown=besu:besu besu /opt/besu/ - -# Expose services ports -# 8545 HTTP JSON-RPC -# 8546 WS JSON-RPC -# 8547 HTTP GraphQL -# 8550 HTTP ENGINE JSON-RPC -# 8551 WS ENGINE JSON-RPC -# 30303 P2P -EXPOSE 8545 8546 8547 8550 8551 30303 - -# defaults for host interfaces -ENV BESU_RPC_HTTP_HOST 0.0.0.0 -ENV BESU_RPC_WS_HOST 0.0.0.0 -ENV BESU_GRAPHQL_HTTP_HOST 0.0.0.0 -ENV BESU_PID_PATH "/tmp/pid" - -ENV OTEL_RESOURCE_ATTRIBUTES="service.name=besu,service.version=$VERSION" - -ENV OLDPATH="${PATH}" -ENV PATH="/opt/besu/bin:${OLDPATH}" - -ENTRYPOINT ["besu"] -HEALTHCHECK --start-period=5s --interval=5s --timeout=1s --retries=10 CMD bash -c "[ -f /tmp/pid ]" - -# Build-time metadata as defined at http://label-schema.org -ARG BUILD_DATE -ARG VCS_REF -LABEL org.label-schema.build-date=$BUILD_DATE \ - org.label-schema.name="Besu" \ - org.label-schema.description="Enterprise Ethereum client" \ - org.label-schema.url="https://besu.hyperledger.org/" \ - org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/hyperledger/besu.git" \ - org.label-schema.vendor="Hyperledger" \ - org.label-schema.version=$VERSION \ - org.label-schema.schema-version="1.0" diff --git a/gradle.properties b/gradle.properties deleted file mode 100644 index fe52839..0000000 --- a/gradle.properties +++ /dev/null @@ -1,4 +0,0 @@ -releaseVersion=0.1.5-SNAPSHOT -distributionIdentifier=linea-besu-package -dockerOrgName=consensys -dockerArtifactName=linea-besu-package \ No newline at end of file diff --git a/gradle/docker.gradle b/gradle/docker.gradle deleted file mode 100644 index 48de85c..0000000 --- a/gradle/docker.gradle +++ /dev/null @@ -1,161 +0,0 @@ -import java.text.SimpleDateFormat -import java.util.concurrent.TimeUnit - -def dockerBuildVersion = project.hasProperty('release.releaseVersion') ? project.property('release.releaseVersion') : "${rootProject.version}" -def dockerOrgName = project.hasProperty('dockerOrgName') ? project.getProperty("dockerOrgName") : "hyperledger" -def dockerArtifactName = project.hasProperty("dockerArtifactName") ? project.getProperty("dockerArtifactName") : "besu" -def dockerImageName = "${dockerOrgName}/${dockerArtifactName}" - -// set the shell command to use according to os -def shell = org.gradle.internal.os.OperatingSystem.current().isWindows() ? "${projectDir}\\wslsh.bat" : '/bin/bash' - -// http://label-schema.org/rc1/ -// using the RFC3339 format "2016-04-12T23:20:50.52Z" -def buildTime() { - def gitDate = 'git log -1 --format=%cI'.execute().text.trim() - return gitDate -} - -// rename the top level dir from besu- to besu and this makes it really -// simple for use in docker -tasks.register("dockerDistUntar") { - dependsOn distTar - dependsOn distZip - def dockerBuildDir = "build/docker-besu/" - def distTarFile = distTar.outputs.files.singleFile - def distTarFileName = distTar.outputs.files.singleFile.name.replace(".tar.gz", "") - - doFirst { - new File(dockerBuildDir).mkdir() - copy { - from tarTree(distTarFile) - into(dockerBuildDir) - } - project.delete(files("${dockerBuildDir}/besu")) - file("${dockerBuildDir}/${distTarFileName}").renameTo("${dockerBuildDir}/besu") - } -} - -tasks.register('distDocker') { - dependsOn dockerDistUntar - inputs.dir("build/docker-besu/") - def dockerBuildDir = "build/docker-besu/" - def image = "${dockerImageName}:${dockerBuildVersion}" - - doLast { - copy { - from file("${projectDir}/docker/Dockerfile") - into(dockerBuildDir) - } - exec { - def dockerPlatform = "" - if (project.hasProperty('docker-platform')){ - dockerPlatform = "--platform ${project.getProperty('docker-platform')}" - println "Building for platform ${project.getProperty('docker-platform')}" - } - def gitDetails = getGitCommitDetails(7) - def pushFlag = project.hasProperty('publishDocker') ? '--push' : '--load' - def command = "docker buildx build ${dockerPlatform} --build-arg BUILD_DATE=${buildTime()} --build-arg VERSION=${dockerBuildVersion} --build-arg VCS_REF=${gitDetails.hash} -t ${image} ${pushFlag} ." - println "Running command: ${command}" - executable shell - workingDir dockerBuildDir - args "-c", command - } - println "DOCKER_IMAGE=${image}" - } -} - -tasks.register('testDocker') { - dependsOn distDocker - def expectedOutput = "Ethereum main loop is up" - def image = "${dockerImageName}:${dockerBuildVersion}" - - def timeoutSeconds = 15 - def profilesFolder = file('linea-besu/profiles') - - doLast { - if (!profilesFolder.exists() || !profilesFolder.isDirectory()) { - throw new GradleException("Profile folder does not exist or is not a directory: ${profilesFolder}") - } - - def profiles = profilesFolder.listFiles().findAll { it.name.endsWith('.toml') } - if (profiles.isEmpty()) { - throw new GradleException("No TOML files found in folder: ${profilesFolder}") - } - println "Testing profiles startup:" - - def failedProfiles = [] - - profiles.each { profile -> - def fileNameWithoutExtension = profile.name[0..-6] // Remove the '.toml' extension - - def output = new ByteArrayOutputStream() - def errorOutput = new ByteArrayOutputStream() - def process = ["sh", "-c", "docker run --rm -e BESU_PROFILE=${fileNameWithoutExtension} ${image} "].execute() - process.consumeProcessOutput(output, errorOutput) - - def startTime = System.currentTimeMillis() - def found = false - - while ((System.currentTimeMillis() - startTime) < TimeUnit.SECONDS.toMillis(timeoutSeconds)) { - def actualOutput = output.toString().trim() - if (actualOutput.contains(expectedOutput)) { - found = true - break - } - if (!process.isAlive()) { - break - } - Thread.sleep(1000) // Sleep for 1 second before checking again - } - - process.waitForOrKill(TimeUnit.SECONDS.toMillis(1)) - - if (!found) { - def actualOutput = output.toString().trim() - def errorMsg = errorOutput.toString().trim() - println "${profile.name}: FAILED" - println("Expected: '${expectedOutput}', but got: '${actualOutput}'. Error: '${errorMsg}'") - failedProfiles.add(profile.name) - } else { - println "${profile.name}: PASSED" - } - } - - if (!failedProfiles.isEmpty()) { - throw new GradleException("Some profiles failed: ${failedProfiles.join(', ')}") - } - } -} - -def getGitCommitDetails(length = 8) { - try { - def gitFolder = "$projectDir/.git/" - if (!file(gitFolder).isDirectory()) { - gitFolder = file(gitFolder).text.substring(length).trim() + "/" - } - def takeFromHash = length - def head = new File(gitFolder + "HEAD").text.split(":") - def isCommit = head.length == 1 - - def commitHash, refHeadFile - if (isCommit) { - commitHash = head[0].trim().take(takeFromHash) - refHeadFile = new File(gitFolder + "HEAD") - } else { - refHeadFile = new File(gitFolder + head[1].trim()) - commitHash = refHeadFile.text.trim().take(takeFromHash) - } - - // Use head file modification time as a proxy for the build date - def lastModified = new Date(refHeadFile.lastModified()) - // Format the date as "yy.M" (e.g. 24.3 for March 2024) - def formattedDate = new SimpleDateFormat("yy.M").format(lastModified) - - return [hash: commitHash, date: formattedDate] - } catch (Exception e) { - logger.warn('Could not calculate git commit details, using defaults (run with --info for stacktrace)') - logger.info('Error retrieving git commit details', e) - return [hash: "xxxxxxxx", date: "00.0"] - } -} \ No newline at end of file diff --git a/gradle/versions.gradle b/gradle/versions.gradle deleted file mode 100644 index 4a6b2ff..0000000 --- a/gradle/versions.gradle +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright Consensys Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -dependencyManagement { - generatedPomCustomization { - enabled = false - } - dependencies { - // Error prone dependencies - dependency 'com.google.errorprone:error_prone_annotation:2.8.0' - dependency 'com.google.errorprone:error_prone_check_api:2.8.0' - dependency 'com.google.errorprone:error_prone_core:2.8.0' - dependency 'com.google.errorprone:error_prone_test_helpers:2.8.0' - dependency 'com.google.errorprone:javac:9+181-r4173-1' - } -} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 943f0cb..0000000 Binary files a/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 2617362..0000000 --- a/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,6 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip -networkTimeout=10000 -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew deleted file mode 100755 index 65dcd68..0000000 --- a/gradlew +++ /dev/null @@ -1,244 +0,0 @@ -#!/bin/sh - -# -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -############################################################################## -# -# Gradle start up script for POSIX generated by Gradle. -# -# Important for running: -# -# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is -# noncompliant, but you have some other compliant shell such as ksh or -# bash, then to run this script, type that shell name before the whole -# command line, like: -# -# ksh Gradle -# -# Busybox and similar reduced shells will NOT work, because this script -# requires all of these POSIX shell features: -# * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». -# -# Important for patching: -# -# (2) This script targets any POSIX shell, so it avoids extensions provided -# by Bash, Ksh, etc; in particular arrays are avoided. -# -# The "traditional" practice of packing multiple parameters into a -# space-separated string is a well documented source of bugs and security -# problems, so this is (mostly) avoided, by progressively accumulating -# options in "$@", and eventually passing that to Java. -# -# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, -# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; -# see the in-line comments for details. -# -# There are tweaks for specific operating systems such as AIX, CygWin, -# Darwin, MinGW, and NonStop. -# -# (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt -# within the Gradle project. -# -# You can find Gradle at https://github.com/gradle/gradle/. -# -############################################################################## - -# Attempt to set APP_HOME - -# Resolve links: $0 may be a link -app_path=$0 - -# Need this for daisy-chained symlinks. -while - APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path - [ -h "$app_path" ] -do - ls=$( ls -ld "$app_path" ) - link=${ls#*' -> '} - case $link in #( - /*) app_path=$link ;; #( - *) app_path=$APP_HOME$link ;; - esac -done - -# This is normally unused -# shellcheck disable=SC2034 -APP_BASE_NAME=${0##*/} -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - -# Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD=maximum - -warn () { - echo "$*" -} >&2 - -die () { - echo - echo "$*" - echo - exit 1 -} >&2 - -# OS specific support (must be 'true' or 'false'). -cygwin=false -msys=false -darwin=false -nonstop=false -case "$( uname )" in #( - CYGWIN* ) cygwin=true ;; #( - Darwin* ) darwin=true ;; #( - MSYS* | MINGW* ) msys=true ;; #( - NONSTOP* ) nonstop=true ;; -esac - -CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar - - -# Determine the Java command to use to start the JVM. -if [ -n "$JAVA_HOME" ] ; then - if [ -x "$JAVA_HOME/jre/sh/java" ] ; then - # IBM's JDK on AIX uses strange locations for the executables - JAVACMD=$JAVA_HOME/jre/sh/java - else - JAVACMD=$JAVA_HOME/bin/java - fi - if [ ! -x "$JAVACMD" ] ; then - die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." - fi -else - JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. - -Please set the JAVA_HOME variable in your environment to match the -location of your Java installation." -fi - -# Increase the maximum file descriptors if we can. -if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then - case $MAX_FD in #( - max*) - # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - MAX_FD=$( ulimit -H -n ) || - warn "Could not query maximum file descriptor limit" - esac - case $MAX_FD in #( - '' | soft) :;; #( - *) - # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. - # shellcheck disable=SC3045 - ulimit -n "$MAX_FD" || - warn "Could not set maximum file descriptor limit to $MAX_FD" - esac -fi - -# Collect all arguments for the java command, stacking in reverse order: -# * args from the command line -# * the main class name -# * -classpath -# * -D...appname settings -# * --module-path (only if needed) -# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. - -# For Cygwin or MSYS, switch paths to Windows format before running java -if "$cygwin" || "$msys" ; then - APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) - CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) - - JAVACMD=$( cygpath --unix "$JAVACMD" ) - - # Now convert the arguments - kludge to limit ourselves to /bin/sh - for arg do - if - case $arg in #( - -*) false ;; # don't mess with options #( - /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath - [ -e "$t" ] ;; #( - *) false ;; - esac - then - arg=$( cygpath --path --ignore --mixed "$arg" ) - fi - # Roll the args list around exactly as many times as the number of - # args, so each arg winds up back in the position where it started, but - # possibly modified. - # - # NB: a `for` loop captures its iteration list before it begins, so - # changing the positional parameters here affects neither the number of - # iterations, nor the values presented in `arg`. - shift # remove old arg - set -- "$@" "$arg" # push replacement arg - done -fi - -# Collect all arguments for the java command; -# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of -# shell script including quotes and variable substitutions, so put them in -# double quotes to make sure that they get re-expanded; and -# * put everything else in single quotes, so that it's not re-expanded. - -set -- \ - "-Dorg.gradle.appname=$APP_BASE_NAME" \ - -classpath "$CLASSPATH" \ - org.gradle.wrapper.GradleWrapperMain \ - "$@" - -# Stop when "xargs" is not available. -if ! command -v xargs >/dev/null 2>&1 -then - die "xargs is not available" -fi - -# Use "xargs" to parse quoted args. -# -# With -n1 it outputs one arg per line, with the quotes and backslashes removed. -# -# In Bash we could simply go: -# -# readarray ARGS < <( xargs -n1 <<<"$var" ) && -# set -- "${ARGS[@]}" "$@" -# -# but POSIX shell has neither arrays nor command substitution, so instead we -# post-process each arg (as a line of input to sed) to backslash-escape any -# character that might be a shell metacharacter, then use eval to reverse -# that process (while maintaining the separation between arguments), and wrap -# the whole thing up as a single "set" statement. -# -# This will of course break if any of these variables contains a newline or -# an unmatched quote. -# - -eval "set -- $( - printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | - xargs -n1 | - sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | - tr '\n' ' ' - )" '"$@"' - -exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat deleted file mode 100644 index 6689b85..0000000 --- a/gradlew.bat +++ /dev/null @@ -1,92 +0,0 @@ -@rem -@rem Copyright 2015 the original author or authors. -@rem -@rem Licensed under the Apache License, Version 2.0 (the "License"); -@rem you may not use this file except in compliance with the License. -@rem You may obtain a copy of the License at -@rem -@rem https://www.apache.org/licenses/LICENSE-2.0 -@rem -@rem Unless required by applicable law or agreed to in writing, software -@rem distributed under the License is distributed on an "AS IS" BASIS, -@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@rem See the License for the specific language governing permissions and -@rem limitations under the License. -@rem - -@if "%DEBUG%"=="" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -set DIRNAME=%~dp0 -if "%DIRNAME%"=="" set DIRNAME=. -@rem This is normally unused -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Resolve any "." and ".." in APP_HOME to make it shorter. -for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if %ERRORLEVEL% equ 0 goto execute - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto execute - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* - -:end -@rem End local scope for the variables with windows NT shell -if %ERRORLEVEL% equ 0 goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -set EXIT_CODE=%ERRORLEVEL% -if %EXIT_CODE% equ 0 set EXIT_CODE=1 -if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% -exit /b %EXIT_CODE% - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega diff --git a/linea-besu/build-devnet.json b/linea-besu/build-devnet.json deleted file mode 100644 index 1bd58f5..0000000 --- a/linea-besu/build-devnet.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "distIdentifier": "linea-besu-package", - "distOutput": "besu", - "modules": [ - { - "type": "extract", - "name": "linea-besu", - "url": "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/{version}/linea-besu-{version}.tar.gz", - "version": "24.10-delivery34" - }, - { - "type": "download", - "name": "linea-sequencer", - "url": "https://github.com/Consensys/linea-sequencer/releases/download/v{version}/linea-sequencer-v{version}.jar", - "version": "0.8.0-rc4.1.jar", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "besu-shomei-plugin", - "url": "https://github.com/Consensys/besu-shomei-plugin/releases/download/v{version}/besu-shomei-plugin-v{version}.jar", - "version": "0.3.1", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "finalized-tag-updater", - "url": "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v{version}/finalized-tag-updater-v{version}.jar", - "version": "0.0.2", - "outputDir": "plugins" - }, - { - "type": "copy", - "name": "profiles", - "src": "linea-besu/profiles", - "outputDir": "profiles" - }, - { - "type": "copy", - "name": "config", - "src": "linea-besu/config", - "outputDir": "config" - }, - { - "type": "copy", - "name": "genesis", - "src": "linea-besu/genesis", - "outputDir": "genesis" - }, - { - "type": "download", - "name": "linea-tracer", - "url": "https://github.com/Consensys/linea-tracer/releases/download/v{version}/linea-tracer-v{version}.jar", - "version": "0.6.0-rc8", - "outputDir": "plugins" - } - ] - } \ No newline at end of file diff --git a/linea-besu/build-mainnet.json b/linea-besu/build-mainnet.json deleted file mode 100644 index 49bc0b3..0000000 --- a/linea-besu/build-mainnet.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "distIdentifier": "linea-besu-package", - "distOutput": "besu", - "modules": [ - { - "type": "extract", - "name": "linea-besu", - "url": "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/{version}/linea-besu-{version}.tar.gz", - "version": "24.10-delivery34" - }, - { - "type": "download", - "name": "linea-sequencer", - "url": "https://github.com/Consensys/linea-sequencer/releases/download/v{version}/besu-sequencer-plugins-v{version}.jar", - "version": "0.1.4-test35", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "besu-shomei-plugin", - "url": "https://github.com/Consensys/besu-shomei-plugin/releases/download/v{version}/besu-shomei-plugin-v{version}.jar", - "version": "0.3.1", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "finalized-tag-updater", - "url": "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v{version}/finalized-tag-updater-v{version}.jar", - "version": "0.0.2", - "outputDir": "plugins" - }, - { - "type": "copy", - "name": "profiles", - "src": "linea-besu/profiles", - "outputDir": "profiles" - }, - { - "type": "copy", - "name": "config", - "src": "linea-besu/config", - "outputDir": "config" - }, - { - "type": "copy", - "name": "genesis", - "src": "linea-besu/genesis", - "outputDir": "genesis" - }, - { - "type": "download", - "name": "linea-tracer", - "url": "https://github.com/Consensys/linea-tracer/releases/download/v{version}/linea-tracer-v{version}.jar", - "version": "0.6.0-rc8", - "outputDir": "plugins" - } - ] - } \ No newline at end of file diff --git a/linea-besu/build-sepolia.json b/linea-besu/build-sepolia.json deleted file mode 100644 index 82cde88..0000000 --- a/linea-besu/build-sepolia.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "distIdentifier": "linea-besu-package", - "distOutput": "besu", - "modules": [ - { - "type": "extract", - "name": "linea-besu", - "url": "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/{version}/linea-besu-{version}.tar.gz", - "version": "24.10-delivery34" - }, - { - "type": "download", - "name": "linea-sequencer", - "url": "https://github.com/Consensys/linea-sequencer/releases/download/v{version}/linea-sequencer-v{version}.jar", - "version": "v0.8.0-rc4.1", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "besu-shomei-plugin", - "url": "https://github.com/Consensys/besu-shomei-plugin/releases/download/v{version}/besu-shomei-plugin-v{version}.jar", - "version": "0.3.1", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "finalized-tag-updater", - "url": "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v{version}/finalized-tag-updater-v{version}.jar", - "version": "0.0.1", - "outputDir": "plugins" - }, - { - "type": "copy", - "name": "profiles", - "src": "linea-besu/profiles", - "outputDir": "profiles" - }, - { - "type": "copy", - "name": "config", - "src": "linea-besu/config", - "outputDir": "config" - }, - { - "type": "copy", - "name": "genesis", - "src": "linea-besu/genesis", - "outputDir": "genesis" - }, - { - "type": "download", - "name": "linea-tracer", - "url": "https://github.com/Consensys/linea-tracer/releases/download/v{version}/linea-tracer-v{version}.jar", - "version": "0.6.0-rc8", - "outputDir": "plugins" - } - ] - } \ No newline at end of file diff --git a/linea-besu/build.json b/linea-besu/build.json deleted file mode 100644 index b6cc100..0000000 --- a/linea-besu/build.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "distIdentifier": "linea-besu-package", - "distOutput": "besu", - "modules": [ - { - "type": "extract", - "name": "linea-besu", - "url": "https://artifacts.consensys.net/public/linea-besu/raw/names/linea-besu.tar.gz/versions/{version}/linea-besu-{version}.tar.gz", - "version": "24.10-delivery34" - }, - { - "type": "download", - "name": "linea-sequencer", - "url": "https://github.com/Consensys/linea-sequencer/releases/download/v{version}/besu-sequencer-plugins-v{version}.jar", - "version": "0.1.4-test34", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "besu-shomei-plugin", - "url": "https://github.com/Consensys/besu-shomei-plugin/releases/download/v{version}/besu-shomei-plugin-v{version}.jar", - "version": "0.3.1", - "outputDir": "plugins" - }, - { - "type": "download", - "name": "finalized-tag-updater", - "url": "https://github.com/Consensys/linea-monorepo/releases/download/finalized-tag-updater-v{version}/finalized-tag-updater-v{version}.jar", - "version": "0.0.2", - "outputDir": "plugins" - }, - { - "type": "copy", - "name": "profiles", - "src": "linea-besu/profiles", - "outputDir": "profiles" - }, - { - "type": "copy", - "name": "config", - "src": "linea-besu/config", - "outputDir": "config" - }, - { - "type": "copy", - "name": "genesis", - "src": "linea-besu/genesis", - "outputDir": "genesis" - } - ] -} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle deleted file mode 100644 index b73f167..0000000 --- a/settings.gradle +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright Consensys Software Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on - * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the - * specific language governing permissions and limitations under the License. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -/* - * This file was generated by the Gradle 'init' task. - * - * The settings file is used to specify which projects to include in your build. - * - * Detailed information about configuring a multi-project build in Gradle can be found - * in the user manual at https://docs.gradle.org/5.2.1/userguide/multi_project_builds.html - */ - -rootProject.name = 'linea-besu-package' - diff --git a/versions/linea-ci.env b/versions/linea-ci.env new file mode 100644 index 0000000..bde3c71 --- /dev/null +++ b/versions/linea-ci.env @@ -0,0 +1,5 @@ +LINEA_BESU_TAR_GZ=24.10-delivery34 +LINEA_SEQUENCER_PLUGIN_VERSION=0.1.4-test34 +LINEA_TRACER_PLUGIN_VERSION=0.6.0-rc8 +FINALIZED_TAG_UPDATER_PLUGIN_VERSION=0.0.2 +SHOMEI_PLUGIN_VERSION=0.3.1