From 0ecf99e248324f5d89e3ade19dc54d901b4fd7c0 Mon Sep 17 00:00:00 2001 From: Vitaliy Potyarkin Date: Fri, 13 Sep 2024 15:33:02 +0000 Subject: [PATCH] Generate alphabet wallets --- .gitignore | 2 +- morph/Makefile | 22 ++++++++++++++++++++-- morph/protocol.privnet.yml | 4 ++-- morph/wallet.template | 2 +- 4 files changed, 24 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index aed722e..82f2d07 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ bin log data -wallet.json +wallet diff --git a/morph/Makefile b/morph/Makefile index 30fb5dd..24768ad 100644 --- a/morph/Makefile +++ b/morph/Makefile @@ -1,4 +1,5 @@ FROSTFS_VERSION?=0.42.9 +FROSTFS_CONTRACTS_VERSION=0.19.4 NEOGO_VERSION?=0.106.3 SHELL=/bin/bash @@ -7,7 +8,7 @@ SHELL=/bin/bash .PHONY: up up: morph -WALLET?=wallet.json +WALLET?=wallet/morph.json TOOLS=$(NEOGO) $(ADM) $(CLI) ADM?=bin/frostfs-adm-v$(FROSTFS_VERSION) @@ -39,5 +40,22 @@ morph: $(WALLET) | $(NEOGO) mkdir -p log $(NEOGO) node --config-path . --privnet --debug 2>&1 | tee --append log/$@ -wallet.json: wallet.template | $(NEOGO) +wallet/morph.json: wallet.template | $(NEOGO) + mkdir -p $(dir $@) $(NEOGO) wallet init --account --wallet-config $< + +.PHONY: bootstrap +bootstrap: data/contracts wallet/az.json | $(ADM) + $(ADM) morph init --contracts $< --alphabet-wallets wallet --rpc-endpoint http://localhost:30333 + +wallet/az.json: + mkdir -p wallet + cd wallet; $(abspath $(ADM)) morph generate-alphabet --size 1 --verbose + +data/contracts: | $(NEOGO) + mkdir -p $(dir $@) + git clone https://git.frostfs.info/TrueCloudLab/frostfs-contract \ + --branch=v$(FROSTFS_CONTRACTS_VERSION) \ + --depth=1 --single-branch \ + $@ + $(MAKE) -C $@ all NEOGO=$(abspath $(NEOGO)) diff --git a/morph/protocol.privnet.yml b/morph/protocol.privnet.yml index 1876c86..5995004 100644 --- a/morph/protocol.privnet.yml +++ b/morph/protocol.privnet.yml @@ -30,7 +30,7 @@ ApplicationConfiguration: Consensus: Enabled: true UnlockWallet: - Path: "wallet.json" + Path: "wallet/morph.json" Password: "morph" RPC: Addresses: @@ -42,7 +42,7 @@ ApplicationConfiguration: P2PNotary: Enabled: true UnlockWallet: - Path: "wallet.json" + Path: "wallet/morph.json" Password: "morph" Prometheus: Addresses: diff --git a/morph/wallet.template b/morph/wallet.template index fc59d54..ee0cbb9 100644 --- a/morph/wallet.template +++ b/morph/wallet.template @@ -1,3 +1,3 @@ --- -Path: wallet.json +Path: wallet/morph.json Password: morph