From 035938f9f692fc524eb77b89061f0a720c7fd1ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Negovanovi=C4=87?= Date: Wed, 25 Dec 2024 13:35:48 +0100 Subject: [PATCH] rename cdk to aggkit :fingers_crossed: --- .github/CODEOWNERS | 2 +- .github/workflows/arm_deb_packager.yml | 36 ++++++------ .github/workflows/arm_rpm_packager.yml | 58 +++++++++---------- .github/workflows/test-e2e-multi_pp.yml | 2 +- .github/workflows/test-e2e.yml | 24 ++++---- .github/workflows/test-resequence.yml | 10 ++-- .github/workflows/x86_deb_packager.yml | 36 ++++++------ README.md | 4 +- cmd/main.go | 10 ++-- config/default.go | 2 +- docs/local_debug.md | 4 +- packaging/deb/cdk/DEBIAN/postinst | 10 ++-- packaging/deb/cdk/DEBIAN/postrm | 6 +- packaging/systemd/cdk.service.example | 6 +- scripts/local_config | 16 ++--- sonar-project.properties | 6 +- test/bats/helpers/common-setup.bash | 2 +- test/combinations/fork11-rollup.yml | 2 +- test/combinations/fork12-cdk-validium.yml | 2 +- ...12-pessimistic-multi-attach-second-cdk.yml | 2 +- .../combinations/fork12-pessimistic-multi.yml | 2 +- test/combinations/fork12-pessimistic.yml | 2 +- test/combinations/fork12-rollup.yml | 2 +- test/combinations/fork9-cdk-validium.yml | 2 +- test/config/test.config.toml | 2 +- test/docker-compose.yml | 14 ++--- test/run-e2e-multi_pp.sh | 8 +-- test/run-e2e.sh | 10 ++-- test/scripts/agglayer_certificates_monitor.sh | 2 +- test/scripts/batch_verification_monitor.sh | 2 +- test/scripts/env.sh | 6 +- 31 files changed, 146 insertions(+), 146 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 2ac98e7c..c290aa02 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1 @@ -@0xPolygon/core-cdk +@agglayer/aggkit diff --git a/.github/workflows/arm_deb_packager.yml b/.github/workflows/arm_deb_packager.yml index 64d451c6..4a11e6e5 100644 --- a/.github/workflows/arm_deb_packager.yml +++ b/.github/workflows/arm_deb_packager.yml @@ -44,46 +44,46 @@ jobs: - name: Build the rust binary run: | BUILD_SCRIPT_DISABLED=1 - cargo build --release --bin cdk + cargo build --release --bin aggkit-cli - name: making directory structure - run: mkdir -p packaging/deb/cdk/usr/bin/ + run: mkdir -p packaging/deb/aggkit/usr/bin/ - name: copying necessary binary for arm64 - run: cp -rp target/cdk-node packaging/deb/cdk/usr/bin/cdk-node + run: cp -rp target/aggkit packaging/deb/aggkit/usr/bin/aggkit - name: copying rust binary for arm64 - run: cp -rp target/release/cdk packaging/deb/cdk/usr/bin/cdk + run: cp -rp target/release/aggkit-cli packaging/deb/aggkit-cli/usr/bin/aggkit-cli # Control file creation - name: Create control file run: | - echo "Package: cdk" >> packaging/deb/cdk/DEBIAN/control - echo "Version: ${{ env.VERSION }}" >> packaging/deb/cdk/DEBIAN/control - echo "Section: base" >> packaging/deb/cdk/DEBIAN/control - echo "Priority: optional" >> packaging/deb/cdk/DEBIAN/control - echo "Architecture: arm64" >> packaging/deb/cdk/DEBIAN/control - echo "Maintainer: devops@polygon.technology" >> packaging/deb/cdk/DEBIAN/control - echo "Description: cdk binary package" >> packaging/deb/cdk/DEBIAN/control + echo "Package: aggkit" >> packaging/deb/aggkit/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/aggkit/DEBIAN/control + echo "Section: base" >> packaging/deb/aggkit/DEBIAN/control + echo "Priority: optional" >> packaging/deb/aggkit/DEBIAN/control + echo "Architecture: arm64" >> packaging/deb/aggkit/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/aggkit/DEBIAN/control + echo "Description: aggkit binary package" >> packaging/deb/aggkit/DEBIAN/control - - name: Creating package for binary for cdk ${{ env.ARCH }} - run: cp -rp packaging/deb/cdk packaging/deb/cdk-${{ env.GIT_TAG }}-${{ env.ARCH }} + - name: Creating package for binary for aggkit ${{ env.ARCH }} + run: cp -rp packaging/deb/aggkit packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }} env: ARCH: arm64 - name: Running package build - run: dpkg-deb --build --root-owner-group packaging/deb/cdk-${{ env.GIT_TAG }}-${{ env.ARCH }} + run: dpkg-deb --build --root-owner-group packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }} env: ARCH: arm64 - name: create checksum for the arm64 package - run: cd packaging/deb/ && sha256sum cdk-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > cdk-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + run: cd packaging/deb/ && sha256sum aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum env: ARCH: arm64 - - name: Release cdk Packages + - name: Release aggkit Packages uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.GIT_TAG }} prerelease: true files: | - packaging/deb/cdk**.deb - packaging/deb/cdk**.deb.checksum + packaging/deb/aggkit**.deb + packaging/deb/aggkit**.deb.checksum diff --git a/.github/workflows/arm_rpm_packager.yml b/.github/workflows/arm_rpm_packager.yml index 614b80f2..c513a24a 100644 --- a/.github/workflows/arm_rpm_packager.yml +++ b/.github/workflows/arm_rpm_packager.yml @@ -35,13 +35,13 @@ jobs: - name: Download deps for project run: go mod download - - name: Building cdk-node for amd64 + - name: Building aggkit for amd64 run: make build - - name: Building the cdk + - name: Building the aggkit for arm64 run: | BUILD_SCRIPT_DISABLED=1 - cargo build --release --bin cdk + cargo build --release --bin aggkit-cli - name: Installing some dependencies run: sudo apt-get update && sudo apt-get install -y rpm @@ -53,51 +53,51 @@ jobs: mkdir -p packaging/rpm/RPMS mkdir -p packaging/rpm/SRPMS - touch packaging/rpm/cdk.spec - echo "Name: cdk" >> packaging/rpm/SPECS/cdk.spec - echo "Version: ${{ env.GIT_TAG1 }}" >> packaging/rpm/SPECS/cdk.spec - echo "Release: 1%{?dist}" >> packaging/rpm/SPECS/cdk.spec - echo "License: GPL/AGPL" >> packaging/rpm/SPECS/cdk.spec - echo "BuildArch: aarch64" >> packaging/rpm/SPECS/cdk.spec - echo "Summary: cdk rpm package" >> packaging/rpm/SPECS/cdk.spec + touch packaging/rpm/aggkit.spec + echo "Name: aggkit" >> packaging/rpm/SPECS/aggkit.spec + echo "Version: ${{ env.GIT_TAG1 }}" >> packaging/rpm/SPECS/aggkit.spec + echo "Release: 1%{?dist}" >> packaging/rpm/SPECS/aggkit.spec + echo "License: GPL/AGPL" >> packaging/rpm/SPECS/aggkit.spec + echo "BuildArch: aarch64" >> packaging/rpm/SPECS/aggkit.spec + echo "Summary: aggkit rpm package" >> packaging/rpm/SPECS/aggkit.spec - echo "%description" >> packaging/rpm/SPECS/cdk.spec - echo "cdk rpm package" >> packaging/rpm/SPECS/cdk.spec + echo "%description" >> packaging/rpm/SPECS/aggkit.spec + echo "aggkit rpm package" >> packaging/rpm/SPECS/aggkit.spec - echo "%pre" >> packaging/rpm/SPECS/cdk.spec - echo "getent group cdk >/dev/null || groupadd -r cdk" >> packaging/rpm/SPECS/cdk.spec - echo "getent passwd cdk >/dev/null || useradd -s /bin/false -d /opt/cdk -r cdk -g cdk" >> packaging/rpm/SPECS/cdk.spec + echo "%pre" >> packaging/rpm/SPECS/aggkit.spec + echo "getent group aggkit >/dev/null || groupadd -r aggkit" >> packaging/rpm/SPECS/aggkit.spec + echo "getent passwd aggkit >/dev/null || useradd -s /bin/false -d /opt/aggkit -r aggkit -g aggkit" >> packaging/rpm/SPECS/aggkit.spec - echo "%install" >> packaging/rpm/SPECS/cdk.spec - echo "mkdir -p %{buildroot}/usr/bin" >> packaging/rpm/SPECS/cdk.spec - echo "cp /home/runner/work/cdk/cdk/target/cdk-node %{buildroot}/usr/bin/cdk-node" >> packaging/rpm/SPECS/cdk.spec - echo "cp /home/runner/work/cdk/cdk/target/release/cdk %{buildroot}/usr/bin/cdk" >> packaging/rpm/SPECS/cdk.spec + echo "%install" >> packaging/rpm/SPECS/aggkit.spec + echo "mkdir -p %{buildroot}/usr/bin" >> packaging/rpm/SPECS/aggkit.spec + echo "cp /home/runner/work/aggkit/aggkit/target/aggkit %{buildroot}/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec + echo "cp /home/runner/work/aggkit/aggkit/target/release/aggkit %{buildroot}/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec - echo "%files" >> packaging/rpm/SPECS/cdk.spec - echo "/usr/bin/cdk" >> packaging/rpm/SPECS/cdk.spec - echo "/usr/bin/cdk-node" >> packaging/rpm/SPECS/cdk.spec + echo "%files" >> packaging/rpm/SPECS/aggkit.spec + echo "/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec + echo "/usr/bin/aggkit" >> packaging/rpm/SPECS/aggkit.spec - name: Construct rpm package run: | - rpmbuild --define "_topdir /home/runner/work/cdk/cdk/packaging/rpm_build" \ + rpmbuild --define "_topdir /home/runner/work/aggkit/aggkit/packaging/rpm_build" \ --define "_builddir %{_topdir}/BUILD" \ --define "_rpmdir %{_topdir}/RPMS" \ --define "_srcrpmdir %{_topdir}/SRPMS" \ --define "__spec_install_post /bin/true" \ - -bb packaging/rpm/SPECS/cdk.spec + -bb packaging/rpm/SPECS/aggkit.spec - name: Rename file for post rpm build and for checksum - run: mv /home/runner/work/cdk/cdk/packaging/rpm_build/RPMS/aarch64/cdk-${{ env.GIT_TAG1 }}-1.aarch64.rpm /home/runner/work/cdk/cdk/packaging/rpm_build/RPMS/aarch64/cdk-${{ env.GIT_TAG1 }}.aarch64.rpm + run: mv /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}-1.aarch64.rpm /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm - name: Checksum for the rpm package - run: sha256sum /home/runner/work/cdk/cdk/packaging/rpm_build/RPMS/aarch64/cdk-${{ env.GIT_TAG1 }}.aarch64.rpm > /home/runner/work/cdk/cdk/packaging/rpm_build/RPMS/aarch64/cdk-${{ env.GIT_TAG1 }}.aarch64.rpm.checksum + run: sha256sum /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm > /home/runner/work/aggkit/aggkit/packaging/rpm_build/RPMS/aarch64/aggkit-${{ env.GIT_TAG1 }}.aarch64.rpm.checksum - - name: Release cdk Packages + - name: Release aggkit Packages uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.GIT_TAG }} prerelease: true files: | - packaging/rpm_build/RPMS/aarch64/cdk-**.rpm - packaging/rpm_build/RPMS/aarch64/cdk-**.rpm.checksum + packaging/rpm_build/RPMS/aarch64/aggkit-**.rpm + packaging/rpm_build/RPMS/aarch64/aggkit-**.rpm.checksum diff --git a/.github/workflows/test-e2e-multi_pp.yml b/.github/workflows/test-e2e-multi_pp.yml index 69b7ecaa..a04cc183 100644 --- a/.github/workflows/test-e2e-multi_pp.yml +++ b/.github/workflows/test-e2e-multi_pp.yml @@ -76,7 +76,7 @@ jobs: archive_name="dump_run_with_args_${{matrix.e2e-group}}_${{ github.run_id }}" echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_ENV" echo "Generated archive name: ${archive_name}" - kurtosis service exec cdk cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml + kurtosis service exec aggkit cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml - name: Upload logs if: failure() diff --git a/.github/workflows/test-e2e.yml b/.github/workflows/test-e2e.yml index 1971a0d4..76d2b078 100644 --- a/.github/workflows/test-e2e.yml +++ b/.github/workflows/test-e2e.yml @@ -7,7 +7,7 @@ on: jobs: - build-cdk-image: + build-aggkit-image: runs-on: ubuntu-latest timeout-minutes: 20 steps: @@ -16,22 +16,22 @@ jobs: with: go-version: 1.22.x - - name: Build cdk docker image + - name: Build aggkit docker image run: make build-docker - - name: Save cdk image to archive - run: docker save --output /tmp/cdk.tar cdk + - name: Save aggkit image to archive + run: docker save --output /tmp/aggkit.tar aggkit - name: Upload archive uses: actions/upload-artifact@v4 with: - name: cdk - path: /tmp/cdk.tar + name: aggkit + path: /tmp/aggkit.tar test-e2e: runs-on: ubuntu-latest timeout-minutes: 30 - needs: build-cdk-image + needs: build-aggkit-image strategy: fail-fast: false matrix: @@ -77,15 +77,15 @@ jobs: - name: Setup Bats and bats libs uses: bats-core/bats-action@2.0.0 - - name: Download cdk archive + - name: Download aggkit archive uses: actions/download-artifact@v4 with: - name: cdk + name: aggkit path: /tmp - - name: Load cdk image + - name: Load aggkit image run: | - docker load --input /tmp/cdk.tar + docker load --input /tmp/aggkit.tar docker image ls -a - name: Run e2e tests @@ -106,7 +106,7 @@ jobs: archive_name="dump_run_with_args_${{matrix.e2e-group}}_${{ github.run_id }}" echo "ARCHIVE_NAME=${archive_name}" >> "$GITHUB_ENV" echo "Generated archive name: ${archive_name}" - kurtosis service exec cdk cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml + kurtosis service exec aggkit cdk-node-001 'cat /etc/cdk/cdk-node-config.toml' > ./dump/cdk-node-config.toml - name: Upload logs if: failure() diff --git a/.github/workflows/test-resequence.yml b/.github/workflows/test-resequence.yml index cd717a22..d65d9506 100644 --- a/.github/workflows/test-resequence.yml +++ b/.github/workflows/test-resequence.yml @@ -17,10 +17,10 @@ jobs: # matrix: # da-mode: [ "rollup" ] steps: - - name: Checkout cdk + - name: Checkout aggkit uses: actions/checkout@v4 with: - path: cdk + path: aggkit - name: Checkout cdk-erigon uses: actions/checkout@v4 @@ -50,8 +50,8 @@ jobs: /usr/local/bin/polycli version - name: Build docker image - working-directory: ./cdk - run: docker build -t cdk:local --file Dockerfile . + working-directory: ./aggkit + run: docker build -t aggkit:local --file Dockerfile . - name: Remove unused flags working-directory: ./kurtosis-cdk @@ -62,7 +62,7 @@ jobs: - name: Configure Kurtosis CDK working-directory: ./kurtosis-cdk run: | - /usr/local/bin/yq -i '.args.cdk_node_image = "cdk:local"' params.yml + /usr/local/bin/yq -i '.args.cdk_node_image = "aggkit:local"' params.yml /usr/local/bin/yq -i '.args.zkevm_rollup_fork_id = "12"' params.yml /usr/local/bin/yq -i '.args.zkevm_prover_image = "hermeznetwork/zkevm-prover:v8.0.0-RC5-fork.12"' params.yml /usr/local/bin/yq -i '.args.cdk_erigon_node_image = "jerrycgh/cdk-erigon:d5d04906f723f3f1d8c43c9e6baf3e18c27ff348"' params.yml diff --git a/.github/workflows/x86_deb_packager.yml b/.github/workflows/x86_deb_packager.yml index 2568861a..13320570 100644 --- a/.github/workflows/x86_deb_packager.yml +++ b/.github/workflows/x86_deb_packager.yml @@ -43,47 +43,47 @@ jobs: - name: Build the rust binary run: | BUILD_SCRIPT_DISABLED=1 - cargo build --release --bin cdk + cargo build --release --bin aggkit-cli - name: making directory structure - run: mkdir -p packaging/deb/cdk/usr/bin/ + run: mkdir -p packaging/deb/aggkit/usr/bin/ - name: copying necessary binary for amd64 - run: cp -rp target/cdk-node packaging/deb/cdk/usr/bin/cdk-node + run: cp -rp target/aggkit packaging/deb/aggkit/usr/bin/aggkit - name: copying rust binary for amd64 - run: cp -rp target/release/cdk packaging/deb/cdk/usr/bin/cdk + run: cp -rp target/release/aggkit-cli packaging/deb/aggkit/usr/bin/aggkit-cli # Control file creation - name: Create control file run: | - echo "Package: cdk" >> packaging/deb/cdk/DEBIAN/control - echo "Version: ${{ env.VERSION }}" >> packaging/deb/cdk/DEBIAN/control - echo "Section: base" >> packaging/deb/cdk/DEBIAN/control - echo "Priority: optional" >> packaging/deb/cdk/DEBIAN/control - echo "Architecture: amd64" >> packaging/deb/cdk/DEBIAN/control - echo "Maintainer: devops@polygon.technology" >> packaging/deb/cdk/DEBIAN/control - echo "Description: cdk binary package" >> packaging/deb/cdk/DEBIAN/control + echo "Package: aggkit" >> packaging/deb/aggkit/DEBIAN/control + echo "Version: ${{ env.VERSION }}" >> packaging/deb/aggkit/DEBIAN/control + echo "Section: base" >> packaging/deb/aggkit/DEBIAN/control + echo "Priority: optional" >> packaging/deb/aggkit/DEBIAN/control + echo "Architecture: amd64" >> packaging/deb/aggkit/DEBIAN/control + echo "Maintainer: devops@polygon.technology" >> packaging/deb/aggkit/DEBIAN/control + echo "Description: aggkit binary package" >> packaging/deb/aggkit/DEBIAN/control - - name: Creating package for binary for cdk ${{ env.ARCH }} - run: cp -rp packaging/deb/cdk packaging/deb/cdk-${{ env.GIT_TAG }}-${{ env.ARCH }} + - name: Creating package for binary for aggkit ${{ env.ARCH }} + run: cp -rp packaging/deb/aggkit packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }} env: ARCH: amd64 - name: Running package build - run: dpkg-deb --build --root-owner-group packaging/deb/cdk-${{ env.GIT_TAG }}-${{ env.ARCH }} + run: dpkg-deb --build --root-owner-group packaging/deb/aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }} env: ARCH: amd64 - name: Create checksum for the amd64 package - run: cd packaging/deb/ && sha256sum cdk-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > cdk-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum + run: cd packaging/deb/ && sha256sum aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb > aggkit-${{ env.GIT_TAG }}-${{ env.ARCH }}.deb.checksum env: ARCH: amd64 - - name: Release cdk Packages + - name: Release aggkit Packages uses: softprops/action-gh-release@v2 with: tag_name: ${{ env.GIT_TAG }} prerelease: true files: | - packaging/deb/cdk**.deb - packaging/deb/cdk**.deb.checksum + packaging/deb/aggkit**.deb + packaging/deb/aggkit**.deb.checksum diff --git a/README.md b/README.md index 4a83b60c..76e396dc 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ Setup Kurtosis following these instructions: [Kurtosis CDK Getting Started](http ### Build locally -You can locally build a production release of CDK CLI + cdk-node with: +You can locally build a production release of AggKit CLI + AggKit with: ``` make build @@ -46,7 +46,7 @@ It will build and run both binaries. 1. Run your kurtosis environment 2. build `cdk-erigon` and make it available in your system's PATH 3. Run `scripts/local_config` -4. cargo run -- --config ./tmp/cdk/local_config/test.kurtosis.toml --chain ./tmp/cdk/local_config/genesis.json erigon +4. cargo run -- --config ./tmp/aggkit/local_config/test.kurtosis.toml --chain ./tmp/aggkit/local_config/genesis.json erigon ## Contributing diff --git a/cmd/main.go b/cmd/main.go index 4cc1566a..5127df85 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -3,14 +3,14 @@ package main import ( "os" - zkevm "github.com/agglayer/aggkit" + "github.com/agglayer/aggkit" "github.com/agglayer/aggkit/common" "github.com/agglayer/aggkit/config" "github.com/agglayer/aggkit/log" "github.com/urfave/cli/v2" ) -const appName = "cdk" +const appName = "aggkit" const ( // NETWORK_CONFIGFILE name to identify the network_custom (genesis) config-file @@ -47,7 +47,7 @@ var ( saveConfigFlag = cli.StringFlag{ Name: config.FlagSaveConfigPath, Aliases: []string{"s"}, - Usage: "Save final configuration into to the indicated path (name: cdk-node-config.toml)", + Usage: "Save final configuration into to the indicated path (name: aggkit-config.toml)", Required: false, } disableDefaultConfigVars = cli.BoolFlag{ @@ -67,7 +67,7 @@ var ( func main() { app := cli.NewApp() app.Name = appName - app.Version = zkevm.Version + app.Version = aggkit.Version flags := []cli.Flag{ &configFileFlag, &yesFlag, @@ -86,7 +86,7 @@ func main() { { Name: "run", Aliases: []string{}, - Usage: "Run the cdk client", + Usage: "Run the aggkit client", Action: start, Flags: append(flags, &customNetworkFlag), }, diff --git a/config/default.go b/config/default.go index e53a929a..f38d4c40 100644 --- a/config/default.go +++ b/config/default.go @@ -44,7 +44,7 @@ genesisBlockNumber = 0 // This doesnt below to config, but are the vars used // to avoid repetition in config-files const DefaultVars = ` -PathRWData = "/tmp/cdk" +PathRWData = "/tmp/aggkit" L1URLSyncChunkSize = 100 ` diff --git a/docs/local_debug.md b/docs/local_debug.md index dc6e998b..ccfbc7e1 100644 --- a/docs/local_debug.md +++ b/docs/local_debug.md @@ -14,10 +14,10 @@ scripts/local_config ``` -## Stop cdk-node started by Kurtosis +## Stop aggkit enclave started by Kurtosis ```bash -kurtosis service stop cdk-v1 cdk-node-001 +kurtosis service stop aggkit cdk-node-001 ``` ## Add to vscode launch.json diff --git a/packaging/deb/cdk/DEBIAN/postinst b/packaging/deb/cdk/DEBIAN/postinst index e5765a67..8b449361 100755 --- a/packaging/deb/cdk/DEBIAN/postinst +++ b/packaging/deb/cdk/DEBIAN/postinst @@ -1,12 +1,12 @@ #!/bin/bash # This is a postinstallation script so the service can be configured and started when requested # -adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent cdk -if [ -d "/opt/cdk" ] +adduser --disabled-password --disabled-login --shell /usr/sbin/nologin --quiet --system --no-create-home --home /nonexistent aggkit +if [ -d "/opt/aggkit" ] then - echo "Directory /opt/cdk exists." + echo "Directory /opt/aggkit exists." else - mkdir -p /opt/cdk - chown -R cdk /opt/cdk + mkdir -p /opt/aggkit + chown -R aggkit /opt/aggkit fi systemctl daemon-reload diff --git a/packaging/deb/cdk/DEBIAN/postrm b/packaging/deb/cdk/DEBIAN/postrm index a2ea87a6..458fbd7c 100755 --- a/packaging/deb/cdk/DEBIAN/postrm +++ b/packaging/deb/cdk/DEBIAN/postrm @@ -1,8 +1,8 @@ #!/bin/bash # ############### -# Remove cdk-node installs +# Remove aggkit installs ############## -#rm -rf /lib/systemd/system/cdk-node.service -deluser cdk +#rm -rf /lib/systemd/system/aggkit.service +deluser aggkit #systemctl daemon-reload diff --git a/packaging/systemd/cdk.service.example b/packaging/systemd/cdk.service.example index d427e775..a36fda12 100644 --- a/packaging/systemd/cdk.service.example +++ b/packaging/systemd/cdk.service.example @@ -1,15 +1,15 @@ [Unit] - Description=cdk + Description=aggkit StartLimitIntervalSec=500 StartLimitBurst=5 [Service] Restart=on-failure RestartSec=5s - ExecStart=/usr/bin/cdk --config $config --chain $chain node + ExecStart=/usr/bin/aggkit --config $config --chain $chain node Type=simple KillSignal=SIGINT - User=cdk + User=aggkit TimeoutStopSec=120 [Install] diff --git a/scripts/local_config b/scripts/local_config index 90b5ae11..fbc0beb5 100755 --- a/scripts/local_config +++ b/scripts/local_config @@ -297,8 +297,8 @@ EOF exit 1 fi - if [ -z $TMP_CDK_FOLDER -o -z $KURTOSIS_ENCLAVE ]; then - log_fatal "TMP_CDK_FOLDER or KURTOSIS_ENCLAVE is not set. Must be set on file env.sh" + if [ -z $TMP_AGGKIT_FOLDER -o -z $KURTOSIS_ENCLAVE ]; then + log_fatal "TMP_AGGKIT_FOLDER or KURTOSIS_ENCLAVE is not set. Must be set on file env.sh" fi kurtosis enclave inspect $KURTOSIS_ENCLAVE > /dev/null if [ $? -ne 0 ]; then @@ -312,8 +312,8 @@ EOF } ############################################################################### function create_dest_folder(){ - export DEST=${TMP_CDK_FOLDER}/local_config - export zkevm_path_rw_data=${TMP_CDK_FOLDER}/runtime + export DEST=${TMP_AGGKIT_FOLDER}/local_config + export zkevm_path_rw_data=${TMP_AGGKIT_FOLDER}/runtime [ ! -d ${DEST} ] && mkdir -p ${DEST} rm $DEST/* mkdir $zkevm_path_rw_data @@ -415,16 +415,16 @@ echo " " echo "file generated at:" $DEST/test.kurtosis.toml echo "- to restart kurtosis:" -echo " kurtosis clean --all; kurtosis run --enclave cdk --args-file params.yml --image-download always ." +echo " kurtosis clean --all; kurtosis run --enclave aggkit --args-file params.yml --image-download always ." echo " " -echo "- Stop cdk-node:" -echo " kurtosis service stop cdk cdk-node-001" +echo "- Stop aggkit:" +echo " kurtosis service stop aggkit cdk-node-001" echo " " echo "- Add next configuration to vscode launch.json" echo " -----------------------------------------------------------" cat << EOF { - "name": "Debug cdk", + "name": "Debug aggkit", "type": "go", "request": "launch", "mode": "auto", diff --git a/sonar-project.properties b/sonar-project.properties index a55b3b68..93fc3294 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -2,9 +2,9 @@ # Standard properties # ===================================================== -sonar.projectKey=0xPolygon_cdk -sonar.projectName=cdk -sonar.organization=0xpolygon +sonar.projectKey=agglayer_aggkit +sonar.projectName=aggkit +sonar.organization=agglayer sonar.sources=. sonar.exclusions=**/test/**,**/vendor/**,**/mocks/**,**/build/**,**/target/**,**/proto/include/**,**/*.pb.go,**/docs/**,**/*.sql,**/mocks_*/*,scripts/**,**/mock_*.go,**/cmd/**,tools/** diff --git a/test/bats/helpers/common-setup.bash b/test/bats/helpers/common-setup.bash index 5f53cbf8..485d2337 100644 --- a/test/bats/helpers/common-setup.bash +++ b/test/bats/helpers/common-setup.bash @@ -18,7 +18,7 @@ _common_setup() { # Kurtosis enclave and service identifiers - readonly enclave=${KURTOSIS_ENCLAVE:-cdk} + readonly enclave=${KURTOSIS_ENCLAVE:-aggkit} readonly contracts_container=${KURTOSIS_CONTRACTS:-contracts-001} readonly contracts_service_wrapper=${KURTOSIS_CONTRACTS_WRAPPER:-"kurtosis service exec $enclave $contracts_container"} readonly erigon_rpc_node=${KURTOSIS_ERIGON_RPC:-cdk-erigon-rpc-001} diff --git a/test/combinations/fork11-rollup.yml b/test/combinations/fork11-rollup.yml index 80491430..a1fd027e 100644 --- a/test/combinations/fork11-rollup.yml +++ b/test/combinations/fork11-rollup.yml @@ -3,7 +3,7 @@ args: zkevm_prover_image: hermeznetwork/zkevm-prover:v7.0.2-fork.11 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 zkevm_node_image: hermeznetwork/zkevm-node:v0.7.0-fork11-RC1 - cdk_node_image: cdk + cdk_node_image: aggkit:latest gas_token_enabled: true data_availability_mode: rollup sequencer_type: erigon diff --git a/test/combinations/fork12-cdk-validium.yml b/test/combinations/fork12-cdk-validium.yml index f4d914c6..7982192e 100644 --- a/test/combinations/fork12-cdk-validium.yml +++ b/test/combinations/fork12-cdk-validium.yml @@ -2,7 +2,7 @@ args: zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12-patch.1 zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 - cdk_node_image: cdk + cdk_node_image: aggkit:latest gas_token_enabled: true data_availability_mode: cdk-validium sequencer_type: erigon diff --git a/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml b/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml index 47aa6d78..3bb16646 100644 --- a/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml +++ b/test/combinations/fork12-pessimistic-multi-attach-second-cdk.yml @@ -26,7 +26,7 @@ args: zkevm_l2_proofsigner_private_key: "0xc7fe3a006d75ba9326d9792523385abb49057c66aee0b8b4248821a89713f975" - cdk_node_image: cdk:latest + cdk_node_image: aggkit:latest cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0 zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1 additional_services: [] diff --git a/test/combinations/fork12-pessimistic-multi.yml b/test/combinations/fork12-pessimistic-multi.yml index e2ca1e9d..d8ffead6 100644 --- a/test/combinations/fork12-pessimistic-multi.yml +++ b/test/combinations/fork12-pessimistic-multi.yml @@ -1,5 +1,5 @@ args: - cdk_node_image: cdk:latest + cdk_node_image: aggkit:latest agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.20 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0 zkevm_contracts_image: leovct/zkevm-contracts:v9.0.0-rc.3-pp-fork.12-patch.1 diff --git a/test/combinations/fork12-pessimistic.yml b/test/combinations/fork12-pessimistic.yml index c7714e45..f4b17eb4 100644 --- a/test/combinations/fork12-pessimistic.yml +++ b/test/combinations/fork12-pessimistic.yml @@ -1,7 +1,7 @@ args: agglayer_image: ghcr.io/agglayer/agglayer:0.2.0-rc.20 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.60.0-beta8 - cdk_node_image: cdk + cdk_node_image: aggkit:latest zkevm_bridge_proxy_image: haproxy:3.0-bookworm zkevm_bridge_service_image: hermeznetwork/zkevm-bridge-service:v0.6.0-RC1 zkevm_bridge_ui_image: leovct/zkevm-bridge-ui:multi-network diff --git a/test/combinations/fork12-rollup.yml b/test/combinations/fork12-rollup.yml index 32d3ef8e..a16f0311 100644 --- a/test/combinations/fork12-rollup.yml +++ b/test/combinations/fork12-rollup.yml @@ -2,7 +2,7 @@ args: zkevm_contracts_image: leovct/zkevm-contracts:v8.0.0-rc.4-fork.12-patch.1 zkevm_prover_image: hermeznetwork/zkevm-prover:v8.0.0-RC12-fork.12 cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 - cdk_node_image: cdk + cdk_node_image: aggkit:latest gas_token_enabled: true data_availability_mode: rollup sequencer_type: erigon diff --git a/test/combinations/fork9-cdk-validium.yml b/test/combinations/fork9-cdk-validium.yml index 515819b6..dda3d6ed 100644 --- a/test/combinations/fork9-cdk-validium.yml +++ b/test/combinations/fork9-cdk-validium.yml @@ -4,7 +4,7 @@ args: cdk_erigon_node_image: hermeznetwork/cdk-erigon:v2.1.2 zkevm_node_image: hermeznetwork/zkevm-node:v0.7.3-RC1 cdk_validium_node_image: 0xpolygon/cdk-validium-node:0.7.0-cdk - cdk_node_image: cdk + cdk_node_image: aggkit:latest gas_token_enabled: true additional_services: - pless_zkevm_node diff --git a/test/config/test.config.toml b/test/config/test.config.toml index 9da00c79..7ed0e7b0 100644 --- a/test/config/test.config.toml +++ b/test/config/test.config.toml @@ -86,7 +86,7 @@ SequencerPrivateKey = {} Name = "sync_db" User = "sync_user" Password = "sync_password" - Host = "cdk-l1-sync-db" + Host = "aggkit-l1-sync-db" Port = "5432" EnableLog = false MaxConns = 10 diff --git a/test/docker-compose.yml b/test/docker-compose.yml index a280d675..a0208440 100644 --- a/test/docker-compose.yml +++ b/test/docker-compose.yml @@ -1,12 +1,12 @@ networks: default: - name: cdk + name: aggkit services: cdk-sequence-sender: container_name: cdk-sequence-sender restart: no - image: cdk + image: aggkit build: . volumes: - ./config/test.config.toml:/app/config.toml @@ -29,7 +29,7 @@ services: cdk-aggregator: container_name: cdk-aggregator - image: cdk + image: aggkit ports: - 50081:50081 - 9093:9091 # needed if metrics enabled @@ -43,11 +43,11 @@ services: command: - "/bin/sh" - "-c" - - "/app/cdk run --cfg /app/config.toml --network custom --custom-network-file /app/genesis.json --components aggregator" + - "/app/aggkit run --cfg /app/config.toml --network custom --custom-network-file /app/genesis.json --components aggregator" depends_on: cdk-aggregator-db: condition: service_started - cdk-l1-sync-db: + aggkit-l1-sync-db: condition: service_started cdk-aggregator-db: @@ -70,8 +70,8 @@ services: - "-N" - "500" - cdk-l1-sync-db: - container_name: cdk-l1-sync-db + aggkit-l1-sync-db: + container_name: aggkit-l1-sync-db image: postgres:15 deploy: resources: diff --git a/test/run-e2e-multi_pp.sh b/test/run-e2e-multi_pp.sh index f6301356..8d8f4928 100755 --- a/test/run-e2e-multi_pp.sh +++ b/test/run-e2e-multi_pp.sh @@ -17,15 +17,15 @@ function ok_or_fatal(){ } function build_docker_if_required(){ - docker images -q cdk:latest > /dev/null + docker images -q aggkit:latest > /dev/null if [ $? -ne 0 ] ; then - echo "Building cdk:latest" + echo "Building aggkit:latest" pushd $BASE_FOLDER/.. make build-docker ok_or_fatal "Failed to build docker image" popd else - echo "docker cdk:latest already exists" + echo "docker aggkit:latest already exists" fi } @@ -49,7 +49,7 @@ function resolve_template(){ BASE_FOLDER=$(dirname $0) PP1_ORIGIN_CONFIG_FILE=combinations/fork12-pessimistic-multi.yml PP2_ORIGIN_CONFIG_FILE=combinations/fork12-pessimistic-multi-attach-second-cdk.yml -KURTOSIS_ENCLAVE=cdk +KURTOSIS_ENCLAVE=aggkit [ -z $KURTOSIS_FOLDER ] && echo "KURTOSIS_FOLDER is not set" && exit 1 [ ! -d $KURTOSIS_FOLDER ] && echo "KURTOSIS_FOLDER is not a directory ($KURTOSIS_FOLDER)" && exit 1 diff --git a/test/run-e2e.sh b/test/run-e2e.sh index adbbcbcb..e1f4d117 100755 --- a/test/run-e2e.sh +++ b/test/run-e2e.sh @@ -14,22 +14,22 @@ if [ -z $DATA_AVAILABILITY_MODE ]; then fi BASE_FOLDER=$(dirname $0) -docker images -q cdk:latest > /dev/null +docker images -q aggkit:latest > /dev/null if [ $? -ne 0 ] ; then - echo "Building cdk:latest" + echo "Building aggkit:latest" pushd $BASE_FOLDER/.. make build-docker popd else - echo "docker cdk:latest already exists" + echo "docker aggkit:latest already exists" fi kurtosis clean --all -echo "Override cdk config file" +echo "Override aggkit config file" cp $BASE_FOLDER/config/kurtosis-cdk-node-config.toml.template $KURTOSIS_FOLDER/templates/trusted-node/cdk-node-config.toml KURTOSIS_CONFIG_FILE="combinations/$FORK-$DATA_AVAILABILITY_MODE.yml" TEMP_CONFIG_FILE=$(mktemp --suffix ".yml") echo "rendering $KURTOSIS_CONFIG_FILE to temp file $TEMP_CONFIG_FILE" go run ../scripts/run_template.go $KURTOSIS_CONFIG_FILE > $TEMP_CONFIG_FILE -kurtosis run --enclave cdk --args-file "$TEMP_CONFIG_FILE" --image-download always $KURTOSIS_FOLDER +kurtosis run --enclave aggkit --args-file "$TEMP_CONFIG_FILE" --image-download always $KURTOSIS_FOLDER rm $TEMP_CONFIG_FILE \ No newline at end of file diff --git a/test/scripts/agglayer_certificates_monitor.sh b/test/scripts/agglayer_certificates_monitor.sh index c530548f..1206c8cb 100755 --- a/test/scripts/agglayer_certificates_monitor.sh +++ b/test/scripts/agglayer_certificates_monitor.sh @@ -28,7 +28,7 @@ function check_timeout(){ } function check_num_certificates(){ - readonly agglayer_rpc_url="$(kurtosis port print cdk agglayer agglayer)" + readonly agglayer_rpc_url="$(kurtosis port print aggkit agglayer agglayer)" cast_output=$(cast rpc --rpc-url "$agglayer_rpc_url" "interop_getLatestKnownCertificateHeader" "$l2_rpc_network_id" 2>&1) diff --git a/test/scripts/batch_verification_monitor.sh b/test/scripts/batch_verification_monitor.sh index a0bfaefd..4b3e9857 100755 --- a/test/scripts/batch_verification_monitor.sh +++ b/test/scripts/batch_verification_monitor.sh @@ -17,7 +17,7 @@ timeout="$2" start_time=$(date +%s) end_time=$((start_time + timeout)) -rpc_url="$(kurtosis port print cdk cdk-erigon-rpc-001 rpc)" +rpc_url="$(kurtosis port print aggkit cdk-erigon-rpc-001 rpc)" while true; do verified_batches="$(cast to-dec "$(cast rpc --rpc-url "$rpc_url" zkevm_verifiedBatchNumber | sed 's/"//g')")" diff --git a/test/scripts/env.sh b/test/scripts/env.sh index 298d4f73..af9ff936 100644 --- a/test/scripts/env.sh +++ b/test/scripts/env.sh @@ -1,7 +1,7 @@ #!/bin/bash ### Common variables -KURTOSIS_ENCLAVE=cdk -TMP_CDK_FOLDER=tmp/cdk -DEST_KURTOSIS_PARAMS_YML=../$TMP_CDK_FOLDER/e2e-params.yml +KURTOSIS_ENCLAVE=aggkit +TMP_AGGKIT_FOLDER=tmp/aggkit +DEST_KURTOSIS_PARAMS_YML=../$TMP_AGGKIT_FOLDER/e2e-params.yml KURTOSIS_FOLDER=${KURTOSIS_FOLDER:=../kurtosis-cdk} USE_L1_GAS_TOKEN_CONTRACT=true