Skip to content

Commit

Permalink
rename cdk to aggkit :fingers_crossed:
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan-Ethernal authored and goran-ethernal committed Dec 25, 2024
1 parent e734164 commit 035938f
Show file tree
Hide file tree
Showing 31 changed files with 146 additions and 146 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@0xPolygon/core-cdk
@agglayer/aggkit
36 changes: 18 additions & 18 deletions .github/workflows/arm_deb_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]" >> 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: [email protected]" >> 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
58 changes: 29 additions & 29 deletions .github/workflows/arm_rpm_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion .github/workflows/test-e2e-multi_pp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:


jobs:
build-cdk-image:
build-aggkit-image:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -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:
Expand Down Expand Up @@ -77,15 +77,15 @@ jobs:
- name: Setup Bats and bats libs
uses: bats-core/[email protected]

- 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
Expand All @@ -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()
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test-resequence.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/x86_deb_packager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: [email protected]" >> 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: [email protected]" >> 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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
10 changes: 5 additions & 5 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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{
Expand All @@ -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,
Expand All @@ -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),
},
Expand Down
Loading

0 comments on commit 035938f

Please sign in to comment.