diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1c62265a80..df0d43e8ad 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: "tgenesisd-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 2e57311fab..c2e0f5a4c2 100644 --- a/default.nix +++ b/default.nix @@ -11,7 +11,7 @@ }: let version = "v1.0.15"; - pname = "cronosd"; + pname = "tgenesisd"; tags = [ "ledger" "netgo" network "rocksdb" "grocksdb_no_link" ] ++ lib.optionals nativeByteOrder [ "nativebyteorder" ]; ldflags = lib.concatStringsSep "\n" ([ @@ -45,7 +45,7 @@ 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/tgenesisd ''; doCheck = false; @@ -53,7 +53,7 @@ buildGoApplication rec { description = "Official implementation of the Cronos blockchain protocol"; homepage = "https://cronos.org/"; license = licenses.asl20; - mainProgram = "cronosd" + stdenv.hostPlatform.extensions.executable; + mainProgram = "tgenesisd" + stdenv.hostPlatform.extensions.executable; platforms = platforms.all; }; } diff --git a/flake.nix b/flake.nix index d96309235e..deb1424e7a 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; + tgenesisd = mkApp packages.tgenesisd; + tgenesisd-testnet = mkApp packages.tgenesisd-testnet; }; - defaultPackage = packages.cronosd; - defaultApp = apps.cronosd; + defaultPackage = packages.tgenesisd; + defaultApp = apps.tgenesisd; devShells = { - cronosd = pkgs.mkShell { + tgenesisd = pkgs.mkShell { buildInputs = with pkgs; [ go_1_20 rocksdb @@ -53,7 +53,7 @@ ]; }; }; - devShell = devShells.cronosd; + devShell = devShells.tgenesisd; 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 { tgenesisd = drv; }; } // (with final; let matrix = lib.cartesianProductOfSets { @@ -84,27 +84,27 @@ binaries = builtins.listToAttrs (builtins.map ({ network, pkgtype }: { name = builtins.concatStringsSep "-" ( - [ "cronosd" ] ++ + [ "tgenesisd" ] ++ lib.optional (network != "mainnet") network ++ lib.optional (pkgtype != "nix") pkgtype ); value = let - cronosd = callPackage ./. { + tgenesisd = callPackage ./. { inherit rev network; }; bundle = if stdenv.hostPlatform.isWindows then - bundle-win-exe cronosd + bundle-win-exe tgenesisd else - bundle-exe cronosd; + bundle-exe tgenesisd; in if pkgtype == "bundle" then bundle else if pkgtype == "tarball" then make-tarball bundle else - cronosd; + tgenesisd; }) matrix ); diff --git a/integration_tests/configs/default.jsonnet b/integration_tests/configs/default.jsonnet index 04c9a14d78..0e943cfa2f 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: 'tgenesisd', 'start-flags': '--trace', config: { mempool: { diff --git a/integration_tests/network.py b/integration_tests/network.py index 8f731ce421..fc13951171 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="tgenesisd"): 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 "tgenesisd") finally: os.killpg(os.getpgid(proc.pid), signal.SIGTERM) # proc.terminate() diff --git a/integration_tests/test_basic.py b/integration_tests/test_basic.py index 5abdfe1496..b51f21932d 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 = "tgenesisd" # 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 8b0f5f62f2..c6e623e485 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=tgenesisd,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/tgenesisd"), ) @@ -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/tgenesisd" ) cli = custom_cronos.cosmos_cli() diff --git a/integration_tests/test_upgrade_gravity.py b/integration_tests/test_upgrade_gravity.py index 3ddf737ce8..2b266d27b8 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=tgenesisd,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/tgenesisd"), ) @@ -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/tgenesisd" ) cli = custom_cronos.cosmos_cli() diff --git a/integration_tests/utils.py b/integration_tests/utils.py index 09535944ab..47600f931e 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 = (tgenesisd .*$)", 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..b8a9d058d7 100644 --- a/nix/bundle-win-exe.nix +++ b/nix/bundle-win-exe.nix @@ -7,11 +7,11 @@ , snappy , zstd , zlib -, cronosd +, tgenesisd }: -runCommand "tarball-${cronosd.name}" +runCommand "tarball-${tgenesisd.name}" { - # manually enumerate the runtime dependencies of cronosd on mingwW64 + # manually enumerate the runtime dependencies of tgenesisd 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 ${tgenesisd}/bin/${tgenesisd.meta.mainProgram} $out/ '' diff --git a/nix/scripts.nix b/nix/scripts.nix index 45aa631b3e..b90f7895d5 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 tgenesisd 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..2a18aacbb9 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 tgenesisd \) | 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..0b750f6169 100644 --- a/scripts/cronos-devnet.yaml +++ b/scripts/cronos-devnet.yaml @@ -1,6 +1,6 @@ dotenv: .env cronos_777-1: - cmd: cronosd + cmd: tgenesisd start-flags: "--trace" app-config: minimum-gas-prices: 0basetcro diff --git a/scripts/release.sh b/scripts/release.sh index cfb3f9fb52..c08a673c11 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="tgenesisd${network}-${build_type}" if [[ "$host" == "native" ]]; then if [[ "${build_platform: -6}" == "-linux" ]]; then # static link for linux targets