Skip to content

Commit

Permalink
Renamed cronosd to genesisd
Browse files Browse the repository at this point in the history
  • Loading branch information
zenodeapp committed Jan 22, 2024
1 parent 1e31639 commit 4d701cd
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 39 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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" ([
Expand Down Expand Up @@ -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;
};
}
24 changes: 12 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,21 +39,21 @@
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
gomod2nix
];
};
};
devShell = devShells.cronosd;
devShell = devShells.genesisd;
legacyPackages = pkgs;
}
)
Expand All @@ -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 {
Expand All @@ -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
);
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/configs/default.jsonnet
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
dotenv: '../../scripts/.env',
'cronos_777-1': {
cmd: 'cronosd',
cmd: 'genesisd',
'start-flags': '--trace',
config: {
mempool: {
Expand Down
4 changes: 2 additions & 2 deletions integration_tests/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion integration_tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions integration_tests/test_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
},
)

Expand All @@ -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"),
)


Expand Down Expand Up @@ -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()

Expand Down
6 changes: 3 additions & 3 deletions integration_tests/test_upgrade_gravity.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}",
},
)

Expand All @@ -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"),
)


Expand Down Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion integration_tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions nix/bundle-win-exe.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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/
''
2 changes: 1 addition & 1 deletion nix/scripts.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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} $@
'';
Expand Down
2 changes: 1 addition & 1 deletion scripts/codesign_macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripts/cronos-devnet.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dotenv: .env
cronos_777-1:
cmd: cronosd
cmd: genesisd
start-flags: "--trace"
app-config:
minimum-gas-prices: 0basetcro
Expand Down
2 changes: 1 addition & 1 deletion scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4d701cd

Please sign in to comment.