fail: Attempt to launch multiple morph nodes on localhost

This commit is contained in:
Vitaliy Potyarkin 2024-09-18 12:48:08 +00:00
parent 658821cbbb
commit 088e5f3526
4 changed files with 59 additions and 22 deletions

View file

@ -3,6 +3,8 @@ FROSTFS_CONTRACTS_VERSION=0.19.4
FROSTFS_LOCODE_VERSION=0.4.0
NEOGO_VERSION?=0.106.3
ALPHABET=az buky vedi glagoli dobro yest zhivete
ADM?=bin/frostfs-adm-v$(FROSTFS_VERSION)
ADM_RELEASE_URL=https://git.frostfs.info/TrueCloudLab/frostfs-node/releases/download/v$(FROSTFS_VERSION)/frostfs-adm
@ -50,3 +52,7 @@ bin/locode.db:
mkdir -p $(dir $@)
wget -q "$(LOCODE_RELEASE_URL)" -O - | gunzip > $@-v$(FROSTFS_LOCODE_VERSION)
ln -sf $(notdir $@)-v$(FROSTFS_LOCODE_VERSION) $@
define math
$(shell bash -c "echo $$(($(1)))")
endef

View file

@ -40,7 +40,13 @@ morph:
client: # List of websocket RPC endpoints in sidechain
- address: ws://127.0.0.200:30333/ws
validators: # List of hex-encoded 33-byte public keys of sidechain validators to vote for at application startup
- 025d4ec951ae6479ea3826226088b535f24d44d3b50f296c64a6b5ab10502db5df
- 020e4a29733a860109af2f4e3b1a699cb69a0c5e0573948e76f810c7ff88265873
- 021c7afed870ee71f7d9f1bf0068699db3f501511d74b8cf2c6f6c593eea0e5e31
- 0222169db3f15abf8a68e9bb1e8619753bdd69ebbcec3e1a61c15ae0919f99653f
- 033ed0ec64e92bac7e20881fd7bf0b2400b92d37167da02cd9b5424253728b4a41
- 0256fe4526e64cee5e01e0bd696b6b29a31410452420d13013dd7baf0576e80378
- 0389695aa57b0dd8bd8f6d62498c4c17099cea71634db6e2ec5c7ab4753acfff7c
- 02eab7284eb7091cd7e92fda97bda70991a80e98d5f63dec13fbafccc63cace204
# Network time settings
timers:

View file

@ -1,22 +1,32 @@
include ../Makefile
NODE_COUNT?=7
NODE_ID?=1
NODE_ADDRESS=127.0.$(NODE_COUNT).$(call math,200+$(NODE_ID))
NODE_CONFIG=data/config-$(NODE_LETTER)/protocol.privnet.yml
NODE_LETTER=$(word $(NODE_ID),$(ALPHABET))
SHELL=/bin/bash
.SHELLFLAGS=-euo pipefail -c
include ../Makefile
.PHONY: up
up: morph
.PHONY: morph
morph: wallet/morph.json | $(NEOGO)
morph: wallet/az.json $(NODE_CONFIG) | $(NEOGO)
grep -F $$($(NEOGO) wallet dump-keys -w $<|head -n2|tail -n1) protocol.privnet.yml
mkdir -p log
$(NEOGO) node --config-path . --privnet --debug 2>&1 | tee --append log/$@
$(NEOGO) node --config-file $(NODE_CONFIG) --privnet --debug 2>&1 | tee --append log/$@$(NODE_ID)-$(NODE_LETTER)
wallet/morph.json: wallet/az.json
ln -sf "$(abspath $<)" "$(abspath $@)"
$(NEOGO) wallet dump-keys -w $@
$(NODE_CONFIG):
mkdir -p $(dir $@)
cp protocol.privnet.yml $@
sed -i \
-e 's/NODE_ADDRESS/$(NODE_ADDRESS)/g' \
-e 's/NODE_LETTER/$(NODE_LETTER)/g' \
-e 's/NODE_COUNT/$(NODE_COUNT)/g' \
$@
NEOGO_RPC_ENDPOINT=http://127.0.0.200:30333
NEOGO_RPC_ENDPOINT=http://$(NODE_ADDRESS):30333
ADM_ARGS=--rpc-endpoint $(NEOGO_RPC_ENDPOINT) --alphabet-wallets wallet
.PHONY: bootstrap
@ -43,7 +53,7 @@ bootstrap: wallet/storage01.json wallet/storage02.json wallet/storage03.json wal
wallet/az.json: | $(ADM) $(NEOGO)
mkdir -p $(dir $@)
cd wallet; $(abspath $(ADM)) morph generate-alphabet --size 1 --verbose
cd wallet; $(abspath $(ADM)) morph generate-alphabet --size $(NODE_COUNT) --verbose
$(NEOGO) wallet dump-keys -w $@
wallet/%.json: wallet/%.template | $(NEOGO)

