Generate alphabet wallets

This commit is contained in:
Vitaliy Potyarkin 2024-09-13 15:33:02 +00:00
parent a8a874afc0
commit 0ecf99e248
4 changed files with 24 additions and 6 deletions

2
.gitignore vendored
View file

@ -1,4 +1,4 @@
bin
log
data
wallet.json
wallet

View file

@ -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))

View file

@ -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:

View file

@ -1,3 +1,3 @@
---
Path: wallet.json
Path: wallet/morph.json
Password: morph