From 4d701cdbb38f3563b2c89b38d589dc7256d5dc37 Mon Sep 17 00:00:00 2001 From: zenodeapp Date: Mon, 22 Jan 2024 17:01:16 +0100 Subject: [PATCH] Renamed cronosd to genesisd --- .github/workflows/build.yml | 4 ++-- default.nix | 10 +++++----- flake.nix | 24 +++++++++++------------ integration_tests/configs/default.jsonnet | 2 +- integration_tests/network.py | 4 ++-- integration_tests/shell.nix | 2 +- integration_tests/test_basic.py | 2 +- integration_tests/test_upgrade.py | 6 +++--- integration_tests/test_upgrade_gravity.py | 6 +++--- integration_tests/utils.py | 2 +- nix/bundle-win-exe.nix | 8 ++++---- nix/scripts.nix | 2 +- scripts/codesign_macos.sh | 2 +- scripts/cronos-devnet.yaml | 2 +- scripts/release.sh | 2 +- 15 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c62265a80..639d27f93f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: if: steps.changed-files.outputs.any_changed == 'true' - uses: actions/upload-artifact@v3 with: - name: "cronosd-tarball-${{ matrix.os }}" + name: "genesisd-tarball-${{ matrix.os }}" path: "*.tar.gz" if-no-files-found: ignore @@ -65,7 +65,7 @@ jobs: access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - uses: actions/setup-go@v3 with: - go-version: '^1.20.0' + go-version: "^1.20.0" - id: changed-files uses: tj-actions/changed-files@v34 with: diff --git a/default.nix b/default.nix index cc41d075e6..6981a8aae5 100644 --- a/default.nix +++ b/default.nix @@ -11,7 +11,7 @@ }: let version = "v1.0.15"; - pname = "cronosd"; + pname = "genesisd"; tags = [ "ledger" "netgo" network "rocksdb" "grocksdb_no_link" ] ++ lib.optionals nativeByteOrder [ "nativebyteorder" ]; ldflags = lib.concatStringsSep "\n" ([ @@ -45,15 +45,15 @@ buildGoApplication rec { else "-lrocksdb -pthread -lstdc++ -ldl"; postFixup = lib.optionalString stdenv.isDarwin '' - ${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/librocksdb.8.dylib" "${rocksdb}/lib/librocksdb.dylib" $out/bin/cronosd + ${stdenv.cc.targetPrefix}install_name_tool -change "@rpath/librocksdb.8.dylib" "${rocksdb}/lib/librocksdb.dylib" $out/bin/genesisd ''; doCheck = false; meta = with lib; { - description = "Official implementation of the Cronos blockchain protocol"; - homepage = "https://cronos.org/"; + description = "Official implementation of the GenesisL1 blockchain protocol (fork of Cronos)"; + homepage = "https://genesisl1.com/"; license = licenses.asl20; - mainProgram = "cronosd" + stdenv.hostPlatform.extensions.executable; + mainProgram = "genesisd" + stdenv.hostPlatform.extensions.executable; platforms = platforms.all; }; } diff --git a/flake.nix b/flake.nix index d96309235e..c2f81d4850 100644 --- a/flake.nix +++ b/flake.nix @@ -39,13 +39,13 @@ inherit (pkgs) rocksdb; }; apps = { - cronosd = mkApp packages.cronosd; - cronosd-testnet = mkApp packages.cronosd-testnet; + genesisd = mkApp packages.genesisd; + genesisd-testnet = mkApp packages.genesisd-testnet; }; - defaultPackage = packages.cronosd; - defaultApp = apps.cronosd; + defaultPackage = packages.genesisd; + defaultApp = apps.genesisd; devShells = { - cronosd = pkgs.mkShell { + genesisd = pkgs.mkShell { buildInputs = with pkgs; [ go_1_20 rocksdb @@ -53,7 +53,7 @@ ]; }; }; - devShell = devShells.cronosd; + devShell = devShells.genesisd; legacyPackages = pkgs; } ) @@ -70,7 +70,7 @@ --owner=0 --group=0 --mode=u+rw,uga+r --hard-dereference . \ | gzip -9 > $out ''; - bundle-win-exe = drv: final.callPackage ./nix/bundle-win-exe.nix { cronosd = drv; }; + bundle-win-exe = drv: final.callPackage ./nix/bundle-win-exe.nix { genesisd = drv; }; } // (with final; let matrix = lib.cartesianProductOfSets { @@ -84,27 +84,27 @@ binaries = builtins.listToAttrs (builtins.map ({ network, pkgtype }: { name = builtins.concatStringsSep "-" ( - [ "cronosd" ] ++ + [ "genesisd" ] ++ lib.optional (network != "mainnet") network ++ lib.optional (pkgtype != "nix") pkgtype ); value = let - cronosd = callPackage ./. { + genesisd = callPackage ./. { inherit rev network; }; bundle = if stdenv.hostPlatform.isWindows then - bundle-win-exe cronosd + bundle-win-exe genesisd else - bundle-exe cronosd; + bundle-exe genesisd; in if pkgtype == "bundle" then bundle else if pkgtype == "tarball" then make-tarball bundle else - cronosd; + genesisd; }) matrix ); diff --git a/integration_tests/configs/default.jsonnet b/integration_tests/configs/default.jsonnet index 04c9a14d78..10abaafe60 100644 --- a/integration_tests/configs/default.jsonnet +++ b/integration_tests/configs/default.jsonnet @@ -1,7 +1,7 @@ { dotenv: '../../scripts/.env', 'cronos_777-1': { - cmd: 'cronosd', + cmd: 'genesisd', 'start-flags': '--trace', config: { mempool: { diff --git a/integration_tests/network.py b/integration_tests/network.py index 8f731ce421..c084dbbdcd 100644 --- a/integration_tests/network.py +++ b/integration_tests/network.py @@ -14,7 +14,7 @@ class Cronos: - def __init__(self, base_dir, chain_binary="cronosd"): + def __init__(self, base_dir, chain_binary="genesisd"): self._w3 = None self.base_dir = base_dir self.config = json.loads((base_dir / "config.json").read_text()) @@ -177,7 +177,7 @@ def setup_custom_cronos(path, base_port, config, post_init=None, chain_binary=No try: wait_for_port(ports.evmrpc_port(base_port)) wait_for_port(ports.evmrpc_ws_port(base_port)) - yield Cronos(path / "cronos_777-1", chain_binary=chain_binary or "cronosd") + yield Cronos(path / "cronos_777-1", chain_binary=chain_binary or "genesisd") finally: os.killpg(os.getpgid(proc.pid), signal.SIGTERM) # proc.terminate() diff --git a/integration_tests/shell.nix b/integration_tests/shell.nix index 0a3b11af3f..593e8cd616 100644 --- a/integration_tests/shell.nix +++ b/integration_tests/shell.nix @@ -4,7 +4,7 @@ pkgs.mkShell { pkgs.jq pkgs.go pkgs.gomod2nix - (pkgs.callPackage ../. { }) # cronosd + (pkgs.callPackage ../. { }) # genesisd pkgs.start-scripts pkgs.go-ethereum # pkgs.gorc diff --git a/integration_tests/test_basic.py b/integration_tests/test_basic.py index 5abdfe1496..3d468d055e 100644 --- a/integration_tests/test_basic.py +++ b/integration_tests/test_basic.py @@ -180,7 +180,7 @@ def test_statesync(cronos): # We can only create a new node with statesync config data = Path(cronos.base_dir).parent # Same data dir as cronos fixture chain_id = cronos.config["chain_id"] # Same chain_id as cronos fixture - cmd = "cronosd" + cmd = "genesisd" # create a clustercli object from ClusterCLI class clustercli = cluster.ClusterCLI(data, cmd=cmd, chain_id=chain_id) # create a new node with statesync enabled diff --git a/integration_tests/test_upgrade.py b/integration_tests/test_upgrade.py index 4f6f987dd4..61c65dcfd0 100644 --- a/integration_tests/test_upgrade.py +++ b/integration_tests/test_upgrade.py @@ -51,7 +51,7 @@ def post_init(path, base_port, config): data / SUPERVISOR_CONFIG_FILE, lambda i, _: { "command": f"cosmovisor start --home %(here)s/node{i}", - "environment": f"DAEMON_NAME=cronosd,DAEMON_HOME=%(here)s/node{i}", + "environment": f"DAEMON_NAME=genesisd,DAEMON_HOME=%(here)s/node{i}", }, ) @@ -73,7 +73,7 @@ def custom_cronos(tmp_path_factory): 26100, Path(__file__).parent / "configs/cosmovisor.jsonnet", post_init=post_init, - chain_binary=str(path / "upgrades/genesis/bin/cronosd"), + chain_binary=str(path / "upgrades/genesis/bin/genesisd"), ) @@ -146,7 +146,7 @@ def test_cosmovisor_upgrade(custom_cronos: Cronos, tmp_path_factory): # update cli chain binary custom_cronos.chain_binary = ( Path(custom_cronos.chain_binary).parent.parent.parent - / f"{plan_name}/bin/cronosd" + / f"{plan_name}/bin/genesisd" ) cli = custom_cronos.cosmos_cli() diff --git a/integration_tests/test_upgrade_gravity.py b/integration_tests/test_upgrade_gravity.py index 3ddf737ce8..4dbb84dc68 100644 --- a/integration_tests/test_upgrade_gravity.py +++ b/integration_tests/test_upgrade_gravity.py @@ -44,7 +44,7 @@ def post_init(path, base_port, config): lambda i, _: { "command": f"cosmovisor start --home %(here)s/node{i}" f" --trace --unsafe-experimental", - "environment": f"DAEMON_NAME=cronosd,DAEMON_HOME=%(here)s/node{i}", + "environment": f"DAEMON_NAME=genesisd,DAEMON_HOME=%(here)s/node{i}", }, ) @@ -66,7 +66,7 @@ def custom_cronos(tmp_path_factory): 26100, Path(__file__).parent / "configs/cosmovisor_gravity.jsonnet", post_init=post_init, - chain_binary=str(path / "upgrades/genesis/bin/cronosd"), + chain_binary=str(path / "upgrades/genesis/bin/genesisd"), ) @@ -113,7 +113,7 @@ def test_cosmovisor_upgrade_gravity(custom_cronos: Cronos): # update cli chain binary custom_cronos.chain_binary = ( Path(custom_cronos.chain_binary).parent.parent.parent - / f"{plan_name}/bin/cronosd" + / f"{plan_name}/bin/genesisd" ) cli = custom_cronos.cosmos_cli() diff --git a/integration_tests/utils.py b/integration_tests/utils.py index f8ae412b8e..a753e47d65 100644 --- a/integration_tests/utils.py +++ b/integration_tests/utils.py @@ -444,7 +444,7 @@ def modify_command_in_supervisor_config(ini: Path, fn, **kwargs): "replace the first node with the instrumented binary" ini.write_text( re.sub( - r"^command = (cronosd .*$)", + r"^command = (genesisd .*$)", lambda m: f"command = {fn(m.group(1))}", ini.read_text(), flags=re.M, diff --git a/nix/bundle-win-exe.nix b/nix/bundle-win-exe.nix index ac67b4eda7..be5066abb7 100644 --- a/nix/bundle-win-exe.nix +++ b/nix/bundle-win-exe.nix @@ -7,11 +7,11 @@ , snappy , zstd , zlib -, cronosd +, genesisd }: -runCommand "tarball-${cronosd.name}" +runCommand "tarball-${genesisd.name}" { - # manually enumerate the runtime dependencies of cronosd on mingwW64 + # manually enumerate the runtime dependencies of genesisd on mingwW64 deps = [ "${rocksdb}/bin/librocksdb-shared.dll" "${snappy}/bin/libsnappy.dll" @@ -31,5 +31,5 @@ runCommand "tarball-${cronosd.name}" cp $so $out/ done - cp ${cronosd}/bin/${cronosd.meta.mainProgram} $out/ + cp ${genesisd}/bin/${genesisd.meta.mainProgram} $out/ '' diff --git a/nix/scripts.nix b/nix/scripts.nix index 45aa631b3e..c535747fda 100644 --- a/nix/scripts.nix +++ b/nix/scripts.nix @@ -3,7 +3,7 @@ , cronos ? (import ../. { inherit pkgs; }) }: rec { start-cronos = pkgs.writeShellScriptBin "start-cronos" '' - # rely on environment to provide cronosd + # rely on environment to provide genesisd export PATH=${pkgs.test-env}/bin:$PATH ${../scripts/start-cronos} ${config.cronos-config} ${config.dotenv} $@ ''; diff --git a/scripts/codesign_macos.sh b/scripts/codesign_macos.sh index ac43e87d70..2c22de36b9 100755 --- a/scripts/codesign_macos.sh +++ b/scripts/codesign_macos.sh @@ -8,7 +8,7 @@ TMPD=$(mktemp -d) tar xfz $1 -C $TMPD echo "Codesign" -find $TMPD -type f \( -name "*.dylib" -or -name cronosd \) | xargs -I{} codesign --force --options runtime -v -s "$MAC_CODE_API_DEVELOPER_ID" {} +find $TMPD -type f \( -name "*.dylib" -or -name genesisd \) | xargs -I{} codesign --force --options runtime -v -s "$MAC_CODE_API_DEVELOPER_ID" {} echo "Archive" WORKDIR=$PWD diff --git a/scripts/cronos-devnet.yaml b/scripts/cronos-devnet.yaml index 0b9b865e1a..b78b4ffad8 100644 --- a/scripts/cronos-devnet.yaml +++ b/scripts/cronos-devnet.yaml @@ -1,6 +1,6 @@ dotenv: .env cronos_777-1: - cmd: cronosd + cmd: genesisd start-flags: "--trace" app-config: minimum-gas-prices: 0basetcro diff --git a/scripts/release.sh b/scripts/release.sh index cfb3f9fb52..d6f543dde9 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -11,7 +11,7 @@ build() { network=$1 host="$2" name="$3" - pkg="cronosd${network}-${build_type}" + pkg="genesisd${network}-${build_type}" if [[ "$host" == "native" ]]; then if [[ "${build_platform: -6}" == "-linux" ]]; then # static link for linux targets