View file

@ -5,38 +5,53 @@ ProtocolConfiguration:
MemPoolSize: 50000
StandbyCommittee:
# 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2 # frostfs-dev-env node
- 025d4ec951ae6479ea3826226088b535f24d44d3b50f296c64a6b5ab10502db5df # replace this with node pubkey
ValidatorsCount: 1
- 020e4a29733a860109af2f4e3b1a699cb69a0c5e0573948e76f810c7ff88265873
- 021c7afed870ee71f7d9f1bf0068699db3f501511d74b8cf2c6f6c593eea0e5e31
- 0222169db3f15abf8a68e9bb1e8619753bdd69ebbcec3e1a61c15ae0919f99653f
- 033ed0ec64e92bac7e20881fd7bf0b2400b92d37167da02cd9b5424253728b4a41
- 0256fe4526e64cee5e01e0bd696b6b29a31410452420d13013dd7baf0576e80378
- 0389695aa57b0dd8bd8f6d62498c4c17099cea71634db6e2ec5c7ab4753acfff7c
- 02eab7284eb7091cd7e92fda97bda70991a80e98d5f63dec13fbafccc63cace204
ValidatorsCount: NODE_COUNT
VerifyTransactions: true
StateRootInHeader: true
P2PSigExtensions: true
Hardforks: {}
SeedList:
- "127.0.NODE_COUNT.201:20333"
- "127.0.NODE_COUNT.202:20333"
- "127.0.NODE_COUNT.203:20333"
- "127.0.NODE_COUNT.204:20333"
- "127.0.NODE_COUNT.205:20333"
- "127.0.NODE_COUNT.206:20333"
- "127.0.NODE_COUNT.207:20333"
ApplicationConfiguration:
SkipBlockVerification: false
DBConfiguration:
Type: "boltdb"
BoltDBOptions:
FilePath: "data/chains/morph.bolt"
FilePath: "data/chain-NODE_LETTER/morph.bolt"
P2P:
Addresses:
- "127.0.0.200:20333"
- "NODE_ADDRESS:20333:20333"
DialTimeout: 3s
ProtoTickInterval: 2s
PingInterval: 30s
PingTimeout: 90s
MaxPeers: 10
AttemptConnPeers: 5
MinPeers: 0
MinPeers: NODE_COUNT
Relay: true
Consensus:
Enabled: true
UnlockWallet:
Path: "wallet/morph.json"
Password: "morph"
Path: "wallet/NODE_LETTER.json"
Password: "m"
RPC:
Addresses:
- "127.0.0.200:30333"
- "NODE_ADDRESS:30333"
Enabled: true
SessionEnabled: true
EnableCORSWorkaround: false
@ -44,13 +59,13 @@ ApplicationConfiguration:
P2PNotary:
Enabled: true
UnlockWallet:
Path: "wallet/morph.json"
Password: "morph"
Path: "wallet/NODE_LETTER.json"
Password: "m"
Prometheus:
Addresses:
- "127.0.0.200:20001"
- "NODE_ADDRESS:20001"
Enabled: true
Pprof:
Addresses:
- "127.0.0.200:20011"
- "NODE_ADDRESS:20011"
Enabled: true