From 008389dcd80bd3803c8a07c3f64506e0222570d7 Mon Sep 17 00:00:00 2001 From: zramsay Date: Tue, 23 Jul 2024 20:10:06 -0400 Subject: [PATCH] cns --> registry and other fixes --- docs/gitea-with-laconicd-fixturenet.md | 2 +- docs/laconicd-with-console.md | 4 ++-- .../registry-cli-config-template.yml | 6 +++--- .../registry-cli-config-template.yml | 6 +++--- .../cerc-laconic-registry-cli/create-demo-records.sh | 2 +- .../data/stacks/fixturenet-laconic-loaded/README.md | 2 +- .../data/stacks/fixturenet-laconicd/README.md | 2 +- stack_orchestrator/deploy/webapp/util.py | 12 ++++++------ 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/docs/gitea-with-laconicd-fixturenet.md b/docs/gitea-with-laconicd-fixturenet.md index f0b3e804..e245f6fd 100644 --- a/docs/gitea-with-laconicd-fixturenet.md +++ b/docs/gitea-with-laconicd-fixturenet.md @@ -74,7 +74,7 @@ laconic-so --stack fixturenet-laconicd deploy logs ### Test with the registry CLI ```bash -laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status" +laconic-so --stack fixturenet-laconicd deploy exec cli "laconic registry status" ``` Try additional CLI commands, documented [here](https://github.com/cerc-io/laconic-registry-cli#operations). diff --git a/docs/laconicd-with-console.md b/docs/laconicd-with-console.md index 6e7a4ab2..1589ca07 100644 --- a/docs/laconicd-with-console.md +++ b/docs/laconicd-with-console.md @@ -110,7 +110,7 @@ To avoid hiccups on Mac M1/M2 and any local machine nuances that may affect the 4. Confirm operation of the registry CLI: ``` - laconic-so deployment --dir laconic-loaded-deployment exec cli "laconic cns status" + laconic-so deployment --dir laconic-loaded-deployment exec cli "laconic registry status" ``` ``` @@ -223,5 +223,5 @@ record: - e.g,: ``` -laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic cns record list" +laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic registry record list" ``` diff --git a/stack_orchestrator/data/config/fixturenet-laconicd/registry-cli-config-template.yml b/stack_orchestrator/data/config/fixturenet-laconicd/registry-cli-config-template.yml index d558956a..38e12d44 100644 --- a/stack_orchestrator/data/config/fixturenet-laconicd/registry-cli-config-template.yml +++ b/stack_orchestrator/data/config/fixturenet-laconicd/registry-cli-config-template.yml @@ -1,9 +1,9 @@ services: - cns: - restEndpoint: 'http://laconicd:1317' + registry: + rpcEndpoint: 'http://laconicd:26657' gqlEndpoint: 'http://laconicd:9473/api' userKey: REPLACE_WITH_MYKEY bondId: chainId: laconic_9000-1 gas: 350000 - fees: 200000aphoton + fees: 200000photon diff --git a/stack_orchestrator/data/config/mainnet-laconicd/registry-cli-config-template.yml b/stack_orchestrator/data/config/mainnet-laconicd/registry-cli-config-template.yml index 16432c18..c5e48361 100644 --- a/stack_orchestrator/data/config/mainnet-laconicd/registry-cli-config-template.yml +++ b/stack_orchestrator/data/config/mainnet-laconicd/registry-cli-config-template.yml @@ -1,9 +1,9 @@ services: - cns: - restEndpoint: 'http://laconicd:1317' + registry: + rpcEndpoint: 'http://laconicd:26657' gqlEndpoint: 'http://laconicd:9473/api' userKey: REPLACE_WITH_MYKEY bondId: chainId: laconic_9000-1 gas: 250000 - fees: 200000aphoton + fees: 200000photon diff --git a/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh b/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh index 5a5dc34c..a95d73bd 100755 --- a/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh +++ b/stack_orchestrator/data/container-build/cerc-laconic-registry-cli/create-demo-records.sh @@ -5,7 +5,7 @@ if [ -n "$CERC_SCRIPT_DEBUG" ]; then set -x fi -registry_command="laconic cns" +registry_command="laconic registry" demo_records_dir="scripts/demo-records" # Check we have funds diff --git a/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md b/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md index 94f9eb36..6d0f82a6 100644 --- a/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md +++ b/stack_orchestrator/data/stacks/fixturenet-laconic-loaded/README.md @@ -49,7 +49,7 @@ $ laconic-so --stack fixturenet-laconic-loaded deploy logs ``` ## 6. Test with the Registry CLI ``` -$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic cns status" +$ laconic-so --stack fixturenet-laconic-loaded deploy exec cli "laconic registry status" ``` ## 7. View the laconic console Get the URL for the console web app with this command (the port number will be different for each deployment): diff --git a/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md b/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md index 1b04b875..d939d0a4 100644 --- a/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md +++ b/stack_orchestrator/data/stacks/fixturenet-laconicd/README.md @@ -44,5 +44,5 @@ $ laconic-so --stack fixturenet-laconicd deploy logs ``` ## 6. Test with the Registry CLI ``` -$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic cns status" +$ laconic-so --stack fixturenet-laconicd deploy exec cli "laconic registry status" ``` diff --git a/stack_orchestrator/deploy/webapp/util.py b/stack_orchestrator/deploy/webapp/util.py index 97e756d9..cc8cc421 100644 --- a/stack_orchestrator/deploy/webapp/util.py +++ b/stack_orchestrator/deploy/webapp/util.py @@ -94,7 +94,7 @@ class LaconicRegistryClient: ) def list_records(self, criteria={}, all=False): - args = ["laconic", "-c", self.config_file, "cns", "record", "list"] + args = ["laconic", "-c", self.config_file, "registry", "record", "list"] if all: args.append("--all") @@ -140,7 +140,7 @@ class LaconicRegistryClient: if name in self.cache.name_or_id: return self.cache.name_or_id[name] - args = ["laconic", "-c", self.config_file, "cns", "name", "resolve", name] + args = ["laconic", "-c", self.config_file, "registry", "name", "resolve", name] parsed = [AttrDict(r) for r in json.loads(logged_cmd(self.log_file, *args))] if parsed: @@ -165,7 +165,7 @@ class LaconicRegistryClient: "laconic", "-c", self.config_file, - "cns", + "registry", "record", "get", "--id", @@ -203,7 +203,7 @@ class LaconicRegistryClient: print(open(record_fname, 'r').read(), file=self.log_file) new_record_id = json.loads( - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "record", "publish", "--filename", record_fname) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", "record", "publish", "--filename", record_fname) )["id"] for name in names: self.set_name(name, new_record_id) @@ -212,10 +212,10 @@ class LaconicRegistryClient: logged_cmd(self.log_file, "rm", "-rf", tmpdir) def set_name(self, name, record_id): - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "name", "set", name, record_id) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", "name", "set", name, record_id) def delete_name(self, name): - logged_cmd(self.log_file, "laconic", "-c", self.config_file, "cns", "name", "delete", name) + logged_cmd(self.log_file, "laconic", "-c", self.config_file, "registry", "name", "delete", name) def file_hash(filename):